]> git.ipfire.org Git - thirdparty/systemd.git/blob - README
Docs: README: Flip sentence structure to improve wording
[thirdparty/systemd.git] / README
1 udev - Linux userspace device management
2
3 Integrating udev in the system has complex dependencies and may differ from
4 distribution to distribution. A system may not be able to boot up or work
5 reliably without a properly installed udev version. The upstream udev project
6 does not recommend replacing a distro's udev installation with the upstream
7 version.
8
9 The upstream udev project's set of default rules may require a most recent
10 kernel release to work properly. This is currently version 2.6.31.
11
12 Tools and rules shipped by udev are not public API and may change at any time.
13 Never call any private tool in /lib/udev from any external application; it might
14 just go away in the next release. Access to udev information is only offered
15 by udevadm and libudev. Tools and rules in /lib/udev and the entire contents of
16 the /dev/.udev directory are private to udev and do change whenever needed.
17
18 Requirements:
19 - Version 2.6.27 of the Linux kernel with sysfs, procfs, signalfd, inotify,
20 unix domain sockets, networking and hotplug enabled:
21 CONFIG_HOTPLUG=y
22 CONFIG_UEVENT_HELPER_PATH=""
23 CONFIG_NET=y
24 CONFIG_UNIX=y
25 CONFIG_SYSFS=y
26 CONFIG_SYSFS_DEPRECATED*=n
27 CONFIG_PROC_FS=y
28 CONFIG_TMPFS=y
29 CONFIG_INOTIFY_USER=y
30 CONFIG_SIGNALFD=y
31 CONFIG_TMPFS_POSIX_ACL=y (user ACLs for device nodes)
32 CONFIG_BLK_DEV_BSG=y (SCSI devices)
33
34 - Udev does not work with the CONFIG_SYSFS_DEPRECATED* option.
35
36 - Unix domain sockets (CONFIG_UNIX) as a loadable kernel module may work,
37 but it is not supported.
38
39 - The deprecated hotplug helper /sbin/hotplug should be disabled in the
40 kernel configuration, it is not needed today, and may render the system
41 unusable because the kernel may create too many processes in parallel
42 so that the system runs out-of-memory.
43
44 - The proc filesystem must be mounted on /proc, and the sysfs filesystem must
45 be mounted at /sys. No other locations are supported by a standard
46 udev installation.
47
48 - The system must have the following group names resolvable at udev startup:
49 disk, cdrom, floppy, tape, audio, video, lp, tty, dialout, and kmem.
50 Especially in LDAP setups, it is required that getgrnam() be able to resolve
51 these group names with only the rootfs mounted and while no network is
52 available.
53
54 - The 'udev extras' has the following dependencies:
55 libacl, libglib2, libusb, usbutils, pciutils, and gperf.
56 These dependencies can be disabled with the --disable-extras configure option.
57
58 Setup:
59 - At bootup, the /dev directory should get the 'devtmpfs' filesystem
60 mounted. Udev manages the permissions and ownership of the kernel-created
61 device nodes, and udev possibly creates additional symlinks. If needed, udev also
62 works on an empty 'tmpfs' filesystem, but some static device nodes like
63 /dev/null, /dev/console, /dev/kmsg are needed to be able to start udev itself.
64
65 - The udev daemon should be started to handle device events sent by the kernel.
66 During bootup, the kernel can be asked to send events for all already existing
67 devices so that they too can be configured by udev. This is usually done by:
68 /sbin/udevadm trigger --type=subsystems
69 /sbin/udevadm trigger --type=devices
70
71 - Restarting the daemon never applies any rules to existing devices.
72
73 - New/changed rule files are picked up automatically; there is no daemon
74 restart or signal needed.
75
76 Operation:
77 - Based on events the kernel sends out on device creation/removal, udev
78 creates/removes device nodes in the /dev directory.
79
80 - All kernel events are matched against a set of specified rules, which
81 possibly hook into the event processing and load required kernel
82 modules to setup devices. For all devices the kernel exports a major/minor
83 number; if needed, udev creates a device node with the default kernel
84 name. If specified, udev applies permissions/ownership to the device
85 node, creates additional symlinks pointing to the node, and executes
86 programs to handle the device.
87
88 - The events udev handles, and the information udev merges into its device
89 database, can be accessed with libudev:
90 http://www.kernel.org/pub/linux/utils/kernel/hotplug/libudev/
91 http://www.kernel.org/pub/linux/utils/kernel/hotplug/gudev/
92
93 For more details about udev and udev rules see the udev(7) man page.
94
95 Please direct any comment/question to the linux-hotplug mailing list at:
96 linux-hotplug@vger.kernel.org