The goal of eudev is to obtain better compatibility with existing software such as the OpenRC init system, Upstart init system, older Linux kernels, various toolchains, and anything else required by (but not well supported through) udev.
Similar to ebuild, eclass, emerge, etc. eudev's name follows the 'E' prefix convention started by Gentoo's founder Daniel Robbins.
System configurations running systemd have no use for eudev.
The /dev directory
Most Linux users understand that /dev/sda1 is just a fast way of referring to the first partition on the first disk that the kernel found. That's pretty easy, right?
But consider hotpluggable devices like USB, IEEE 1394, hot-swappable PCI, etc. What is the first device for each of these? And for how long? What will the other devices be named when the first one disappears? How will that affect ongoing transactions? Wouldn't it be fun if a printing job were suddenly moved from a high-end laser printer to an almost-dead matrix printer just because someone decided to pull the plug on the laser printer (which just happened to be the first printer)?
Enter the device manager. A modern device manager must:
- Run in userspace.
- Dynamically create and remove device files.
- Provide consistent device naming.
- Provide a userspace application program interface (API).
Every time a change happens within the device structure, the kernel emits a uevent which gets picked up by the device manager. The device manager then follows the rules declared in the /etc/udev/rules.d, /run/udev/rules.d and /lib/udev/rules.d directories. Based on the information contained within the uevent, it finds the rule or rules it needs to trigger and performs the required actions. These actions may involve the creation or deletion of device files, and may also trigger the loading of particular firmware files into kernel memory.
To avoid registration in the world set, the oneshot option should be used.
emerge --ask --oneshot sys-fs/eudev
The RC name is udev, not eudev. It needs to be registered in the sysinit runlevel.
rc-update add udev sysinit
* rc-update: udev already installed in runlevel `sysinit'; skipping
udev-trigger should also be added to the sysinit runlevel.
Optional: Keep classic network interface naming
This section is obsolete. See Udev#Optional: Disable_or_override_predictable_network_interface_naming for updated instructions.
Network device names such as eth0 or wlan0 as provided by the kernel are normally changed on system boot (see dmesg) by the /lib/udev/rules.d/80-net-name-slot.rules udev rule.
To keep the classic naming this rule can be overwritten with an equally named empty file in the /etc/udev/rules.d directory:
net.ifnames=0 to the kernel command line, change the default policy or create a custom one.
An interesting resource related to the network naming is I don't like this, how do I disable this on the Freedesktop wiki.
Start udevadm monitor and see what happens:
Get device info using udevadm info followed by the device path:
udevadm info -p /devices/pci0000:00/0000:00:1d.7
Get the device path using its name:
udevadm info -q path -n input/mouse1
Test an event run using udevadm test followed by the device path for which an event is to be tested:
udevadm test /devices/pci0000:00/0000:00:1d.7
To get a list of all udevadm commands:
Migrating older releases
udev 171-r10 to eudev 1.2-r1
See this post on the Gentoo forums.
Broken system switching from udev to eudev
See this post on the Gentoo forums.
- Udev — systemd's device manager for the Linux kernel.
- Gentoo eudev Project — The official Gentoo project fork of udev.
- Allow only known usb devices — describes how to protect a GNU/Linux system against rogue USB devices via a white listing policy.
- Google Summer of Code/2016/Ideas/Eudev
- Moving from udev (171-r10) to eudev (1.2-r1) on the Gentoo Forums