LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 725|回复: 7

如何通过一块硬盘上的GRUB引导另一硬盘上的系统

[复制链接]
发表于 2005-5-28 15:57:54 | 显示全部楼层 |阅读模式
偶把原来的gurb.conf改了下
#####################################
timeout = 10
splashimage = (hd0,7)/boot/grub/splash.xpm.gz
default = 3
title Red Flag Desktop (2.4.26-1)
        root (hd0,7)
        kernel /boot/vmlinuz-2.4.26-1 ro root=LABEL=/1 vga=0x0F00 splash=silent
        initrd /boot/initrd-2.4.26-1.img
title Red Flag Desktop (Safe Mode)
        root (hd0,7)
        kernel /boot/vmlinuz-2.4.26-1 ro root=LABEL=/1 4
        initrd /boot/initrd-2.4.26-1.img
title Red Flag Desktop (Console Mode)
        root (hd0,7)
        kernel /boot/vmlinuz-2.4.26-1 ro root=LABEL=/1 3
        initrd /boot/initrd-2.4.26-1.img
title Windows XP
        rootnoverify (hd0,0)
        chainloader +1


#The boot menu for start system in hd1
title Red Hat Linux (2.4.20-8)
        root (hd1,6)
        kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
        initrd /boot/initrd-2.4.20-8.img
title Windows 2000
        rootnoverify (hd1,0)
        chainloader +1

##########################
启动硬盘也就是HD0上有RedFlag和WinXP两个系统,另外一硬盘HD1上有RedHat和Win2000两个系统,我改成上面的内容后,REDHAT可以引导,但WIN2000引导后还是有问题,不知道错在哪里?
REDHAT所在硬盘上的GRUB.CONF文件是这样的
# 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,6)
#          kernel /boot/vmlinuz-version ro root=/dev/hda7
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,6)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
        root (hd0,6)
        kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
        initrd /boot/initrd-2.4.20-8.img
title Windows
        rootnoverify (hd0,0)
        chainloader +1
 楼主| 发表于 2005-5-28 16:08:09 | 显示全部楼层
我就是不想每次都改BIOS设置引导顺序
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-28 18:34:57 | 显示全部楼层
搞定了,哈哈

#system start menu in hd1
title Red Hat Linux (2.4.20-8)
        root (hd1,6)
        kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
        initrd /boot/initrd-2.4.20-8.img

title Windows 2000
        root (hd1,0)
        chainloader +1
        map (hd0) (hd1)
        map (hd1) (hd0)
        makeactive



如何用grub引导非第一个硬盘上的windows系统?
如何用grub引导非第一个硬盘上的windows系统?
可以使用map命令来对调BIOS中定义的驱动器,比如:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)

这个才是关键
回复 支持 反对

使用道具 举报

发表于 2005-5-28 21:31:54 | 显示全部楼层
真是感谢!!
困扰我很长时间的问题,通过你的方法解决了
回复 支持 反对

使用道具 举报

发表于 2005-5-30 09:34:29 | 显示全部楼层
引导hd1的linux没问题吧?
回复 支持 反对

使用道具 举报

发表于 2005-5-30 09:35:00 | 显示全部楼层
引导hd1的linux没问题吧?我是想把启动权给hd1的grub
回复 支持 反对

使用道具 举报

发表于 2005-5-30 09:58:01 | 显示全部楼层
Post by genv
引导hd1的linux没问题吧?我是想把启动权给hd1的grub


还是要从bios里设置吧
grub从哪个盘启动与grub能够引导哪个盘不一样 。
回复 支持 反对

使用道具 举报

发表于 2005-5-31 15:00:31 | 显示全部楼层
我的意思是,我不改bios,让HD0上的GRUB启动,但是我的HD1还有一个GRUB,想在HD0上的GRUB里加一项启动HD1的GRUB。
可以用CONFIGUREFILE,但是效果不是我想像的那样
回复 支持 反对

使用道具 举报

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

本版积分规则

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