]> git.ipfire.org Git - thirdparty/systemd.git/blame - README
087 release
[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
c249f66a
KS
7 and differs a lot from distro to distro. All reasonable distros depend on udev
8 these days and the system will not work without it.
c2df8b5f
KS
9
10 The upstream udev project does not support or recomend to replace a distro's udev
11 installation with the upstream version. The installation of a unmodified upstream
12 version may render your system unusable! There is no "default" setup or a set
13 of "default" rules provided by the upstream udev version.
14
c249f66a 15Requirements:
dfc9761d
KS
16 - 2.6.x version of the Linux kernel. See the RELEASE-NOTES file in the
17 udev tree and the Documentation/Changes in the kernel source tree for
18 the actual dependency.
c2df8b5f 19
dfc9761d
KS
20 - The kernel must have sysfs and unix domain socket enabled.
21 (unix domain sockets (CONFIG_UNIX) as a loadable kernel module may work,
22 but it is completely silly, don't complain if anything goes wrong.)
c2df8b5f 23
c249f66a 24 - The proc filesystem must be mounted on /proc.
c2df8b5f 25
c249f66a 26 - The sysfs filesystem must be mounted at /sys. No other location
dfc9761d 27 will be supported by udev.
c2df8b5f 28
c249f66a
KS
29
30Operation:
dfc9761d
KS
31 Udev creates and removes device nodes in /dev, based on events the kernel
32 sends out on device discovery or removal.
c2df8b5f 33
d9926291
KS
34 - Early in the boot process, /dev should get a tmpfs filesystem
35 mounted, which is populated from scratch by udev. Created nodes or
36 changed permissions will not survive a reboot, which is intentional.
c249f66a 37
a8a614a7 38 - The content of /lib/udev/devices directory which contains the nodes,
d9926291 39 symlinks and directories, which are always expected to be in /dev, should
a8a614a7
KS
40 be copied over to the tmpfs mounted /dev, to provide the required nodes
41 to initialize udev and continue booting.
c249f66a 42
a8a614a7 43 - The udevd daemon must be started by an init script to receive netlink
d9926291 44 uevents from the kernel driver core.
c2df8b5f 45
dfc9761d 46 - From kernel version 2.6.15 on, the hotplug helper /sbin/hotplug should
d9926291
KS
47 be disabled with an init script before actions like loading kernel
48 modules are taken, which may cause a lot of events.
c2df8b5f 49
dfc9761d
KS
50 - All kernel events are matched against a set of specified rules in
51 /etc/udev/rules.d/ which make it possible to hook into the event
52 processing to load required kernel modules and setup devices. For all
53 devices the kernel requests a device node, udev will create one with
54 the default name or the one specified by a matching udev rules.
c2df8b5f 55
c2df8b5f 56
c249f66a 57Compile Options:
c2df8b5f 58 DESTDIR
d9926291 59 Prefix of install target, used for package building.
c2df8b5f 60 USE_LOG
dfc9761d
KS
61 If set to 'true', udev is able to pass errors or debug information
62 to syslog. This is very useful to see what udev is doing or not doing.
63 It is enabled by default, don't expect any useful answer, if you
64 need to hunt a bug, but you can't enable syslog.
c2df8b5f 65 DEBUG
c249f66a
KS
66 If set to 'true', very verbose debugging messages will be compiled
67 into the udev binaries. The actual level of debugging is specified
68 in the udev config file.
69 STRIPCMD
70 If udev is compiled for packaging an empty string can be passed
71 to disable the stripping of the binaries.
c2df8b5f 72 USE_SELINUX
c249f66a 73 If set to 'true', udev will be built with SELinux support
c2df8b5f
KS
74 enabled. This is disabled by default.
75 USE_KLIBC
c249f66a 76 If set to 'true', udev is built and linked against klibc.
a8349b33 77 Default value is 'false'. KLCC specifies the klibc compiler
c249f66a 78 wrapper, usually located at /usr/bin/klcc.
c2df8b5f 79 EXTRAS
c249f66a
KS
80 If set, will build the "extra" helper programs as specified
81 as listed (see below for an example).
c2df8b5f 82
dfc9761d
KS
83If you want to build the udev helper programs:
84 make EXTRAS="extras/cdrom_id extras/scsi_id extras/volume_id"
85
c2df8b5f 86
c249f66a 87Installation:
dfc9761d
KS
88 - The install target intalls the udev binaries in the default locations,
89 All at boot time reqired binaries will be installed in /sbin.
c249f66a
KS
90
91 - The default location for scripts and binaries that are called from
dfc9761d 92 rules is /lib/udev. Other packages who install udev rules, should use
d9926291 93 that directory too.
c249f66a
KS
94
95 - It is recommended to use the /lib/udev/devices directory to place
96 device nodes and symlinks in, which are copied to /dev at every boot.
97 That way, nodes for broken subsystems or devices which can't be
dfc9761d
KS
98 detected automatically by the kernel, will always be available.
99
100 - Copies of the rules files for all major distros are in the etc/udev
101 directory (you may look there how others distros are doing it).
102
103 - The persistent disk links in /dev/disk are the de facto standard
104 on Linux and should be installed with every default udev installation.
105 The devfs naming scheme rules are not recommended and not supported.
c249f66a 106
c2df8b5f
KS
107Please direct any comment/question/concern to the linux-hotplug-devel mailing list at:
108 linux-hotplug-devel@lists.sourceforge.net
057f2bdb 109