youxiazhu 发表于 2005-7-5 08:08:45

奇怪,硬盘换了个口,居然还能启动!

我的机子上装了rh9和rf4,使用rh9的grub作引导,昨天我把硬盘线换了一下,(后来才发现,硬盘设备名从原来的hda变成了hdb),今天启动rh9没问题,只是fstab中设定的挂载没有成功.发现问题后,我试着启动红旗,出现启动界面后就停住了,这是怎么回事?

grub.conf中是从hd0中引导,为什么现在rh9还能引导,rf4也能出现启动界面呢?
# 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/hda8
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,7)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8smp)
        root (hd0,7)
        kernel /boot/vmlinuz-2.4.20-8smp ro root=LABEL=/
        initrd /boot/initrd-2.4.20-8smp.img
title Red Hat Linux-up (2.4.20-8)
        root (hd0,7)
        kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/
        initrd /boot/initrd-2.4.20-8.img
title Windows2003 server
        rootnoverify (hd0,0)
        chainloader +1
title Red Flag Linux (2.4.20-8smp)
        root (hd0,9)
        kernel /boot/vmlinuz-2.4.20-8smp ro root=/dev/hda10 vga=785 console=/dev/null CONSOLE=/dev/tty2
        initrd /boot/initrd-2.4.20-8smp.img
title Red Flag Linux (Safe Mode)
        root (hd0,9)
        kernel /boot/vmlinuz-2.4.20-8smp root=/dev/hda10 4
        initrd /boot/initrd-2.4.20-8smp.img
title Red Flag Linux (Console Mode)
        root (hd0,9)
        kernel /boot/vmlinuz-2.4.20-8smp root=/dev/hda10 3
        initrd /boot/initrd-2.4.20-8smp.img
title Red Flag Linux-up (2.4.20-8)
        root (hd0,9)
        kernel /boot/vmlinuz-2.4.20-8 ro root=/dev/hda10 vga=785 console=/dev/null CONSOLE=/dev/tty2 acpi=off
        initrd /boot/initrd-2.4.20-8.img
title Red Flag Linux-up (Safe Mode)
        root (hd0,9)
        kernel /boot/vmlinuz-2.4.20-8 root=/dev/hda10 acpi=off 4
        initrd /boot/initrd-2.4.20-8.img
title Red Flag Linux-up (Console Mode)
        root (hd0,9)
        kernel /boot/vmlinuz-2.4.20-8 root=/dev/hda10 acpi=off 3
        initrd /boot/initrd-2.4.20-8.img

月下刀客 发表于 2005-7-5 08:47:14

将redflag里的hda改成hdb行不?

zongyongchun 发表于 2005-7-5 09:49:26

是说这个 root=LABEL=/

还是说这个 (hd0,7)

grub里的hd0是指第一个hd,还是指/dev/hda,

如果红旗停留在grub阶段,那就是hd0的问题,如果是停留在loading kernel的阶段,

那就是fstab里root=LABEL=/的问题.

月下刀客 发表于 2005-7-5 09:56:36


root=/dev/hda10

改成root=/dev/hdb10

说明:
hd0是指第一块硬盘。如果机器里只有一块硬盘,无论放在那一个接口,都是hd0

而hda则专指第一个IDE的主盘接口。

如果有两个硬盘,则bios里设置的启动当前盘为hd0,另一个为hd1。也就是它所指是不固定的。

youxiazhu 发表于 2005-7-5 11:20:56


说明:
hd0是指第一块硬盘。如果机器里只有一块硬盘,无论放在那一个接口,都是hd0

而hda则专指第一个IDE的主盘接口。

如果有两个硬盘,则bios里设置的启动当前盘为hd0,另一个为hd1。也就是它所指是不固定的。

原来是这样, grub真是不傻, 可能考虑到硬盘换位置的情况.不过与其改hdb,还不如在硬件上改.
页: [1]
查看完整版本: 奇怪,硬盘换了个口,居然还能启动!