版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。 http://allenyu.blog.51cto.com/193668/145064
先说说我的分区情况,电脑上装的是2块40G的硬盘,以前在第一块安装了windows2003,现在是在第二块硬盘上安装RHEL5
看一下分区情况
因C,D盘都是NTFS,而从硬盘安装需要FAT32分区,所以在第2块硬盘上拿出部分使用。
下面开始正式安装:
使用GRUB引导工具(适用版本:Fedora Core及Red Hat Enterprise Linux各个版本)
1.从第一个ISO/isolinux目录中提取vmlinuz和initrd.img文件放于FAT或FAT32的分区内(设为E:/)
2.将所有.iso文件放到同一目录下(如E:/)
3.下载Grub4DOS,解压,提取里面的grldr文件,放于C:根目录下
4.修改C:/boot.ini,在最后一行加入C:\grldr="GRUB"
5.重启,选择“GRUB”启动菜单,进入GRUB
6.依次输入:
>kernel (hd1,0)/vmlinuz root=/dev/hdb1     注:(hd1,0)表示第二个硬盘的第1个分 区,即E:/root分区在第二个硬盘的第2个主分区上。
>initrd (hd1,0)/initrd.img
>boot
7开始安装。
 
OK,安装结束,重起,发现在GRUB引导器中只有RHEL5,没有先前的windows2003了。
当然,在进去GRUB引导器的时候,按“ESC”或者“CTRL+D”,可以多一个选择项“other”,选择点击进入,发现原来windows藏这里,那怎么样才能就显示在GRUB引导器中供我们选择呢?
我们重起进入RHEL5,编辑下面的文件/boot/grub/menu.lst
# 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 (hd1,1)
#          kernel /vmlinuz-version ro root=/dev/hdd3
#          initrd /initrd-version.img
#boot=/dev/hdc
default=0
timeout=5
splashp_w_picpath=(hd1,1)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-92.el5xen)
        root (hd1,1)
        kernel /xen.gz-2.6.18-92.el5
        module /vmlinuz-2.6.18-92.el5xen ro root=LABEL=/ rhgb quiet
        module /initrd-2.6.18-92.el5xen.img
title Other
        rootnoverify (hd0,0)
        chainloader +1
说明:
default=0 是默认启动哪个系统,从0开始;每个操作系统的启动的定义都从title开始的,第一个title 在GRUB的启动菜单上显示为0,第二个启动为1,以此类推;
timeout=5 表示在开机后,GRUB画面出现几秒后开始以默认启动;
#splashp_w_picpath=(hd0,6)/boot/grub/splash.xpm.gz 注:GRUB的背景画面,这个是可选项;我不喜欢GRUB的背景画面,所以加#号注掉,也可以删除;
hiddenmenu 隐藏GRUB的启动菜单,这项也是可选的,也可以用#号注掉;我们这里没有注释掉了,所以启动的时候只有一项。
下面的一个title代表一个系统,后面跟的名字就是在GRUB引导器中显示的名字。
下面是修改好的文件
# 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 (hd1,1)
#          kernel /vmlinuz-version ro root=/dev/hdd3
#          initrd /initrd-version.img
#boot=/dev/hdc
default=0
timeout=5
splashp_w_picpath=(hd1,1)/grub/splash.xpm.gz
#hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-92.el5xen)
        root (hd1,1)
        kernel /xen.gz-2.6.18-92.el5
        module /vmlinuz-2.6.18-92.el5xen ro root=LABEL=/ rhgb quiet
        module /initrd-2.6.18-92.el5xen.img
title Windows 2003
        rootnoverify (hd0,0)
        chainloader +1
保存,重起后,可以自由进入2个系统了。
以上是我双硬盘安装双系统的一些心得。
本文出自 “ allen的学习笔记” 博客,请务必保留此出处 http://allenyu.blog.51cto.com/193668/145064