Lubuntu Install Error Attempting to Read or Write Outside of Disk 'hdd0'

Contents

  1. Chow ii Initial Installation
    1. Installation Options (LiveCD)
      1. Using the Entire Drive ( "Erase disk and install Ubuntu" ):
      2. Installing Ubuntu to a Specific Partition ("Something Else"):
      3. BIOS/MBR Notes
      4. BIOS/GPT Notes
      5. UEFI
    2. Post-Installation
  2. Reinstalling GRUB 2
    1. Reinstalling GRUB ii from a Working Arrangement
    2. Fixing a Broken System
      1. via Kick-Repair Graphical Tool
      2. via GRUB2 Rescue way
      3. via the LiveCD terminal
      4. via Segmentation Files Copy
      5. via ChRoot
      6. Boot repair after a Windows Upgrade on Ubuntu 14.04 (not-RAID)
    3. Purging & Reinstalling Chow 2
      1. via Kicking-Repair Graphical Tool
      2. via Last Commands
    4. Postal service-Restoration Commands
  3. Moving Grub ii
  4. Chow Legacy Upgrades and Downgrades
  5. Related Links

This page details the procedures for installing and reinstalling GRUB 2. The data applies to nigh versions of GRUB 2, but is specifically written for version 1.99. Grub 1.99 is included on Ubuntu releases 11.04 (Natty Narwhal) and later. For more data on a variety of Chow two topics, please visit the GRUB2 primary page. For information on converting to or from GRUB Legacy, please view the Grub2/Upgrading community physician.

The GRUB 2 bootloader is included on all currently-supported versions of the Ubuntu family. Chow two can accomodate traditional reckoner firmware such equally BIOS as well as the newer EFI/UEFI standards. It is compatible with MBR, GPT and other division tables.

All references to Grub pertain to Chow two. Where GRUB 0.97 is discussed, it will be referred to by version number or equally GRUB Legacy.

Chow 2 Initial Installation

Grub 2 installation is automatically incorporated into a normal Ubuntu installation. Input required by the user for the initial setup is very unproblematic. If the installation will utilise the unabridged deejay no specific Chow selections are necessary. If the user wants to use a specific partitioning for Ubuntu the user must select the Ubuntu segmentation and the drive on which to embed the bootloader data.

The main Grub 2 binder locations include /boot/grub/ and /etc/grub.d/. User preferences are stored in the /etc/default/grub file. The GRUB 2 card is congenital by information contained in /boot/chow/chow.cfg.

Installation Options (LiveCD)

Using the Unabridged Bulldoze ( "Erase disk and install Ubuntu" ):

Install on entire bulldoze: The user should select a bulldoze on which Ubuntu and Grub 2 will be installed. Grub ii will overwrite the drive'southward kicking information and place the GRUB 2 files in the appropriate locations.

Installing Ubuntu to a Specific Partition ("Something Else"):

When using the "Something Else" option, yous will be offered to choose the "Device for bootloader installation". Please select: * either the disk (eg /dev/sdX, not /dev/sdXY) on which the BIOS is setup to boot (recommended for normal use) * OR the sectionalisation (eg /dev/sdXY, not /dev/sdX) on which Ubuntu (/kicking, else /) will exist installed (only if you want to chainload it from another bootloader; if whatsoever doubt, do NOT choose this)

important.png Never choose any other sectionalisation! (this may break the boot of your other systems, see Bug #1049549).

g2_installing_partition.png

info.png On a organization with multiple drives and OS's, the user can preserve the original bootloader by installing Grub 2 on another drive. To accomplish this:

  • specify the deejay (eg /dev/sdX, non /dev/sdaXY) not currently used to kick the system for the bootloader location.
  • Afterwards the installation is complete, modify the kick society (via BIOS setup) so that the disk to which the Grub information was written is the one booted starting time.
  • If the user wishes to restore booting with the original bootloader, change the boot order back to the original drive.

BIOS/MBR Notes

GRUB ii normally writes its bootloader data to an area but beyond the Main Boot Tape and before the start sectionalisation. Some software on non-Linux operating systems also used this embedded area and broke the organization by overwriting the Grub ii data on dual-kicking systems. Grub 2 now can recognize this potential problem and avoid it.

The bootloader data does non have to be installed to the embedded expanse of the MBR. It may also featherbed the MBR entirely and be installed to a specific sectionalization. In doing this, the location of the Grub two files are specified by using blocklists. This option is non available via an Ubuntu GUI installation but tin can be made via the concluding afterward installation. Even then this method is non as reliable as writing to the MBR and is not recommended by the Chow developers.

BIOS/GPT Notes

If the BIOS is setup to boot the disk in Legacy/mbr style, installing GRUB2 on a GPT (GUID Partition Table) deejay requires a dedicated BIOS boot partitioning with a recommended size of at to the lowest degree 1 MiB. This partition can be created via GParted or other partitioning tools, or via the command line. It must be identified with a bios_grub flag. The necessary GPT modules are automatically included during installation when Chow 2 detects a GPT scheme.

UEFI

GRUB ii is compatible with EFI/UEFI and will load the necessary modules during installation. For information on this topic, delight visit the UEFI community documentation.

Post-Installation

At the conclusion of a normal installation using the default entries:

  • Chow 2 volition be the default bootloader for the computer.
    • GRUB 2 will take written information to the designated drive's boot surface area pointing to the Ubuntu installation's GRUB 2 files. On before versions of GRUB 2 on a BIOS systems any information previously contained in the area just beyond MBR will have been overwritten. An improvement to Chow 2 allows information technology to write the kicking data to another area if a non-Linux application has already used this area.
    • The GRUB 2 files volition normally be located in the /kick/grub and /etc/grub.d folders and the /etc/default/grub file in the partition containing the Ubuntu installation.

    • If another Ubuntu/Linux distribution controlled the boot procedure, it will be replaced by the GRUB 2 settings in the new installation.
    • If the boot was controlled by Windows, the MBR information volition at present point to the Ubuntu installation and Grub ii will control the kick process. The GRUB two bill of fare will include an entry for Windows if it establish what information technology considers the necessary Windows kicking files.
      • Windows boot files in the Windows partition are not afflicted by the GRUB two installation. Only the MBR data is changed. Windows control of the boot process can be obtained by selecting a Windows entry in the GRUB 2 menu during kicking.
  • If GRUB has detected another Os it volition brandish a menu so the user may brand a selection. If no pick is fabricated, Ubuntu will boot after a brief timeout.
  • If Grub has detected no other operating systems, no bill of fare will be displayed and the calculator will boot the new Ubuntu installation. If the user wishes to display the menu, hold downwardly the SHIFT key as the reckoner boots.

To view the Chow ii file organization and configuration options delight refer to Chow 2 community documentation page.

Reinstalling GRUB 2

The user may wish to reinstall Chow two for a variety of reasons, including:

  • After installing another operating organization which installed its ain bootloader, reinstall GRUB2 to return control to the desired Os. When an operating system is added on a multiboot reckoner information technology will more often than not take command of the kicking process. Reinstalling Grub 2 from a within the desired OS volition return command of the kicking process to that Os.
  • Add the boot information to an additional drive. GRUB 2 tin can be installed on multiple drives - all pointing to the same operating system. This provides a backup in case the MBR or kick record data on a particular bulldoze becomes corrupted.
  • Replace missing files
  • Repair a broken system, such every bit when the user sees only "Chow" on a black screen with no prompt or when the user cannot kicking using GRUB 2's rescue fashion options.
  • Upgrade from Chow Legacy

When using the chow-install command, the kicking information is updated and written to the designated drive, missing - but not corrupted or intentionally deleted - files are restored. Specifically the core.img, grubenv, and device.map are updated and missing modules restored. If missing, the grub binder will be recreated. The grub-install command does not generate a new Grub 2 menu (chow.cfg).

Reinstalling GRUB two from a Working Arrangement

If Ubuntu is operating ordinarily, boot into the working installation and run the following command from a terminal.

  • 10 is the bulldoze (letter) on which you want GRUB to write the kicking data. Normally users should not include a partition number, which would produce an mistake bulletin as the control would attempt to write the information to a partition.

                  sudo grub-install /dev/sdX  # Example: sudo chow-install /dev/sda

This will rewrite the MBR information to signal to the current installation and rewrite some Grub 2 files (which are already working). Since it isn't done during execution of the previous control, running sudo update-grub later on the install volition ensure GRUB 2'southward menu is upwardly-to-date.

Fixing a Cleaved System

If a system has go unbootable due to a GRUB 2 failure or corrupted MBR/boot sector, there are various methods for reinstalling GRUB two. The simplest is listed kickoff, followed by more complicated methods.

via Kick-Repair Graphical Tool

Kick-Repair is a GUI application which can fix a diversity of Chow ii issues. It tin can be used either from a LiveCD, its own CD, or during a normal Ubuntu session. In improver to providing a simple user interface, Kick-Repair as well includes the power to run a script to gather details of the organization which can be used for troubleshooting help on various forums and IRC channels.

Please refer to the Boot-Repair community documentation for instructions on how to install and run this awarding.

via GRUB2 Rescue manner

Chow 2 provides a rescue mode which allows the user to endeavor to repair GRUB two from a special GRUB terminal during kicking. Refer to the Grub2 Command_Line_and_Rescue_Mode section for information on Grub terminal operations.

via the LiveCD terminal

This method uses the concluding from a LiveCD. The user must know the device name/partition of the installed organisation (sda1, sdb5, etc), which is then mounted from the LiveCD. Grub 2 files are copied from the LiveCD libraries to the proper locations and MBR.

This operation will write to the MBR and restore the modules and core.img to /boot/grub. It will not replace or restore grub.cfg or fix corrupted files. Kicking the LiveCD, select "Endeavor Information technology", and open a last.

info.png When using a LiveCD, due to Grub 2 changes between Ubuntu releases, it is recommended that the user boots a LiveCD of the same release (xi.10, 12.04, etc) as the release to exist repaired. If the user has installed a different version of GRUB two, use a LiveCD with the aforementioned GRUB 2 version.

If necessary, use the fdisk command to help determine the division on which Ubuntu is installed. The fdisk option "-l" is a lowercase "50". Look for one of the appropriate size or formatting. Running sudo blkid may provide more information to help locate the proper division, especially if the partitions are labeled. The '

  •               sudo fdisk -l              sudo blkid

In the following commands:

  • Use the partition number of the Ubuntu installation with mount command.

  • Exercise not use the partition number with the grub-install command.

  • X is the drive letter (a, b, c, etc.); Y is the sectionalisation number (ane, 5, etc).

  • --boot-directory is the folder in which the GRUB folder is located. This is commonly /boot but should be changed if the grub binder is located elsewhere.

  • On systems with a separate /boot partition, that partition should exist mounted to /mnt/kick. For instance: sudo mount /dev/sda6 /mnt/boot

  • chow-install will restore missing files in the chow folder but volition non restore intentionally deleted or corrupted files. To reach these tasks GRUB 2 must be completely removed and reinstalled.

                  sudo mountain /dev/sdXY /mnt # Example: sudo mount /dev/sda5 /mnt              sudo grub-install --boot-directory=/mnt/boot /dev/sdX # Case: sudo grub-install --boot-directory=/mnt/kick /dev/sda

    If Ubuntu is installed on B-tree file system i.e. btrfs then /kicking changes to /@/kick in higher up commands such that :

                  sudo grub-install --boot-directory=/mnt/@/boot /dev/sdX # Case: sudo grub-install --boot-directory=/mnt/@/boot /dev/sda

    For Chow 2 version one.98 and earlier (Ubuntu x.04), the installation control is slightly different. Rather than designating the --kicking-directory, the switch is --root-directory. In this case, the location changes to /mnt

                  sudo chow-install --root-directory=/mnt /dev/sdX

If the user wishes to explore why the organisation failed, refer to Postal service-Restoration Commands section below.

via Partition Files Copy

This method does not piece of work if Grub has not already been installed, or if Chow files have been deleted.

important.png This method talks nigh ix.10, so information technology may exist obsolete.

Information technology consists in locating and mounting the trouble boot sectionalisation from the LiveCD. The files are then copied from the broken system'southward /boot/grub directory to the proper locations and MBR. It requires fewer steps and fewer command line entries than the following CHROOT method. For users with separate organization partitions, such as a carve up /boot partition, or other special circumstances, using the CHROOT method may provide better results.

  1. Kicking to the LiveCD Desktop.
  2. Mountain the partition with your Ubuntu installation.
    1. From the Places carte, select and click the division containing your Ubuntu installation to mount information technology.

      • grub2.places.devices.png

      • If the partitioning isn't recognized, look for apartition of the advisable size or characterization.
      • One time mounted, the user should see Ubuntu system directories such as /kicking

  3. Open up a terminal by selecting Applications, Accessories, Terminal from the menu bar.

  4. Run the chow-setup -d command as described below. This volition reinstall the GRUB 2 files on the mounted partitioning to the proper location and to the MBR of the designated device.

    1. Decide the mount bespeak by referring to the location box in Places. Supervene upon XXXX in the command with the UUID, or supplant /media/XXXX with the correct location if the partition is not mounted in /media. The designation may exist a UUID, or a label, if the user has created one (see note).

    2. If the location window is not in the format shown, click on the icon to the left to change the presentation.
      • grub2.places.location.png

    3. When set to copy the UUID/location, by highlighting information technology with the mouse. Paste it into the last by pressing the eye mouse push button. If using the keyboard, utilize CTRL-SHIFT-arrow to select and CTRL-C to copy the location and CTRL-SHIFT-V to paste it into the terminal.

    4. The device/drive is designated by sdX, with X being the device designation. sda is the first device, sdb is the second, etc. For nigh users the MBR should exist installed to sda, the first drive on their organisation.

                        sudo grub-setup -d /media/XXXX/boot/grub /dev/sda
      Instance:

      sudo grub-setup -d /media/7848138a-41a0-4eba-8aed-d1b625ac8759/boot/chow /dev/sda

    5. If the user gets a " error: Cannot open /boot/grub/device.map " message, add the -m switch and path to the device.map to the command as follows:

                        sudo grub-setup -d /media/XXXXX/boot/grub -m /media/XXXXX/boot/grub/device.map /dev/sda
      Example:

      sudo grub-setup -d /media/7848138a-41a0-4eba-8aed-d1b625ac8759/boot/grub -one thousand /media/7848138a-41a0-4eba-8aed-d1b625ac8759/boot/chow/device.map /dev/sda

    6. Other switches are available for apply with the grub-setup command. In a last, type grub-setup --help for a list of available options.

    7. You may detect you get a repeated " error: Cannot open /boot/grub/device.map " message. If this happens try rebooting. The UUID method may actually work but throws an error message falsely. Using the characterization name does not seem to evoke the same repeated error message.

  5. Reboot
  6. Refresh the Chow 2 menu with sudo update-chow

  7. If the user wishes to explore why the organisation failed, refer to Post-Restoration Commands department below.

    info.png Disk Utility, introduced in Ubuntu 9.x, can easily assign labels to existing partitions. Access Disk Utility from the System, Administration menu or Dash.

via ChRoot

This method of installation uses the chroot command to gain admission to the cleaved arrangement'south files. In one case the chroot command is issued, the LiveCD treats the cleaved system's / as its own. Commands run in a chroot environs will bear on the cleaved systems filesystems and not those of the LiveCD.

  1. Boot to the LiveCD Desktop. The CD should exist 64bit (non 32bit) if the organisation to fix is 64 chip.
  2. Open a terminal. The method varies depending on the release.
  3. Assuming the normal arrangement partition(south) are on a software RAID (otherwise skip this footstep): make sure the mdadm tools are installed in the Alive CD environs (e.1000. by executing sudo apt-get install mdadm). Then assemble the arrays:

                  sudo mdadm --assemble --scan
  4. If using LVM:

                  sudo sh -ec "apt-get install lvm2; vgchange -ay"
  5. If using bcache:

                  sudo sh -ec "apt-become install software-properties-mutual; add-apt-repository ppa:g2p/storage; apt-get update; apt-get install bcache-tools"
  6. Determine your normal organization partitioning. The following commands may exist helpful. The fdisk switch is a lowercase "L".

                  sudo fdisk -l              sudo blkid              df -Th
  7. Mount your normal arrangement partition. 10 is the bulldoze letter. Y is the partition number:

    • Substitute the right partition: sda1, sdb5, etc.
                  sudo mount /dev/sdXY /mnt
    • Example i: sudo mount /dev/sda1 /mnt

    • Example 2: sudo mount /dev/md1 /mnt

  8. Only if you lot accept a carve up boot sectionalisation (where sdXY is the /kick partition designation):

                  sudo mount /dev/sdXY /mnt/kick
    • Example 1: sudo mount /dev/sdb6 /mnt/boot

    • Instance 2: sudo mountain /dev/md0 /mnt/boot

  9. Only if (some) of the arrangement partitions are on a software RAID (otherwise skip this stride): brand certain the output of mdadm --examine --scan agrees with the array definitions in /etc/mdadm/mdadm.conf.

  10. Mount the critical virtual filesystems. Run the following as a single command:
                  for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt/$i; done
  11. Chroot into your normal arrangement device:
                  sudo chroot /mnt
  12. Reinstall Grub ii (substitute the correct device with sda, sdb, etc. Do non specify a partition number):

                  grub-install /dev/sdX

    If the system partitions are on a software RAID install GRUB two on all disks in the RAID. Case (software RAID using /dev/sda and /dev/sdb):

                  grub-install /dev/sda              grub-install /dev/sdb
  13. Recreate the Chow 2 menu file (grub.cfg)

                  update-grub
  14. Leave chroot: CTRL-D on keyboard

  1. Reboot.
    •                   sudo reboot

Boot repair later on a Windows Upgrade on Ubuntu xiv.04 (not-RAID)

Boot repair may exist required when updating Windows (e.g. Windows eight to Windows eight.1). This will exist required for example if the computer has been configured such that Windows/Ubuntu is selected by entering the bios and changing the kick mode betwixt "secure kicking"/UEFI and CMS respectively. To manually repair chow (http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd / http://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-become-ubuntu-back-after-installing-windows );

  • Insert Ubuntu installation media (e.1000. Ubuntu 14.04 LTS 64 bit DVD)
  • Ensure the bios boot order is set to read the media get-go (consult your motherboard/calculator manual) and restart the calculator
  • Select Ubuntu Alive/Attempt mode (do non install)
  • Click on the purple Ubuntu search button - enter "gparted" and click on its icon
  • Determine the name of your linux segmentation (/dev/sdXY) - yous should be able to identify it by recognising its format (most probable ext4) and size (number of GB)
  • Click on purple Ubuntu search button - enter "gnome-terminal" and click on its icon
  •  sudo mount /dev/sdXY /mnt [where sdXY has previously been identified using gparted]

  •  for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done

  •  sudo chroot /mnt

  •  sudo grub-install /dev/sdX [note this is sdX not sdXY!]

  •  update-grub

  •  leave

  • restart PC and remove Ubuntu installation media

Purging & Reinstalling GRUB ii

The deviation between using the grub-install command and purging & reinstalling GRUB two is that the latter completely removes all GRUB 2 files and organisation settings. Purging Grub 2 is as well a method to reset all configuration settings to the default values on a working system. This may right Chow 2 failures due to corrupted files and improper configurations equally well as for missing folders/files deleted by the user. The GRUB 2 packages removed and reinstalled via this procedure include grub-pc, chow-mutual and, in Grub one.99 and later, grub-gfxpayload-lists.

important.png During this operation the user will be temporarily left with no bootloader. Ensure yous have a working Cyberspace connection and admission to the repositories before purging the Chow 2 packages.

This procedure can be accomplished very simply via Boot-Repair, or via the final procedure beneath.

Remark: the Boot-Repair procedure will also remove custom files that may block the kick. It is also able to purge and reinstall GRUB2 for UEFI / LVM / RAID systems.

via Boot-Repair Graphical Tool

* Run Boot-Repair either from liveCD or from your installed session * Click "Advanced options" --> "Grub options" tab * Tick the "Purge Grub and reinstall it" option --> Apply

via Concluding Commands

The commands from a working Ubuntu installation or one time within the ChRoot of a LiveCD are the same.

  1. If using the LiveCD, complete the steps up to and including the sudo chroot command (Step nine) in the previous section.

Run the post-obit commands as root. If not in a ChRoot surroundings, preface each command with sudo.

  1. Update the repositories to get a list of the most recent packages available. Ensure yous accept a working Internet connection and access to the repositories. If you do not, End!
                  apt-become update
  2. The following command will completely remove chow-pc and grub-common. In GRUB 1.99 and later, grub-gfxpayload-lists will also be removed.

    • You lot volition be warned you are removing the bootloader. TAB to OK and press ENTER.

                  apt-get purge grub-common
  3. Reinstall Grub ii. When you run the following control:
    • Y'all volition be given the opportunity to add kernel options. TAB to OK. You volition be given the opportunity to select the devices/drives on which to install GRUB 2. Select the appropriate drive(s) with the SPACEBAR. Normally you lot do Non want to select whatever partitions. TAB to OK later selecting the drive(southward), and so press ENTER.
                  apt-get install grub-pc
  4. If using the ChRoot procedure, Exit chroot and then go on the ChRoot process at Step 13:

Mail service-Restoration Commands

In one case the user can boot to a working system, the post-obit commands may prove useful in locating and/or fixing the trouble.

  • To refresh the available devices and settings in /boot/chow/grub.cfg

    • sudo update-grub

    To expect for the bootloader location.
    • grub-probe -t device /kicking/grub

    To install Grub 2 to the sdX drive's MBR or kick sector (sda, sdb, etc.)

    • sudo grub-install /dev/sdX

Moving Chow ii

The command to alter the Grub two installation device or kicking files is grub-install run as root. This control allows the user to modify the installation by setting the ROOT directory, preload modules, run specific setup files and more than. When executed, grub-install may run one or more than other commands, such as chow-probe, chow-mkimage, and chow-setup. Here are some considerations when running chow-install:

  • The grub-install control should be used rather than grub-setup under normal circumstances. grub-setup volition be called by chow-install when needed.

  • The control should specify a device and when executed volition install the required Grub files to the location called for in the options.
    • If only the device is specified (sda, sdb, etc), the boot information volition be written to the specified device's boot tape. (example: sudo chow-install /dev/sda )

    • If the --boot-directory= switch is used, the chow binder will will become a subfolder of the location specified. The --boot-directory switch is available in Grub 1.99 and later.

  • If the user attempts to run the command with a specific partition (instance: sudo grub-install /dev/sda6 ) a alert will be issued. Specifying a partition is not recommended due to the use of blocklists, which the developers consider unreliable. An option is provided on how to override this recommendation if the user withal wishes to exercise and then.

  • The list of options available for chow-install can be displayed in a terminal with grub-install --help

  • An culling command to install or move Grub 2 from a particular device is to use the dpkg-reconfigure command. As the command runs, the user will be offered the opportunity to add kernel options on the outset folio and to specify the devices/drives on the second screen. Apply the TAB fundamental to highlight OK and printing ENTER to keep.

    • Add together the desired kernel options (such as 'noapic'), TAB to OK when finished, and press ENTER.

    • Select the bulldoze(s) with the SPACEBAR. It is not recommended to select any partition. TAB to OK when finished and press ENTER.

GRUB Legacy Upgrades and Downgrades

For information on how to switch from GRUB Legacy to GRUB 2, or from GRUB 2 to Grub Legacy, delight refer to the Grub2/Upgrading community documentation.


Grub2

Grub2/Submenus

Grub2/Upgrading

Boot-Repair

GNU Grub Transmission


CategoryBootAndPartition CategoryBootAndPartition

gonzaleswandrang.blogspot.com

Source: https://help.ubuntu.com/community/Grub2/Installing

Belum ada Komentar untuk "Lubuntu Install Error Attempting to Read or Write Outside of Disk 'hdd0'"

Posting Komentar

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel