修复GRUB引导故障
方法一:手动输入将grub.conf文件备份后重命名为grub.conf.bak,重启
[root@localhost ~]# mount /dev/sdb1 /shiyan/
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 12G 3.4G 7.9G 31% /
tmpfs 1004M 72K 1004M 1% /dev/shm
/dev/sda1 194M 34M 151M 19% /boot
/dev/sdb1 20G 44M 19G 1% /shiyan
[root@localhost ~]# cd /boot/grub/
[root@localhost grub]# ls
device.map fat_stage1_5 grub.conf jfs_stage1_5 minix_stage1_5 splash.xpm.gz stage2 vstafs_stage1_5
e2fs_stage1_5 ffs_stage1_5 iso9660_stage1_5 menu.lst reiserfs_stage1_5 stage1 ufs2_stage1_5 xfs_stage1_5
[root@localhost grub]# mv grub.conf grub.conf.bak
[root@localhost grub]# ls
device.map fat_stage1_5 grub.conf.bak jfs_stage1_5 minix_stage1_5 splash.xpm.gz stage2 vstafs_stage1_5
e2fs_stage1_5 ffs_stage1_5 iso9660_stage1_5 menu.lst reiserfs_stage1_5 stage1 ufs2_stage1_5 xfs_stage1_5
[root@localhost grub]#
[root@localhost grub]# reboot
引导停溜,出现”grub>”提示符
grub引导报错
进行手动输入,注意:内核的信息无法tab补全,需查看之前备份
手动修改配置文件
注意:第二行root=后面的东西不确定,需要看你本地服务器里面是什么在 照着打就不会有错。
单用户输入命令修复
重启完,就会进入系统,进入系统也是临时进入重启还是需要手动输入。
进入系统
进入到系统后修改grub.conf文件
[root@localhost ~]# cd /boot/grub/
[root@localhost grub]# ls
device.map fat_stage1_5 grub.conf.bak jfs_stage1_5 minix_stage1_5 splash.xpm.gz stage2 vstafs_stage1_5
e2fs_stage1_5 ffs_stage1_5 iso9660_stage1_5 menu.lst reiserfs_stage1_5 stage1 ufs2_stage1_5 xfs_stage1_5
[root@localhost grub]# mv grub.conf.bak grub.conf
[root@localhost ~]# ls /boot/grub/ | grep "gru*"
修改完配置文件在重启就会直接进入系统。