Alan McKinnon schrieb am 30.08.2010 18:32:
> Apparently, though unproven, at 18:03 on Monday 30 August 2010, Paul Hartman 
> did opine thusly:
> 
>> On Fri, Aug 27, 2010 at 9:04 PM, Daniel Pielmeier <bil...@gentoo.org> wrote:
>>> Afaik if you are using GRUB LEGACY (0.97) and want to use LABEL/UUID in
>>> your grub.conf/menu.lst you also need an initrd. I think with GRUB 2
>>> (1.98) it is possible without. You don't need an initrd for LABEL/UUID
>>> in /etc/fstab for both cases.
>>
>> FWIW I'm using sys-boot/grub-0.97-r10 with GPT, labeled partitions and
>> no initrd. My kernel has EFI_PARTITION compiled in (no module).
>>
>> My fstab looks like this:
>>
>> LABEL=swap       none            swap            sw              0 0
>> LABEL=boot      /boot    ext2    defaults,noatime                1 2
>> LABEL=root       /       ext4    defaults,noatime                0 1
>> LABEL=home      /home   ext4    defaults,noatime        0 1
>>
>> My kernel boot commandline still specified root by device name
>> /dev/sda2 but otherwise my system works normally so far. :)
> 
> Don't listen to nay-sayers. Your fstab will work just fine and there's 
> nothing 
> wrong with it.
> 
> The LABEL= sysntax has also worked for years and years now on all grub-
> supported filesystems that support volume labels. I don't know where a 
> previous poster got the idea from that it is not supported, or you need an 
> initrd - I have never used an initrd on Gentoo and have used that syntax 
> since 
> forever.
> 
> Similar for claims of unreliability by someone else. The only cause I can 
> think of is using weird grub patches or some combination of insane flags.

If you are referring to my post please read again my statements. I am
not a native speaker so I probably did not make this clear.

I did not say that LABEL/UUID does not work within /etc/fstab.
Specifying the root device by using the LABEL/UUID syntax in
grub.conf/menu.lst however wont work without a proper initrd.

I must confess I did not test it before but I was sure it does not work.
I did some tests now (with sys-boot/grub-0.97-r10) and only the
following syntax for the grub.conf kernel command-lines works.

kernel /boot/kernel/kernel-2.6.35-gentoo-r4 root=/dev/sda3

All the others below need an initrd if you use GRUB LEGACY. Also the
GRUB LEGACY manual [1] does not mention LABEL or UUID at all. With GRUB
2 it will probably work by using the --search menu entry [1].

kernel /boot/kernel/kernel-2.6.35-gentoo-r4 root=LABEL=root
kernel /boot/kernel/kernel-2.6.35-gentoo-r4 root=/dev/disk/by-label/root
kernel /boot/kernel/kernel-2.6.35-gentoo-r4
root=/dev/disk/by-uuid/ab24cad5-ae0b-45d7-82f4-68357d5b6ff4

[1] http://www.gnu.org/software/grub/manual/legacy/grub.html
[2] http://www.gnu.org/software/grub/manual/grub.html#search

-- 
Daniel Pielmeier

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to