Ruminations on Udev, null and console

Neal Murphy neal.p.murphy at alum.wpi.edu
Wed Feb 23 11:41:14 PST 2011


On Wednesday 23 February 2011 04:54:10 Simon Geard wrote:
> Are you unaware then, that udev provides the /dev/disks/by-label
> directory, which contains volume labels as symlinks to the kernel-named
> devices? For example, my fstab file doesn't reference /dev/sda6 for
> the /home partition - it uses /dev/disk/by-label/home instead.
> 
> Likewise, /boot is mounted as /dev/disk/by-label/boot and the swap
> partition as /dev/disk/by-label/swap.

You must be superhuman, able to memorize names like 485cc6bb-
ef7f-44ca-91c4-55d884c4083e, 4e23b7e0-af66-45b3-b0c2-a5af31c14c1b, 
5e34b5db-1fa8-49e7-9250-fb95ea301579, 73B115E331E98B57, 
74fbc4cd-784e-49fc-8d24-ca51623ba15c, 965800A05800816B, bbde5991-
c72e-424f-97eb-00acfba10aff, f3ab5997-5ecd-4486-ab86-4fd172d714ea, which 
parritions they are and which HDs they belong to.

Most ordinary humans really want to know that *this* hard drive is 'dska' and 
*that* hard drive is 'dskb', and want to see and use those names. They don't 
want to be mistyping ridiculously long, obscure, patternless, hexadecimal file 
names the few times they need to admin their systems. They don't want to be 
spelunking through their filesystems painstakingly matching random hex digits 
to be sure they are pulling the failed drive and not a good one. They want to 
fix the system and get back to using it.

That I've been spelunking through systems from TOPS-10, through the various 
PDP-11 OSen, VMS, UNIX, Linux, Solaris, SCO, OS/9, BeOS, Haiku, et al and can 
find what I need to know is beside the point. I just remember that there are 
folks who are not experts in the subject but who still need to learn how to 
work with it. I'm not saying they should be molly-coddled; rather, I'm saying 
their level of knowledge and expertise should be taken into consideration. In 
the case of udev and its present 'status', Human Factors has been discarded.

I'm also cognizant that LFS is a 'teaching' system that doesn't just ape what 
other distributions do. It might be useful to do more teaching in the fields 
of early userspace and udev.

To return to the topic, without using the specific kernel feature, "DEVTMPFS", 
one must manually create certain nodes in /dev in order to boot the system, 
even if one is using udev. If you mount a devtmpfs, the kernel will 
prepopulate it with the basic nodes it knows about; even here, a few nodes 
must exist in /dev in the initramfs. But if one enables the related kernel 
feature, DEVTMPFS_MOUNT, the kernel will automount a devtmpfs on the rootfs' 
/dev and populate it; with this feature, one can boot with 'init=/bin/sh' into 
a fully working shell with a minimal initramfs/initrd. These are the only 
cases that I know of in which nodes are automagically created in /dev. All 
others depend on user-space programs to create such nodes.



More information about the lfs-support mailing list