]> git.ipfire.org Git - thirdparty/systemd.git/blame - README
run_program: log "info" not "error" if program is missing
[thirdparty/systemd.git] / README
CommitLineData
c2df8b5f
KS
1udev - userspace device management
2
3For more information see the files in the docs/ directory.
4
5Important Note:
6 Integrating udev in the system is a whole lot of work, has complex dependencies
cad46974
KS
7 and differs a lot from distro to distro. All major distros depend on udev these
8 days and the system may not work without a proper installed version. The upstream
15c02d46 9 udev project does not support or recommend to replace a distro's udev installation
cad46974
KS
10 with the upstream version. The installation of a unmodified upstream version may
11 render your system unusable. Until now, there is no "default" setup or a set of
12 "default" rules provided by the upstream udev version.
c2df8b5f 13
c249f66a 14Requirements:
15c02d46
KS
15 - Version 2.6.15 of the Linux kernel for reliable operation of this release of
16 udev. The kernel may have a requirement on udev too, see Documentation/Changes
17 in the kernel source tree for the actual dependency.
c2df8b5f 18
15c02d46 19 - The kernel must have sysfs, unix domain sockets and networking enabled.
dfc9761d 20 (unix domain sockets (CONFIG_UNIX) as a loadable kernel module may work,
15c02d46 21 but it is completely silly - don't complain if anything goes wrong.)
c2df8b5f 22
15c02d46
KS
23 - The proc filesystem must be mounted on /proc, the sysfs filesystem must
24 be mounted at /sys. No other location will be supported by udev.
c2df8b5f 25
c249f66a
KS
26
27Operation:
dfc9761d
KS
28 Udev creates and removes device nodes in /dev, based on events the kernel
29 sends out on device discovery or removal.
c2df8b5f 30
15c02d46 31 - Very early in the boot process, the /dev directory should get a 'tmpfs'
cad46974
KS
32 filesystem mounted, which is populated from scratch by udev. Created nodes
33 or changed permissions will not survive a reboot, which is intentional.
c249f66a 34
a8a614a7 35 - The content of /lib/udev/devices directory which contains the nodes,
d9926291 36 symlinks and directories, which are always expected to be in /dev, should
a8a614a7
KS
37 be copied over to the tmpfs mounted /dev, to provide the required nodes
38 to initialize udev and continue booting.
c249f66a 39
15c02d46
KS
40 - The old hotplug helper /sbin/hotplug should be disabled on bootup, before
41 actions like loading kernel modules are taken, which may cause a lot of
42 events.
c2df8b5f 43
15c02d46
KS
44 - The udevd daemon must be started on bootup to receive netlink uevents
45 from the kernel driver core.
c2df8b5f 46
dfc9761d
KS
47 - All kernel events are matched against a set of specified rules in
48 /etc/udev/rules.d/ which make it possible to hook into the event
49 processing to load required kernel modules and setup devices. For all
cad46974
KS
50 devices the kernel exports a major/minor number, udev will create a
51 device node with the default kernel name or the one specified by a
52 matching udev rule.
c2df8b5f 53
c2df8b5f 54
c249f66a 55Compile Options:
c2df8b5f 56 DESTDIR
d9926291 57 Prefix of install target, used for package building.
c2df8b5f 58 USE_LOG
dfc9761d
KS
59 If set to 'true', udev is able to pass errors or debug information
60 to syslog. This is very useful to see what udev is doing or not doing.
61 It is enabled by default, don't expect any useful answer, if you
62 need to hunt a bug, but you can't enable syslog.
c2df8b5f 63 DEBUG
c249f66a
KS
64 If set to 'true', very verbose debugging messages will be compiled
65 into the udev binaries. The actual level of debugging is specified
66 in the udev config file.
c2df8b5f 67 USE_SELINUX
c249f66a 68 If set to 'true', udev will be built with SELinux support
c2df8b5f 69 enabled. This is disabled by default.
c2df8b5f 70 EXTRAS
cad46974
KS
71 list of helper programs in extras/ to build.
72 make EXTRAS="extras/cdrom_id extras/scsi_id extras/volume_id"
dfc9761d 73
c2df8b5f 74
c249f66a 75Installation:
dfc9761d 76 - The install target intalls the udev binaries in the default locations,
cad46974 77 All at boot time reqired binaries will be installed in /lib/udev or /sbin.
c249f66a
KS
78
79 - The default location for scripts and binaries that are called from
dfc9761d 80 rules is /lib/udev. Other packages who install udev rules, should use
d9926291 81 that directory too.
c249f66a
KS
82
83 - It is recommended to use the /lib/udev/devices directory to place
84 device nodes and symlinks in, which are copied to /dev at every boot.
85 That way, nodes for broken subsystems or devices which can't be
dfc9761d
KS
86 detected automatically by the kernel, will always be available.
87
cad46974
KS
88 - Copies of the rules files for the major distros are provided as examples
89 in the etc/udev directory.
dfc9761d 90
cad46974
KS
91 - The persistent device naming links in /dev/disk/ are required by other
92 software that depends on the data udev has collected from the devices
93 and should be installed by default with every udev installation.
c249f66a 94
c2df8b5f
KS
95Please direct any comment/question/concern to the linux-hotplug-devel mailing list at:
96 linux-hotplug-devel@lists.sourceforge.net
057f2bdb 97