本帖最後由 角色 於 2010-8-8 19:50 編輯
如果你的MBR出现问题,那么你可以用某一个系统的GRUB,然后执行下面的命令:
假如我想MBR指向/dev/sda8, 那么在GRUB里就是(hd0,7), hd0是指第一hard drive
#grub
grub > device (hd0) /dev/sda
grub > root (hd0,7)
grub > setup (hd0)
grub > quit
上面的方法只适合GRUB Legacy的boot loader,而GRUB 2.0的就不可以,例子有最新的Ubuntu 10.04。
怎样才能重新启动Ubuntu 10.04的partition呢?
我们可以用GRUB4DOS,加入下面菜单:
title grub2
find --set-root /boot/grub/core.img
kernel /boot/grub/core.img
然后重新启动USB flash drive,然后选grub2,那么你就可以进入有GRUB 2的program里,如Ubuntu。
当系统boot up完后,我们可以用下面指令来改变MBR
sudo grub-install /dev/sda
有或者我们在GRUB4DOS commandline mode
grub > find --set-root /boot/grub/core.img
grub > kernel /boot/grub/core.img
grub > boot
然后就进入那个GRUB2的partition里,然后我们用
sudo grub-install /dev/sda
把/dev/sda的MBR指向有GRUB2的partition。 |