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

Re: custom kernel without initrd and with udev



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.

In a typical Debian boot, a root file system of some sort is mounted
three times: the first is the mount of the initial RAM file system,
specified by the boot loader.  (In LILO, it is the "initrd" configuration
file statement.)  The second is the mount of the permanent root file
system read-only, also specified by the boot loader.  (In LILO, it is the
"root" configuration file statement.)  The third is the mount of the
permanent root file system read/write, as specified in /etc/fstab.
Obviously, if you're not using an initial RAM file system, there are only
two mounts of the root file system.  The one I'm talking about is the
first read-only one specified by the boot loader.  I don't see how a
UUID specification is going to work there if there is no initial RAM file
system.

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?

-- 
  .''`.     Stephen Powell    
 : :'  :
 `. `'`
   `-


Reply to: