红联Linux门户
Linux帮助

怎么找回我的GRUB啊

发布时间:2007-09-25 13:01:20来源:红联作者:ricolee
兄弟们好,本来不想发这贴的,但是在网上找了很久,不是没找到,而是找到的用在我这都不对啊

我是XP+UBUNTU 前些日子在用xp时中毒了,所以就重新安装了,之后MBR把GRUB覆盖并且不能引导UBUNTU了。我不是没有准备,事先找了资料预防,可是之后当我按着帖子说的做的时候就出问题了。

帖子上写用LIVE CD引导,进到CD上的UBUNTU之后
sudo grub
find /boot/grub/stage1 返回 hd0,8
root(hd0, 8)
setup(hd0)
quit
重启后就出现了,可我在root(hd0,8)时就返回error27 命令不能识别的对话,找了其他方法在这里都是error 27 ,这是怎么回事啊,证明才能把我的GRUB 找回来引导ubuntu 呢

谢谢各位了 !!!
文章评论

共有 11 条评论

  1. gxf 于 2007-09-25 21:22:06发表:

    楼上正解

  2. beyondfly 于 2007-09-25 19:50:21发表:

    可我在root(hd0,8)时就返回error27 命令不能识别的对话
    重启XP之后,盘符改变了,你也要相应的变化

  3. tusheng 于 2007-09-25 18:37:07发表:

    那个连接还没解决呢

  4. tianyamingyue 于 2007-09-25 17:41:04发表:

    详细方法:http://www.stillfar.org/blog/article.asp?id=101

  5. tusheng 于 2007-09-25 16:57:02发表:

    有看我5楼的帖子吗?

    错误27,请提供具体的信息,很难用错误号找错误原因的

  6. ricolee 于 2007-09-25 15:53:10发表:

    当然有空格拉,就是这么做的,我在root(hdx,y)时就返回 错误27 ,这是怎么回事啊

  7. tusheng 于 2007-09-25 14:54:19发表:

    锟斤拷锟斤拷:
    原帖由 eometry 于 2007-9-25 14:51 发表
      用ubuntu的live cd进行GRUB修复工作。

      #sudo grub
      #find /boot/grub/stage1

      上面的命令会返回一个值(hd?,?)
      #root (hd?,?)
      #setup(hd0)

      以上命令执行完毕之后推出
      ...

    奇怪了,楼主的命令和你一样,怎么就失败了。难道楼主没有在命令上空格吗?

  8. eometry 于 2007-09-25 14:51:05发表:

      用ubuntu的live cd进行GRUB修复工作。

      #sudo grub
      #find /boot/grub/stage1

      上面的命令会返回一个值(hd?,?)
      #root (hd?,?)
      #setup(hd0)

      以上命令执行完毕之后推出
      #quit

      然后重启你的计算机

      这个有效,我朋友用了说可行

  9. tusheng 于 2007-09-25 14:24:57发表:

    ubuntu的分区顺序,并不严谨。
    看下我下个楼的转帖

    [ 本帖最后由 tusheng 于 2007-9-25 14:42 编辑 ]

  10. sgx 于 2007-09-25 14:18:56发表:

    用光盘引导进入命令行,挂载boot目录所在的分区到/mnt
    chroot /mnt
    grub-install /dev/hda
    或者
    grub-install /dev/sda
    试试

    [ 本帖最后由 sgx 于 2007-9-25 14:22 编辑 ]

  11. gxf 于 2007-09-25 13:03:20发表:

    【转论坛一贴】

    Fedora 7为例GRUB菜单修复

    硬盘分区:C盘XP、D盘工具、E盘备份、随后是ETX3和SWAP交换区

    步骤一、下载GRUB4DOS于C盘根目录。

    步骤二、使用explore2fs软件导出LINUX分区下的GRUB.CONF(BOOT/GRUB)。

    我的内容如下:
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You do not have a /boot partition. This means that
    # all kernel and initrd paths are relative to /, eg.
    # root (hd0,7)
    # kernel /boot/vmlinuz-version ro root=/dev/sda8
    # initrd /boot/initrd-version.img
    #boot=/dev/sda
    default=1
    timeout=5
    splashimage=(hd0,7)/boot/grub/splash.xpm.gz
    hiddenmenu
    title Fedora (2.6.22.5-76.fc7)
    root (hd0,7)
    kernel /boot/vmlinuz-2.6.22.5-76.fc7 ro root=LABEL=/ rhgb quiet
    initrd /boot/initrd-2.6.22.5-76.fc7.img
    title Fedora (2.6.20-2931.fc7xen)
    root (hd0,7)
    kernel /boot/xen.gz-2.6.20-2931.fc7
    module /boot/vmlinuz-2.6.20-2931.fc7xen ro root=LABEL=/ rhgb quiet
    module /boot/initrd-2.6.20-2931.fc7xen.img
    title Fedora (2.6.22.4-65.fc7)
    root (hd0,7)
    kernel /boot/vmlinuz-2.6.22.4-65.fc7 ro root=LABEL=/ rhgb quiet
    initrd /boot/initrd-2.6.22.4-65.fc7.img
    title Fedora (2.6.20-2925.9.fc7xen)
    root (hd0,7)
    kernel /boot/xen.gz-2.6.20-2925.9.fc7
    module /boot/vmlinuz-2.6.20-2925.9.fc7xen ro root=LABEL=/ rhgb quiet
    module /boot/initrd-2.6.20-2925.9.fc7xen.img
    title WinXP
    rootnoverify (hd0,0)
    chainloader +1

    找出最新的内核版本号为Fedora (2.6.22.4-65.fc7)位于(hd0,7)

    步骤三、编辑位于C盘根目录下的MENU.LST文件。内容如下:
    default 0
    timeout 1
    color cyan/blue white/blue
    title Fedora (2.6.22.4-65.fc7)
    root (hd0,7)
    kernel /boot/vmlinuz-2.6.22.4-65.fc7 ro root=LABEL=/ rhgb quiet
    initrd /boot/initrd-2.6.22.4-65.fc7.img
    boot

    如果需要其他的内核版本,相应的添加即可。

    步骤四、编辑C盘根目录下的BOOT.INI文件。内容如下:
    [boot loader]
    timeout=5
    default=C:\grldr
    [operating systems]
    C:\grldr=Fedora (2.6.22.4-65.fc7)
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="DeepinXP V5.7" /noexecute=optin /fastdetect

    重起即可进入FEDORA和XP双菜单启动了

    注意事项
    1、注意找准内核版本号
    2、找准内核存放的硬盘分区。