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

Re: custom kernel without initrd and with udev



On 07/07/12 18:49, Stephen Powell wrote:
On Sat, 07 Jul 2012 12:53:27 -0400 (EDT), Dom wrote:
On 07/07/12 16:53, Stephen Powell wrote:
It's getting harder and harder to get along without an initrd these
days.  Why is it so important to you not to use one?  As others
have pointed out, using a UUID or LABEL specification for the root
file system makes it impossible to get the root file system mounted
if you don't use an initrd.

I didn't know that.

It seems my kernel doesn't either, because it is working just fine with
UUIDs and no initrd ;-)

I agree there are issues with labels though, which is a pity.

It may be possible to build modules into the kernel, so that an initial
RAM file system is not needed to load kernel modules from.  But a user-
space process, such as udev, cannot be started until there is some kind
of root file system to read it from.  One can't build a user-space process
into the kernel!  I can believe that a UUID specification in /etc/fstab
would work, but I can't see how a UUID specification in the boot loader
would work.  It is my understanding that udev is responsible for reading
the UUIDs and LABELs and creating the corresponding block special files
in /dev and symbolic links to them in /dev/disk.  If there is no initrd,
how can udev be started?  I don't see how this can work.  Are you sure
that a UUID specification is being used in the boot loader, as well as
in /etc/fstab?

Ah, I see that my grub.cfg (grub2) is using root=/dev/hda1 for the "linux" entry, despite GRUB_DISABLE_LINUX_UUID=true being commented out in /etc/default/grub on that box. I'm not sure why.

The "search" entry has "--set=root bad6c13d-19f0-47ad-bc6e-542a911d4178" in it, which is the UUID of the root partition.

I wonder why, as I'm sure I didn't edit it manually. Maybe the grub setup is smart enough to realise?

I just ran update-grub to check and it produced the same entries.

--
Dom


Reply to: