:: Re: [DNG] new behaviour of /dev
Top Page
Delete this message
Reply to this message
Author: Didier Kryn
Date:  
To: dng
Subject: Re: [DNG] new behaviour of /dev
Le 22/08/2017 à 01:27, Adam Borowski a écrit :
> Hi!
> Do you remember when for decades we had to populate /dev using mknod
> (using makedev or something) -- both on Linux and on Unices that predated
> it? Then when udev came to make device creation dynamic.
>
> I just installed a new server, not using d-i but manual debootstrap. Not
> even regular debootstrap but with --variant=minbase as --exclude is still
> buggy and fails to exclude THE THING THAT SHOULDN'T BE NAMED. Everything
> worked fine, except for one detail: somehow /dev/ttyUSB* were mode 600
> root:root instead of 660 root:dialout.
>
> Turns out, udev was not installed. Nor mdev, nothing. No initrd either.
> Yet it boots and works correctly. fstab has no entries except for / -- and
> even this is pointless if you mount rootfs rw on cmdline (the ro + remount
> dance does nothing good on any modern fs other than ext4). If there was any
> userland configuration, it is done by openrc by default.
>
> Hotplugging USB devices seems to work fine, new nodes get created without
> udev's involvement.
>
> Obviously, I guess running without udev is a bad idea in the long run -- you
> want correct permissions to get applied, hotplug hooks to be run, etc. But
> this suggests 90% of udev/mdev/vdev code can be thrown out.
>
> That the kernel can now do most of this work by itself is news to me.
>

     This is the result of enabling devtmpfs when building the kernel. 
Devtmpfs was implemented a few years ago and is, in my opinion, a 
reaction of the bad behaviour of Udev developpers. For the same reason 
(explicitely), the kernel now loads the firmware automatically instead 
of requesting it to the hotplugger. Definitely, the hotplugger has less 
and less to do, and, definitely, I think Mdev could do it pretty well.


     Didier