当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > 出现The file /boot/grub/stage1 not read cor 解决办法

Unix/Linux
Creating a OpenBSD 3.5 bootable CD
解决Fatal error: Call to undefined function: preg_match()
[工具 使用 原创] ls可以是彩色的,df也可以是彩色的
ipfilter+squid配置实例
UNIX痛恨者手册
postfix+ldap+sasl2+courier-imap for freebsd完全ports
硬盘、分区引导和操作系统加载程序
Unix/Linux下的“魔法兔仔”, webmin
solaris10 apache2 的问题
解决启动DHCP客户端时,出现unknown 主机名称的方法
A1000的电池用完了会有什么严重后果
Solaris 2.6+Ultra5内置扬声器故障诊断实例
各种shell下文件名补全功能的使用
民工日记--- We sell dream
让你的终端同时支持中文和 PP 的背景(转载收藏)
民工日记 --不变的变化
配置Solaris上网
民工日记--不鼓励也不反对
Solaris Security Toolkit 4.2
民工日记--无奈

Unix/Linux 中的 出现The file /boot/grub/stage1 not read cor 解决办法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-15   浏览: 157 ::
收藏到网摘: n/a

重装了操作系统,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的话,就不会出现这个问题了。