文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>安装双linux系统和Windows XP 三个系统共存于一块硬盘

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

时间:2006-03-28  来源:zieckey

       作者:zieckey (zieckey@yahoo.com.cn)
    All Rights Reserved!

我今天安装了最新推出的 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/hda
default=0
timeout=10
splashimage=(hd0,12)/boot/grub/splash.xpm.gz
hiddenmenu
title 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.img
title Windows XP
        rootnoverify (hd0,0)
        chainloader +1

再用fdisk命令查看我的磁盘情况,如下:
[root@zeckey root]# fdisk -l
 
Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = 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/hda
default=0
timeout=10
splashimage=(hd0,12)/boot/grub/splash.xpm.gz
hiddenmenu
title 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.img
title 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.img
title 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下。
当然不在根分区下,所以就找不到。

 

相关阅读 更多 +
排行榜 更多 +
动物大战僵尸I

动物大战僵尸I

飞行射击 下载
龙兽争霸无限零件图纸

龙兽争霸无限零件图纸

飞行射击 下载
金属战士2最新版

金属战士2最新版

飞行射击 下载