[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Disk Drive Order Changes - Again



At 11:17 AM 4/6/2008, Hugo Vanwoerkom wrote:
Butch Kemper wrote:
Back in February, I asked a question about problems I was having with the hard disks sequence flip-flopping when I would boot: disk #1 would be hda and disk #2 would be hdc; or disk #1 would be hde and disk #2 would be hda. I receive answers about using labels with the partitions so, I labeled the partitions and updated /etc/fstab. This is how things now look:
        IDE #1  Partition       Label           Mount Point
                1               /               /
                2               swap1           swap file
                3               /usr            /usr
                4
                5               /usr/local      /usr/local
                6               /var            /var
        IDE #2  Partition       Label           Mount Point
                1               /var/poptemp    /var/poptemp
                2               /var/mail       /var/mail
The /etc/fstab:
# <file system>         <mount point>   <type>  <options>       <dump>
<pass>
proc                    /proc           proc    defaults        0       0
LABEL=/                 /       ext3 defaults,errors=remount-ro 0       1
LABEL=/usr              /usr            ext3    defaults        0       2
LABEL=/usr/local        /usr/local      ext3    defaults        0       2
LABEL=/var              /var            ext3    defaults        0       2
LABEL=/var/poptemp      /var/poptemp    ext3    defaults        0       2
LABEL=/var/mail         /var/mail       ext3    defaults        0       2
LABEL=swap1             none            swap    sw              0       0
Now the partitions and mount points get assigned correctly no matter which order the drives are assigned. The remaining problem is with the GRUB and the kernel. It was suggested that a LABEL specification be placed in the /boot/grub/menu.1st entry so that:
        # kopt=root=/dev/hda1           becomes
        # kopt=root=LABEL=/
Using a LABEL in the Grub menu does not work because the kernel get confused:
        1.  If kopt=root=/dev/hda1 and the disk order changes to make
            the boot disk be /dev/hde, the boot process stops and drops
            into a prompt.  I can unmount /boot, mount /boot on the
            correct drive, give a CTL-D to the prompt, and the system
            would continue to boot.
        2.  If kopt=root=LABEL=/, the boot process will stop and drop
            into a prompt WITHOUT /boot being mounted.  I can mount
            /boot on the correct drive, give a CTL-D to the prompt,
            and the system will continue to boot.
No where have I been able to find any documentation that shows that the Kernel boot command root= can have a LABEL specified.


# kopt=root=LABEL=wd80_0jd-60.05 ro noapic vga=791 apm=on ddcon=1 network quiet

WFM

but you are still stuck with the GRUB root command, which does not accept a label.
So I changed grub (0.97-29) to accept this:


find            /ST380011A.03
root            FILE=/ST380011A.03


and then where he finds file ST380011A.03 that is where the root will be.

Now I have a truly LABEL driven system and the drive devices can be wherever they are and I don't care...

Hugo


So, how do I make the kernel consistently detect and assign the disks in the correct order? Someone suggested the problem lies with UDEV and the parallel hardware detection process.

Hugo,

I understand the "find" command and the results that it returns. But I am unable to locate any mention of the "root" command having a "FILE=" option.

So, did you modify Grub to make the "root" command have a FILE= parameter?

Butch


Reply to: