grub 启动错误 "file not found"

刚安装ubuntu 14.4 竟然出现这么尴尬的事,ubuntu 行不行?

幸好还是能从u盘启动后,转到硬盘。

然后在网上找到了解决方法。

http://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows


Boot from the live CD or live USB, in "Try Ubuntu" mode.
Determine the partition number of your main partition. GParted (which should already be installed, by default, on the live session) can help you here. I'm going to assume in this answer that it's /dev/sda2, but make sure you use the correct partition number for your system!

Mount your partition:

sudo mount /dev/sda2 /mnt #Replace sda2 with your partition number

 

Bind mount some other necessary stuff:

for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done

 

chroot into your Ubuntu install:

sudo chroot /mnt

 

At this point, you're in your install, not the live session, and running as root. Update grub:

update-grub

 

If you get errors, go to step 7. (Otherwise, it is optional.)

Depending on your situation, you might have to reinstall grub:

grub-install /dev/sda
update-grub # I'm not sure if this is necessary, but it doesn't hurt.

 

If everything worked without errors, then you're all set:

exit
sudo reboot

 

At this point, you should be able to boot normally.

 

posted @ 2016-01-26 02:31  johnsonshu  阅读(1017)  评论(0编辑  收藏  举报