现在讲下我前段时间碰到的一个问题:前阵子我硬盘分区失误,导致系统启动时自动进入rescue模式。
此问题还需要分类解决,这里只介绍boot没有独立分区(包含在/下)的情况下如何解决。
grub rescue>set
grub rescue>prefix=(hd?,?)/grub
grub rescue>root=hd?,?
grub rescue>set root=hd?,?
grub rescue>set prefix=(hd?,?)/boot/grub
grub rescue>set
grub rescue>root=hd?,?
grub rescue>prefix=(hd?,?)/boot/grub
grub rescue>insmod /boot/grub/normal.mod
grub rescue>normal
这时,你应该能看到boot菜单,进入linux,打开终端。
输入两行命令:
1:sudo update-grub
2:sudo grub-install /dev/sda
OK