首页 > 网络科技 > The file /boot/grub/stage1 not read cor 解决办法

The file /boot/grub/stage1 not read cor 解决办法

来源:好再见网 2008-09-03 13:42:58

  前天重装了操作系统,grub也随之被覆盖,为了恢复启动,我拿了一张ubuntu的live cd启动,进入linux后,进入命令行恢复grub。
首先要挂载原来的/分区
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的话,就不会出现这个问题了。
 

本文标签:

分享:

扫一扫在手机阅读、分享本文