QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 543|回复: 3

grub被盖,无法引导了!!

[复制链接]
发表于 2004-4-7 22:57:07 | 显示全部楼层 |阅读模式
mbr好像被覆盖

我能用软盘引导进入系统

但是怎么通过
命令 回复grub的引导呢?
发表于 2004-4-7 23:08:50 | 显示全部楼层
http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&t=60934
本版精华。

既然还能进入,直接在终端grub-install /dev/hda应该就可以。
回复

使用道具 举报

发表于 2004-4-7 23:09:03 | 显示全部楼层
软盘起动后,执行grub.
grub>
我们就可以在这样的字符后面,输入
grub>root (hdX,Y)
grub>setup (hd0)
如果成功会有一个successful......
这里的X,如果是一个盘,就是0,如果你所安装的linux的根分区在第二个硬盘上,那X就是1了;Y,就是装有linux系统所在的根分区。 setup (hd0)就是把GRUB写到硬盘的MBR上。
回复

使用道具 举报

发表于 2004-4-7 23:18:22 | 显示全部楼层
# 用Linux的安装盘的第一张盘引导系统
# 输入linux rescue,接着按提示选择语言、键盘等,最后进入SHELL界面
# chroot /mnt/sysimage

切换到硬盘上已经安装好的linux的根上去
# grub-install /dev/hda

将grub的引导程序重新写到MBR上去.
# 重新起动linux
# 在配置文件/boot/grub/grub.conf中添加windows的起动信息
可以参考如下配置文件

            # grub.conf generated by anaconda
        #
        # Note that you do not have to rerun grub after making changes to this file
        # NOTICE:  You have a /boot partition.  This means that
        #          all kernel and initrd paths are relative to /boot/, eg.
        #          root (hd0,0)
        #          kernel /vmlinuz-version ro root=/dev/hda2
        #          initrd /initrd-version.img
        #boot=/dev/hda
        default=0
        timeout=10
        splashimage=(hd0,0)/grub/splash.xpm.gz
        title Red Hat Linux (2.4.20-
                root (hd0,0)
                kernel /vmlinuz-2.4.20-8 ro root=LABEL=/12
                initrd /initrd-2.4.20-8.img

        title Windows XP
                rootnoverify (hd0,2)
                chainloader +1
   

# 重新起动机器, 就可以看到可以选择两个操作系统
细节可以参考grub的资料
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-29 15:28 , Processed in 0.052423 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表