频道栏目
首页 > 资讯 > Linux > 正文

提示“i386-pc/normal.mod not found” ,centos7 卡在 grub rescue 无法开机

17-08-19        来源:[db:作者]  
收藏   我要投稿

安装完 CentOS 7后,修改硬盘分区后,系统重启后,无法正常启动,进入 grub rescue 模式;

网上大多数 centos grub rescue 的资料应该是 Centos 7 之前的,其中提到的命令很多使用的目录是 grub,而在 7 中,这里应该替换成 grub2 ;

另外 normal.mod 的目录也有变化。特别要注意

1)首先找到centos 的boot是装在那个分区中;

1. 先使用ls命令

在 grub rescue>下输入以下命令:ls,会罗列所有的磁盘分区信息,比方说:
-->(hd0,1),(hd0,5),(hd0,3),(hd0,2)

2. 然后依次调用如下命令: X 表示各个分区号码

如果/boot没有单独分区,用以下命令:
ls (hd0,X)/boot/grub2

如果/boot单独分区,则用下列命令:
ls (hd0,X)/grub2

例如:
grub rescue> ls (hd0,msdos2)/grub2

会有如下的输出:
--> -grub2 grub grub.cfg i386-pc ...

2)设置临时分区以启动 centos

// 找到 /boot 分区位置
grub rescue> ls (hd0,msdos2)/grub2
--> grub2 grub grub.cfg i386-pc ...

// 临时重置grub位置为当前分区
grub rescue> set root=hd0,msdos2

grub rescue> set prefix=(hd0,msdos2)/grub2

grub rescue> insmod (hd0,msdos2)/grub2/i386-pc/normal.mod

// 加载 normal 模块
grub rescue> normal // 调用normal模块

3)重新安装 grub 到 sda

这时就出现了 grub 引导菜单,选择进入 CentOS7 系统

登录
login:root
passwd:*****

# cd /sbin

// 重新安装 grub 到 sdb, 根据 ls /dev/sd* 的结果,替换成你自己的硬盘
# grub2-install --boot-directory=/boot /dev/sdb

--> grub2-install completed, No Error occured.

# reboot

本文转载自:http://blog.csdn.net/junglefly/article/details/51325393

相关TAG标签
上一篇:她生活创始人:我成不了咪蒙,但你们还有机会…
下一篇:【Web前端开发】之Bootstrap基础(一)
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站