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.

 

转载于:https://www.cnblogs.com/johnsonshu/p/5159194.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值