1.9 KiB
layout | status | published | title | author | wordpress_id | wordpress_url | date | date_gmt | categories | tags |
---|---|---|---|---|---|---|---|---|---|---|
post | publish | true | Linux 101: grub recovery | [{display_name } {login } {email } {url }] | 518 | http://blog.10ninox.com/2009/03/18/linux-101-grub-recovery/ | 2009-03-18 14:41:40 +0700 | 2009-03-18 19:41:40 +0700 | [linux] | [grub 101] |
When you messed with many OSs, boot strap loader might point to somewhere you don’t want it to be. grub considering the best – easiest? – to deal with many OSs and of course, it’s easy to tweak or adjust as well.
Firstly get into any sort of shell. There are basically 2 parts needed to be done: set active partition and set MBR back to point at grub again. The first part is fdisk, there is ‘m’ for help. All you have to do is set the partition where grub is to active. Others are not.
The second part: set MBR point back to grub. That’s easy via grub command shell
The easiest way to find partition referenced by grub is to find it
find /boot/grub/menu.lst
Then you have to set toot and setup the hard drive. Then you are all set. For grub menu, Linux needs
Title XXX
root (hd0,0)
kernal /boot/vmlinuz root=/dev/…bla bla bla
initrd /boot/initrd
For Windows, you just need to link to Windows boot loader again.
Title Windows XX
rootnoverify (hd0,0)
chainloader (hd0,1)+1 # this is Windows partition.
That’s all you have to do. pretty easy, right?