On Mon, Aug 30, 2010 at 10:54 AM, Dale <rdalek1...@gmail.com> wrote:

> Alan McKinnon wrote:
>
>> 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:
>>>
>>>
>>>> Nikos Chantziaras schrieb am 27.08.2010 18:06:
>>>>
>>>>
>>>>> On 08/27/2010 07:02 PM, J. Roeleveld wrote:
>>>>>
>>>>>
>>>>>> Actually, you can:
>>>>>>
>>>>>> http://www.ibm.com/developerworks/linux/library/l-boot-rootfs/index.htm
>>>>>> l
>>>>>>
>>>>>> (Read the section below "Use a label"):
>>>>>>
>>>>>> fstab:
>>>>>> LABEL=ROOT          /         ext3    defaults        1 1
>>>>>> LABEL=BOOT          /boot     ext3    defaults        1 2
>>>>>> LABEL=SWAP          swap      swap    defaults        0 0
>>>>>> LABEL=HOME          /home     ext3    nosuid,auto     1 2
>>>>>>
>>>>>>
>>>>> This syntax never worked here.  Always resulted in an unbootable
>>>>> system.
>>>>>  Only the /dev/disk/by-label/ syntax works reliably.
>>>>>
>>>>>
>>>> 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.
>>
>>
>>
>
> So I don't have to have the complete path in fstab like this:
>
> /dev/disk/by-label/boot        /boot        ext2        noatime        1 2
> /dev/disk/by-label/root        /        reiserfs    defaults    0 1
> /dev/disk/by-label/swap        none        swap        sw        0 0
> /dev/disk/by-label/portage    /usr/portage    ext3        defaults    0 1
> /dev/disk/by-label/home        /home        reiserfs    defaults    1 1
>
> Can you post a grub.conf file that uses labels?  Sort of a example to look
> at and go by.
>

Dale, there are two examples of fstabs in this message (actually three). But
you only want to see those you didn't write. You just need to put
"LABEL=somelabel" in the first column.

-- 
Bill Longman

Reply via email to