LinuxSir.cn,穿越时空的Linuxsir!

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

安装双linux系统和Windows XP 三个系统共存于一块硬盘

[复制链接]
发表于 2006-6-1 13:58:16 | 显示全部楼层 |阅读模式
安装双linux系统和Windows XP 三个系统共存于一块硬盘



                   我今天安装了最新推出的 FC5,在新建建分区时只建立了一个根分区,共用原来 Redhat 9.0 的 swap 分区 ,安装完后,原来的 Redhat 9.0 进不去了。我的解决办法如下:进入FC5以后,用 gedit 打开/boot/grub/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,12)#          kernel /boot/vmlinuz-version ro root=/dev/hda13#          initrd /boot/initrd-version.img#boot=/dev/hdadefault=0timeout=10splashimage=(hd0,12)/boot/grub/splash.xpm.gzhiddenmenutitle Fedora Core (2.6.15-1.2054_FC5)        root (hd0,12)        kernel /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=LABEL=/1 rhgb quiet        initrd /boot/initrd-2.6.15-1.2054_FC5.imgtitle Windows XP        rootnoverify (hd0,0)        chainloader +1再用fdisk命令查看我的磁盘情况,如下:[root@zeckey root]# fdisk -l Disk /dev/hda: 160.0 GB, 160041885696 bytes255 heads, 63 sectors/track, 19457 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes    Device Boot    Start       End    Blocks   Id  System/dev/hda1   *         1      1275  10241406    7  HPFS/NTFS/dev/hda3          1276     19457 146046915    f  Win95 Ext'd (LBA)/dev/hda5          1276      1288    104391    b  Win95 FAT32/dev/hda6          1289      3196  15325978+   b  Win95 FAT32/dev/hda7          3197      6281  24780231    b  Win95 FAT32/dev/hda8          6282     10743  35840983+   b  Win95 FAT32/dev/hda9         10744     14847  32965348+   b  Win95 FAT32/dev/hda10        14848     16172  10643031    b  Win95 FAT32/dev/hda11        17620     19330  13743576   83  Linux/dev/hda12        19331     19457   1020096   82  Linux swap/dev/hda13        16173     17619  11622996   83  Linux可以发现我的硬盘上只有三个linux分区,一个swap分区,另外两个就是FC5和Redhat 9.0了。为了能够进Redhat 9.0,只需在 /boot/grub/grub.conf 文件中添加上Redhat 9.0的起动路径就行了。修改/boot/grub/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,12)#          kernel /boot/vmlinuz-version ro root=/dev/hda13#          initrd /boot/initrd-version.img#boot=/dev/hdadefault=0timeout=10splashimage=(hd0,12)/boot/grub/splash.xpm.gzhiddenmenutitle Fedora Core (2.6.15-1.2054_FC5)        root (hd0,12)        kernel /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=LABEL=/1 rhgb quiet        initrd /boot/initrd-2.6.15-1.2054_FC5.imgtitle Red Hat Linux 9.0 (2.4.20-8)        root (hd0,10)        kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/        initrd /boot/initrd-2.4.20-8.imgtitle Windows XP        rootnoverify (hd0,0)        chainloader +1说明:“title Red Hat Linux 9.0 (2.4.20-8)” 这里是在起动时 grub 界面上显示的标题。“root (hd0,10) ”表示我的电脑上第一块硬盘,第11个分区,比实际数字小一。这是要特别注意的地方。就像上面看到的 “/dev/hda11        17620     19330  13743576   83  Linux ”这一项。"kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/" "initrd /boot/initrd-2.4.20-8.img"  这两项表示Redhat 9.0的起动文件和内核映象文件。我在修改中遇到的问题:开始时我修改的是这样的:title Red Hat Linux (2.4.20-8)    root (hd0,10)    kernel /vmlinuz-2.4.20-8 ro root=LABEL=/    initrd /initrd-2.4.20-8.img结果起动时找不到,这是因为我在安装Redhat9.0时 ,新建建分区时没有选择新建 /boot 分区,只建了一个swap分区和根分区 / ,所以我的 kernel 和 initrd 都在/boot下。当然不在根分区下,所以就找不到。*************************************************************************** Name    : 安装双linux系统和Windows XP 三个系统共存于一块硬盘** Author  :魏自立 ** Date    :2006/03/28** Email   : zieckey@yahoo.com.cn** All right reserved.** 本文可以自由转载,但请不要去掉版权信息,也不要用于商业用途 *************************************************************************
发表于 2006-6-1 14:13:01 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2006-6-1 17:15:57 | 显示全部楼层
什么东西乱七八糟的?我都装了4个系统在我的同一个硬盘上了,三个发行版和一个xp系统。
回复 支持 反对

使用道具 举报

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

本版积分规则

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