Re: [gentoo-user] Re: Re: Changing boot device with 2.6.36

2011-01-04 Thread Mick
On Wednesday 05 January 2011 00:55:49 Alex Schuster wrote:
> Dale writes:
> > Alan McKinnon wrote:
> >> Apparently, though unproven, at 15:18 on Tuesday 04 January 2011,
> >> Stroller did
> >> 
> >> opine thusly:
> >>> I found numerous references to this syntax going back to 2005 or
> >>> so, and some major distros seem to use it as the default way of
> >>> describing "root=" to the kernel.
> >>> 
> >>> http://www.linuxforums.org/forum/redhat-fedora-linux-help/23010-root-la
> >>> bel- grub-conf.html
> >>> http://linux.derkeiler.com/Mailing-Lists/RedHat/2005-01/0026.html
> >>> 
> >>> However:
> >>> http://old.nabble.com/Re%3A-Using--%22root%3DLABEL%3D%22-in-grub.co
> >>> nf-p 21909347.html http://tinyurl.com/2u4srg4
> >>> 
> >>> Stroller.
> >> 
> >> All the major distros I've seen it on also use initrds though (rare in
> >> gentoo- land). I have no idea how it all works, I just know how to type
> >> it on a RHEL box.
> 
> I am using an initrd, I need it since my root partition is encrypted.
> It's generated and copied to /boot with 'genkernel --install --luks
> --lvm all', but you have to have CLEAN="no" in /etc/genkernel.conf or
> genkernel will create its own .config.
> 
> >> Elsewhere in the thread someone mentioned that this syntax relies on an
> >> initrd, and I suspect he may be correct.
> 
> And Stroller's 3rd link also does this.
> 
> > I tried using labels with the old grub a while back and it didn't work.
> > Labels in fstab works fine tho.  We may have to wait on the new grub to
> > get finished
> 
> I would be surprised if it had this feature. AFAIK grub is already done
> at this stage, the kernel has taken over. And I guess it does not know
> about the LABEL= syntax, and has no code to scan all devices for file
> system labels.
> With an initramfs, the kernel runs an init script which can do various
> stuff, like probing all devices for file system labels.

I understand that GRUB2 has bash scripting capabilities which can can use the 
command 'search' to probe devices at boot time and use things like UUID and 
LABEL.  Not sure if an initrd is required.  I could be wrong though - I have 
not had the time to experiment with it yet.
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: Re: Changing boot device with 2.6.36

2011-01-04 Thread Alex Schuster
Dale writes:

> Alan McKinnon wrote:
>> Apparently, though unproven, at 15:18 on Tuesday 04 January 2011, Stroller 
>> did
>> opine thusly:
>>
>>> I found numerous references to this syntax going back to 2005 or
>>> so, and some major distros seem to use it as the default way of
>>> describing "root=" to the kernel.
>>>
>>> http://www.linuxforums.org/forum/redhat-fedora-linux-help/23010-root-label-
>>> grub-conf.html
>>> http://linux.derkeiler.com/Mailing-Lists/RedHat/2005-01/0026.html
>>>
>>> However:
>>> http://old.nabble.com/Re%3A-Using--%22root%3DLABEL%3D%22-in-grub.conf-p
>>> 21909347.html http://tinyurl.com/2u4srg4
>>>
>>> Stroller.  
>>
>> All the major distros I've seen it on also use initrds though (rare in 
>> gentoo-
>> land). I have no idea how it all works, I just know how to type it on a RHEL
>> box.

I am using an initrd, I need it since my root partition is encrypted.
It's generated and copied to /boot with 'genkernel --install --luks
--lvm all', but you have to have CLEAN="no" in /etc/genkernel.conf or
genkernel will create its own .config.

>> Elsewhere in the thread someone mentioned that this syntax relies on an
>> initrd, and I suspect he may be correct.

And Stroller's 3rd link also does this.

> I tried using labels with the old grub a while back and it didn't work.  
> Labels in fstab works fine tho.  We may have to wait on the new grub to 
> get finished

I would be surprised if it had this feature. AFAIK grub is already done
at this stage, the kernel has taken over. And I guess it does not know
about the LABEL= syntax, and has no code to scan all devices for file
system labels.
With an initramfs, the kernel runs an init script which can do various
stuff, like probing all devices for file system labels.

Wonko



Re: [gentoo-user] Re: Re: Changing boot device with 2.6.36

2011-01-04 Thread Dale

Alan McKinnon wrote:

Apparently, though unproven, at 15:18 on Tuesday 04 January 2011, Stroller did
opine thusly:

   

I found numerous references to this syntax going back to 2005 or
so, and some major distros seem to use it as the default way of
describing "root=" to the kernel.

http://www.linuxforums.org/forum/redhat-fedora-linux-help/23010-root-label-
grub-conf.html
http://linux.derkeiler.com/Mailing-Lists/RedHat/2005-01/0026.html

However:
http://old.nabble.com/Re%3A-Using--%22root%3DLABEL%3D%22-in-grub.conf-p
21909347.html http://tinyurl.com/2u4srg4

Stroller.
 


All the major distros I've seen it on also use initrds though (rare in gentoo-
land). I have no idea how it all works, I just know how to type it on a RHEL
box.

Elsewhere in the thread someone mentioned that this syntax relies on an
initrd, and I suspect he may be correct.


   


I tried using labels with the old grub a while back and it didn't work.  
Labels in fstab works fine tho.  We may have to wait on the new grub to 
get finished.


Dale

:-)  :-)



Re: [gentoo-user] Re: Re: Changing boot device with 2.6.36

2011-01-04 Thread Alan McKinnon
Apparently, though unproven, at 15:18 on Tuesday 04 January 2011, Stroller did 
opine thusly:

> On 4/1/2011, at 9:42am, Jörg Schaible wrote:
> >> ...
> >> Does
> >> 
> >> boot=LABEL=
> >> 
> >> in grub config work for you?
> > 
> > I hoped so, but actually no. Grub complains at boot time not finding the
> > root device. Is this available in the grub-0.97 series at all?
> 
> I found numerous references to this syntax going back to 2005 or
> so, and some major distros seem to use it as the default way of
> describing "root=" to the kernel.
> 
> http://www.linuxforums.org/forum/redhat-fedora-linux-help/23010-root-label-
> grub-conf.html
> http://linux.derkeiler.com/Mailing-Lists/RedHat/2005-01/0026.html
> 
> However:
> http://old.nabble.com/Re%3A-Using--%22root%3DLABEL%3D%22-in-grub.conf-p
> 21909347.html http://tinyurl.com/2u4srg4
> 
> Stroller.


All the major distros I've seen it on also use initrds though (rare in gentoo-
land). I have no idea how it all works, I just know how to type it on a RHEL 
box.

Elsewhere in the thread someone mentioned that this syntax relies on an 
initrd, and I suspect he may be correct.


-- 
alan dot mckinnon at gmail dot com



Re: [gentoo-user] Re: Re: Changing boot device with 2.6.36

2011-01-04 Thread Andrea Conti
>> boot=LABEL=
>>
>> in grub config work for you?
> 
> I hoped so, but actually no. Grub complains at boot time not finding the 
> root device. Is this available in the grub-0.97 series at all?

I am not sure about grub 2, but 0.97 knows nothing about filesystem
labels (and neither does the kernel itself).

Where the syntax above works, it's because the distribution provides an
initramfs containing (among other things) a script which looks at the
kernel commandline and figures out the correct device node before
attempting to mount the root filesystem.

The only sensible way to handle the OP's problem is to have everything
USB-related (or at least usb-storage) built as a module.

Why would you want USB compiled in the kernel, anyway? Even if you were
using an USB keyboard, you would not be able to do much if the boot
process does not even reach the point where udev starts loading modules...

andrea



Re: [gentoo-user] Re: Re: Changing boot device with 2.6.36

2011-01-04 Thread Stroller

On 4/1/2011, at 9:42am, Jörg Schaible wrote:
>> ...
>> Does
>> 
>> boot=LABEL=
>> 
>> in grub config work for you?
> 
> I hoped so, but actually no. Grub complains at boot time not finding the 
> root device. Is this available in the grub-0.97 series at all?

I found numerous references to this syntax going back to 2005 or   
so, and some major distros seem to use it as the default way of   
describing "root=" to the kernel. 

http://www.linuxforums.org/forum/redhat-fedora-linux-help/23010-root-label-grub-conf.html
http://linux.derkeiler.com/Mailing-Lists/RedHat/2005-01/0026.html

However:
http://old.nabble.com/Re%3A-Using--%22root%3DLABEL%3D%22-in-grub.conf-p21909347.html
http://tinyurl.com/2u4srg4

Stroller.




[gentoo-user] Re: Re: Changing boot device with 2.6.36

2011-01-04 Thread Jörg Schaible
Hi Alan,

Alan McKinnon wrote:

> Apparently, though unproven, at 21:36 on Monday 03 January 2011, Jörg
> Schaible did opine thusly:
> 
>> Nikos Chantziaras wrote:
>> > On 01/03/2011 07:43 PM, Jörg Schaible wrote:
>> >> Hi,
>> >> 
>> >> starting with the 2.6.36-r5 kernel of the Gentoo sources my boot
>> >> device changes. With 2.6.35 and below it is alway /dev/sda3, with the
>> >> new kernel it seems that anything that is internally connected with
>> >> USB is assigned a device first. Since my computer has an internal
>> >> media bay (and my monitor has such a thing also) the first HD moves -
>> >> it I take care it is now /dev/sde3. However, if I forget to switch on
>> >> the monitor and do this later or if an USB stick is already plugged in
>> >> at boot time, the HD gets a different device number again.
>> >> 
>> >> Can somebody else confirm such a behaviour with the 2.6.36 kernel and
>> >> how can this brought back to normal operation?
>> > 
>> > This has been solved long ago: Label your filesystems and mount them by
>> > label.
>> 
>> I did this long ago, therefore I can switch between the old and new
>> kernel easily.
>> 
>> > For example, don't put "/dev/sda3" in your fstab, but label that
>> > filesystem with a name like "root_fs" and use
>> > "/dev/disk/by-label/root_fs" in fstab.
>> > 
>> > Ext2/3/4 filesystem can be labeled with the "e2label" tool.  For
>> > example:
>> >e2label /dev/sda3 root_fs
>> > 
>> > After that, modify your fstab accordingly.
>> 
>> And how does this help the kernel to find the root device where
>> /etc/fstab is located ?
> 
> Does
> 
> boot=LABEL=
> 
> in grub config work for you?

I hoped so, but actually no. Grub complains at boot time not finding the 
root device. Is this available in the grub-0.97 series at all?

- Jörg





[gentoo-user] Re: Re: Changing boot device with 2.6.36

2011-01-04 Thread Jörg Schaible
Hi Stroller,

Stroller wrote:

> 
> On 3/1/2011, at 7:36pm, Jörg Schaible wrote:
>> ...
>> And how does this help the kernel to find the root device where
>> /etc/fstab is located ?
> 
> The kernel doesn't. You leave that to GRUB.
> 
> I'm not saying this helps solve your problem, I'm just sayin'.
> 
>> BTW: Yes, I will boot next time with a LABEL entry in the kernels boot
>> option, but I still don't want a kernel that assigns devices in random
>> order.
> 
> As long as you can boot, you should seriously stop caring.

That's it: I cannot! At least not always.

> If you're concerned about mounting USB sticks or memory cards then use
> udev rules to distinguish them.
>
> Regarding the booting, and having to change what's in your grub.conf, I'd
> assume this is a one-off change - you'll change grub.conf to point to the
> new /dev/sdX and that will require no maintenance in the forseeable
> future.

But that's the point: What is X? It is constantly changing with 2.6.36!

> GRUB can do labels, but it needs an initrd or initramfs, I think.

I could not get that working until now ...

- Jörg