输入:root (hd0,0) 回车 #注意root与(hd0,0) 之间必须要有空格
继续输入:setup (hd0) 回车 #注意root与(hd0) 之间必须要有空格
再次输入:quit 回车 #退出grub模式
最后输入:reboot #重启系统
拿出光盘,grub修复完毕,可以正常进入系统
备注:如果通过上面的操作还是无法正常进入系统
可以在
输入:chroot /mnt/sysimage 之后继续输入
vi /boot/grub/grub.conf #编辑,添加以下内容(CentOS 5.9为例)# grub.conf generated by anaconda## Note that you do not have to rerun grub after making changes to this file# NOTICE: You have a /boot partition. This means that# all kernel and initrd paths are relative to /boot/, eg.# root (hd0,0)# kernel /vmlinuz-version ro root=/dev/sda3# initrd /initrd-version.img#boot=/dev/sda1
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-348.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-348.el5 ro root=LABEL=/
initrd /initrd-2.6.18-348.el5.img
:wq! #保存退出
输入:quit 回车 #退出grub模式
输入:reboot #重启系统
一般都可修复成功,正常进入系统。