On 06/09/2016 10:00 AM, Dale wrote: > waltd...@waltdnes.org wrote: >> On Thu, Jun 09, 2016 at 08:16:57AM -0500, Dale wrote >>> k...@aspodata.se wrote: >>>> Dale: >>>> ... >>>>> Can a system even boot without udev? >>>> Yes, use sys-fs/static-dev (unless you have some special boot >>>> requirements). >>> Well, I was talking about if udev was removed and then a reboot >>> was done. I would think it would boot to a certain point then when >>> whatever started and needed devices to be created in /dev, it would >>> start failing. I suspect this would vary depending on the install >>> as well. >> You need *A* device-manager. You can use udev, eudev, static-dev, >> mdev, whatever, but you need something. Mind you, some software assumes >> or requires udev/eudev. >> > > > What I was referring to was if during this switch from udev to eudev, > someone rebooted without any dev manager at all. In other words, emerge > -C udev and then reboot before emerging eudev or some other dev > manager. I suspect that would get interesting pretty quick. > > Dale > > :-) :-) > >
Actually, you no longer need a user-space device manager at all, unless you want to be able to access device nodes under /dev as a user that isn't UID=0 or has CAP_DAC_OVERRIDE. The kernel provides a devtmpfs filesystem that will have every single device node that udev used to create (udev no longer even creates the devices -- it just relies on devtmpfs doing so), but most of them will be owned by 0:0 (root:root) with permissions 0600; excepting certain nodes like /dev/null or /dev/zero, which will be owned by 0:0 with permissions 0666. One other thing that udev does that you might rely on is to create symlinks like /dev/disk/by-label/*, which can be used by mount(8) if you specify LABEL=foo in /etc/fstab. The only other things that I'm aware of udev doing is to rename network devices and (possibly) to notify other applications of changes, somehow (but I'm not sure that it actually does that). If you don't actually need any of that (you are working on an embedded system where you only need root anyway, for instance), then you can just use a bare devtmpfs without a device manager changing permissions, adding links, etc. -- Jonathan Callen
signature.asc
Description: OpenPGP digital signature