grub rescue问题解决

来源:互联网 发布:淘宝店哪个店佛珠好 编辑:程序博客网 时间:2024/06/14 13:42
电脑在win7的系统上安装了Ubuntu之后,之前是可以正常启动,但是使用过程中总会因为系统分区的问题导致无法启动而出现
error: file '/boot/grub/i386-pc/normal.mod' not found 或者是error: file '/grub/i386-pc/normal.mod' not found
grub rescue>
这个时候只需要重新设置一下root 和prefix,在使用insmod 模块就可以了
步骤如下:
首先直接输入ls 命令
会出现(hd0) (hd0,msdos11) (hd0,msdos10) (hd0,msdos9) (hd0,msdos8) (hd0,msdos7) (hd0,msdos6) (hd0,msdos5) (hd0,msdos1) 
这些都是代表每个分区,每个电脑编号都会不一样
然后就需要找到安装了linux(ubuntu)的分区,只能一个个去尝试
直接输入 ls (hd0,msdos11)/boot/grub 或者ls (hd0.msdos11)/grub
直到显示 ./ ../ ……i386-pc/ ……等信息为止,
然后就可以输入命令:
set root=(hd0,msdos11)/boot/grub 或set root=(hd0,msdos11)/grub
set prefix=(hd0,msdos11)/boot/grub 或 set prefix=(hd0,msdos11)/grub
insmod normal
normal 
进入系统后执行下列命令:

root@wuyun:~# update-grub                         /* 更新重建grub.cfg grub配置文件 */

root@wuyun:~# grub-install /dev/sda               /* 重建grub到第一硬盘mbr */

转载自:http://a.th7.cn/?l=3&ref=www_iphone&order=3&dict=22&tj=www_normal_3_0_10_title&cltj=cloud_title&src=http%3A%2F%2Fwww.th7.cn%2Fsystem%2Flin%2F201408%2F66394.shtml
0 0