Give this a try if you are getting grub rescue:
- At grub>. enter these commands
find /boot/grub/stage1
This will return a location. If you have more than one, select the installation that you want to provide the grub files. - This is important: what was returned for the find command use it in the next line for the "?" -
root (hd?,?)
Again use the value from the find command i.e. if find returned(hd0,1)
then you would enterroot (hd0,1)
- Next enter the command to install grub to the mbr
setup (hd0)
- Finally exit the grub shell
quit
Now you are done. Reboot the machine.
Another option is to run this command:
grub-install /dev/hda
If you don't have grub rescue:
- Try booting from a live CD
- In case Live CD doesn't have package "grub" install it first (eg. sudo apt-get install grub)
- Take a look at your partition table: sudo fdisk -l
/dev/sda5 1276 1397 979902 82 Linux swap / Solaris
/dev/sda6 1398 2550 9261441 83 Linux - In this case grub should be installed on /dev/sda6 (in grub this is hd0,5).
NOTE: Every device in grub starts with "hd", even if it's a SATA device. - Type in the following in a shell:
- More infos can be found in this article.
sudo grub
grub > root (hd0,5)
grub > setup (hd0)
grub > quit
No comments:
Post a Comment