README revision 600b2584566a44b8a57f546f5ce27f5b1cce21d6
337eebb936be1da1215535e866965ce54c82d755Lennart Poetteringudev - Linux userspace device management
4b2d99d9f4258a29f0bf8b1a78d17836e75bc378Lennart Poettering
d42d27ead91e470cb12986d928441e56c0f543caLennart PoetteringIntegrating udev in the system has complex dependencies and may differ from
91f9dcaf9270fe465525638cc08bd94590273349Lennart Poetteringdistribution to distribution. A system may not be able to boot up or work
f401e48c2db22ff9d1a05885b5599bebf19c2707Lennart Poetteringreliably without a properly installed udev version. The upstream udev project
f401e48c2db22ff9d1a05885b5599bebf19c2707Lennart Poetteringdoes not recommend replacing a distro's udev installation with the upstream
7640a5de1b3ffe6547200ad204d14e4f067caf4fLennart Poetteringversion.
1063dc3a525a87c0285e071794317f71724492feLennart Poettering
8e1bd70d4ce6d3881c1df6a6482643a2b3a69bb1Lennart PoetteringThe upstream udev project's set of default rules may require a most recent
8cf3a8a982661c0bb9b04ff27f6d486b38b1b35eLennart Poetteringkernel release to work properly. This is currently version 2.6.31.
de47ca9b50e8c05c9fc116ff37794e526bddf92eLennart Poettering
e0e1580aae5913870933518f3cb7055730ce3a49Lennart PoetteringTools and rules shipped by udev are not public API and may change at any time.
306a7fd82e790b3c00ba5cf806ccd6c0108061b5Lennart PoetteringNever call any private tool in /lib/udev from any external application; it might
335aa753fa60ba0bb3c9fe679c761d5f1f3b1588Lennart Poetteringjust go away in the next release. Access to udev information is only offered
335aa753fa60ba0bb3c9fe679c761d5f1f3b1588Lennart Poetteringby udevadm and libudev. Tools and rules in /lib/udev and the entire contents of
335aa753fa60ba0bb3c9fe679c761d5f1f3b1588Lennart Poetteringthe /dev/.udev directory are private to udev and do change whenever needed.
3b63d2d31d0850bd7a81ab9b468218d2c4c461e8Lennart Poettering
3b63d2d31d0850bd7a81ab9b468218d2c4c461e8Lennart PoetteringRequirements:
46574a5b4afeac0c3f69f15ce47c460309cb9becLennart Poettering - Version 2.6.27 of the Linux kernel with sysfs, procfs, signalfd, inotify,
46574a5b4afeac0c3f69f15ce47c460309cb9becLennart Poettering unix domain sockets, networking and hotplug enabled:
46574a5b4afeac0c3f69f15ce47c460309cb9becLennart Poettering CONFIG_HOTPLUG=y
85ed27f699939f75b8422ae67e016bdf9f439da9Lennart Poettering CONFIG_UEVENT_HELPER_PATH=""
447be1550523114f96c7f9eacb9d6a1ff6ca4197Lennart Poettering CONFIG_NET=y
c7b508592b28ee1e62350f0d249856811371f631Lennart Poettering CONFIG_UNIX=y
afbf835326b0cc05c282b43f14ed501977de2004Lennart Poettering CONFIG_SYSFS=y
4bb2357f77c875976de5e238a5783e4e136b37b5Lennart Poettering CONFIG_SYSFS_DEPRECATED*=n
4bb2357f77c875976de5e238a5783e4e136b37b5Lennart Poettering CONFIG_PROC_FS=y
93a45c562a1989dfbb2dd08c65f8a21b02959934Lennart Poettering CONFIG_TMPFS=y
addab137cd8d318e4f543ca56018ee23d51aaca9Lennart Poettering CONFIG_INOTIFY_USER=y
b2423f1f436f847d9fc96a63679be2b5552b6bafLennart Poettering CONFIG_SIGNALFD=y
449ddb2d23a63ca4c8cd70d13a070fba87c1fb30Lennart Poettering CONFIG_TMPFS_POSIX_ACL=y (user ACLs for device nodes)
97c4a07df982ee967705022feaba9be33947abf0Lennart Poettering CONFIG_BLK_DEV_BSG=y (SCSI devices)
b574fa098d2827359c31a2d922b729725a8c6c8cLennart Poettering
f61448083198dc0e4e0d19a916bcd478336cc85dLennart Poettering - Udev will not work with the CONFIG_SYSFS_DEPRECATED* option.
6e200d55ae538fc29360cdaa9863f30cdddf58f3Lennart Poettering
6e200d55ae538fc29360cdaa9863f30cdddf58f3Lennart Poettering - Unix domain sockets (CONFIG_UNIX) as a loadable kernel module may work,
dfac97b21e00cd3617ba817227db7b621841b5ccLennart Poettering but it is not supported.
346bce1f4cff0096177c613987cdc80fa4ec134eLennart Poettering
5e6afdd3d359fc42de7ac432243e98673577e81fLennart Poettering - The deprecated hotplug helper /sbin/hotplug should be disabled in the
cd6d0a456bc9c45fa79316fc5896e4a3ae75a30bLennart Poettering kernel configuration, it is not needed today, and may render the system
cd6d0a456bc9c45fa79316fc5896e4a3ae75a30bLennart Poettering unusable because the kernel may create too many processes in parallel
c24eb49e6aecd6de2ad450083e826d4c9d9c75b6Lennart Poettering so that the system runs out-of-memory.
151b190e79e64824552e01849352ca8f6ac7dedbLennart Poettering
9cf2578683de834026f501c24a0f5d3d0991d0a6Dave Reisner - The proc filesystem must be mounted on /proc, the sysfs filesystem must
f13b388f97bc3ba8db844bd3413d510e2466a0b6Kay Sievers be mounted at /sys. No other locations are supported by a standard
f13b388f97bc3ba8db844bd3413d510e2466a0b6Kay Sievers udev installation.
f13b388f97bc3ba8db844bd3413d510e2466a0b6Kay Sievers
- The system must have the following group names resolvable at udev startup:
disk, cdrom, floppy, tape, audio, video, lp, tty, dialout, kmem.
Especially in LDAP setups, it is required, that getgrnam() is able to resolve
these group names with only the rootfs mounted, and while no network is
available.
- To build all 'udev extras', libacl, libglib2, libusb, usbutils, pciutils,
gperf are needed. These dependencies can be disabled with the
--disable-extras configure option.
Setup:
- At bootup, the /dev directory should get the 'devtmpfs' filesystem
mounted. Udev will manage permissions and ownership of the kernel-created
device nodes, and possibly create additional symlinks. If needed, udev also
works on an empty 'tmpfs' filesystem, but some static device nodes like
/dev/null, /dev/console, /dev/kmsg are needed to be able to start udev itself.
- The udev daemon should be started to handle device events sent by the kernel.
During bootup, the kernel can be asked to send events for all already existing
devices, to apply the configuration to these devices. This is usually done by:
/sbin/udevadm trigger --type=subsystems
/sbin/udevadm trigger --type=devices
- Restarting the daemon does never apply any rules to existing devices.
- New/changed rule files are picked up automatically; there is no daemon
restart or signal needed.
Operation:
- Udev creates/removes device nodes in /dev, based on events the kernel
sends out on device creation/removal.
- All kernel events are matched against a set of specified rules, which
possibly hook into the event processing and load required kernel
modules to setup devices. For all devices the kernel exports a major/minor
number; if needed, udev will create a device node with the default kernel
name. If specified, udev applies permissions/ownership to the device
node, creates additional symlinks pointing to the node, and executes
programs to handle the device.
- The events udev handles, and the information udev merges into its device
database, can be accessed with libudev:
http://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/
http://www.kernel.org/pub/linux/utils/kernel/hotplug/gudev/
For more details about udev and udev rules see the udev(7) man page.
Please direct any comment/question to the linux-hotplug mailing list at:
linux-hotplug@vger.kernel.org