如何解决The file /boot/grub/stage1 not read cor

本篇内容主要讲解“如何解决The file /boot/grub/stage1 not read cor”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“如何解决The file /boot/grub/stage1 not read cor”吧!


首先要挂载原来的/分区

sudo mkdir /mnt/root
sudo mount /dev/sda7 /mnt/root
sudo mount -t proc none /mnt/root/proc
sudo mount -o bind /dev /mnt/root/dev

如果不知道/分区的设备名称,可以使用sudo fdisk -l 查看。

使用chroot进入原来的/分区

chroot /mnt/root /bin/bash
source /etc/profile

恢复grub

sudo grub-install --no-floppy /dev/sda

失败,提示“The file /boot/grub/stage1 not read correctly”

从网上搜索了一下相关的文章,发现是分区有变化引起的,跟文件fstab和mtab有关。

编辑/etc/mtab发现/的分区设备不对,修改对后,重新运行

grub-install /dev/sda成功。

重启后进入grub,选择linux,结果发现找不到分区,用e编辑grub选项,将root改成正确的分区设备即可。

然后输入b命令启动。在重启前修改menu.lst的话,就不会出现这个问题了。
 

到此,相信大家对“如何解决The file /boot/grub/stage1 not read cor”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!