方法1:
用光盘引导进去再重装Grub。选择"Try Ubuntu",将根分区mount在一个目录下,使用grub-install.
sudo mount /dev/sdaX /mnt/root
sudo mount --rbind /dev /mnt/root/dev
sudo chroot /mnt/root grub-install /dev/sda
如果没有第二行,就会出错:
/usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?)
If there is such error:
root@ubuntu:/mnt/dst-root# chroot /mnt/dst-root/ grub-install /dev/sdb
/proc/devices: fopen failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
Is device-mapper driver missing from kernel?
/proc/devices: fopen failed: No such file or directory
Failed to set up list of device-mapper major numbers
/proc/devices: fopen failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
Is device-mapper driver missing from kernel?
/proc/devices: fopen failed: No such file or directory
Failed to set up list of device-mapper major numbers
/proc/devices: fopen failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
Is device-mapper driver missing from kernel?
/proc/devices: fopen failed: No such file or directory
Failed to set up list of device-mapper major numbers
/proc/devices: fopen failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
Installation finished. No error reported.
root@ubuntu:/mnt/dst-root# echo $?
Try to use the command also:
mount --rbind /proc /mnt/root/proc
Error 3:
/dev/root: Not found or not a block device.
ubuntu@ubuntu:~$ !76
sudo chroot /mnt/dst grub-install /dev/sda
/dev/root: Not found or not a block device.
ubuntu@ubuntu:~$ cd /dev
root@ubuntu:/dev# ll root
ls: cannot access root: No such file or directory
root@ubuntu:/dev# ln -snf sda7 root
root@ubuntu:/dev# ll root
lrwxrwxrwx 1 root root 4 2012-10-28 14:30 root -> sda7
root@ubuntu:/dev# chroot /mnt/dst grub-install /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb
root@ubuntu:/dev# cat /mnt/dst/boot/grub/device.map
(fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb
Solution is link /dev/root to ROOT partition.
There's a great guide on Grub errors: http://www.gentoo.org/doc/en/grub-error-guide.xml, however it doesn't have the solution to Error 3.
I found error 3 solution on:
http://forums.gentoo.org/viewtopic-t-886224-start-0.html
方法2:
装Grub4dos直接在windows下引导。