Re: Got grub> after new installation. What next?
re: grub-install;
According to the grub manual: The correct target for the --root-directory= switch is the mounted location of /boot, not the device name where it resides.
Unless you are running grub-install from another device other than your install, (i.e. liveCD or USB) the --root-directory= switch is not needed at all.
Examples:
Successfully (like Garth) you manually boot to your hard drive install, /boot resides on the same partition as /. The correct entry for grub-install is:
sudo grub-install /dev/sda
You have booted to the liveCD (or USB) and need to run grub-install. /boot resides on the same partition as /. You must create a mount-point, mount /, and then direct grub-install to it using the --root-directory= switch. Assuming your mount point is /mnt the correct command would be:
sudo grub-install --root-directory=/mnt /dev/sda
This second command would also be used if you are have booted a liveCD and /boot resides on a different partition than /. You must create a mount-point, mount /boot, and then direct grub-install to it using the --root-directory= switch. Assuming your mount point is /mnt the correct command would be the same as above.
I keep a separate grub partition and a backup and have six installs (give-or-take) and installers often do not behave as well as one might wish, so I am doing this frequently. In addition, two of my installs (sometimes up to four) reside on RAID0 devices that grub-update does not properly detect. So I also manually edit my grub.cfg as well.
I fully admit I have not attempted using the device as the target for the --root-directory switch, but I have never seen it documented or referred to prior to this post.
My comment regarding the Gparted LiveCD was in reference to grub only. It is not the proper utility to recover from grub issues. The latest and greatest disc for grub recovery would be Rescatux http://www.supergrubdisk.org/categor...atuxdownloads/
BTW: Check your device.map file and make sure /dev/sda is the only device listed.
re: grub-install;
According to the grub manual: The correct target for the --root-directory= switch is the mounted location of /boot, not the device name where it resides.
Unless you are running grub-install from another device other than your install, (i.e. liveCD or USB) the --root-directory= switch is not needed at all.
Examples:
Successfully (like Garth) you manually boot to your hard drive install, /boot resides on the same partition as /. The correct entry for grub-install is:
sudo grub-install /dev/sda
You have booted to the liveCD (or USB) and need to run grub-install. /boot resides on the same partition as /. You must create a mount-point, mount /, and then direct grub-install to it using the --root-directory= switch. Assuming your mount point is /mnt the correct command would be:
sudo grub-install --root-directory=/mnt /dev/sda
This second command would also be used if you are have booted a liveCD and /boot resides on a different partition than /. You must create a mount-point, mount /boot, and then direct grub-install to it using the --root-directory= switch. Assuming your mount point is /mnt the correct command would be the same as above.
I keep a separate grub partition and a backup and have six installs (give-or-take) and installers often do not behave as well as one might wish, so I am doing this frequently. In addition, two of my installs (sometimes up to four) reside on RAID0 devices that grub-update does not properly detect. So I also manually edit my grub.cfg as well.
I fully admit I have not attempted using the device as the target for the --root-directory switch, but I have never seen it documented or referred to prior to this post.
My comment regarding the Gparted LiveCD was in reference to grub only. It is not the proper utility to recover from grub issues. The latest and greatest disc for grub recovery would be Rescatux http://www.supergrubdisk.org/categor...atuxdownloads/
BTW: Check your device.map file and make sure /dev/sda is the only device listed.
Comment