CentOS修复grub

grub启动项损坏无法进入系统。

进入grub模式(可借助安排盘rescue后在shell中输入grub)。

一:
    通过下面三个命令中的一个。找到正确的grub位置。
    1. find /boot/grub/stage1
    2. find /grub/stage1
    3. find /stage1
如返回(hd1,2)

二:
    依次运行
    root (hd1,2)    #此处使用前面找到的返回值
    setup (hd1)
    reboot

然后在shell中改动 /etc/grub.conf 中的 root (hdx,y) 的一行中改动为 root (hd1,2)

重新启动就可以。

原文地址:https://www.cnblogs.com/gcczhongduan/p/5333082.html