chiark / gitweb /
[PATCH] udev - safer sprintf() use
[elogind.git] / HOWTO-udev_for_dev
1 HOWTO use udev to manage /dev
2
3   This document describes one way to get udev working on a Fedora-development
4   machine to manage /dev.  This procedure may be used to get udev to manage
5   /dev on other distros, if you modify some of the steps.
6   
7   This will only work if you use a 2.6 based kernel, preferably the most
8   recent one.  This does not prevent your machine from using a 2.4
9   kernel, if you boot into one, udev will not run and your old /dev will
10   be present with no changes needed.
11
12
13 NOTE NOTE NOTE NOTE NOTE NOTE NOTE
14   This is completely unsupported.  Attempting to do this may cause your
15   machine to be unable to boot properly.  USE AT YOUR OWN RISK.  Always
16   have a rescue disk or CD handy to allow you to fix up any errors that
17   may occur.
18 NOTE NOTE NOTE NOTE NOTE NOTE NOTE
19
20
21  - Build and install udev as specified in the README that comes with
22    udev.  I recommend using the following build options to get the
23    smallest possible binaries:
24         make USE_KLIBC=true USE_LOG=false DEBUG=false
25
26  - disable udev from the boot process by running:
27         chkconfig udev off
28    or
29         chkconfig --del udev
30    as root.
31
32  - place the start_udev script somewhere that is accessible by your
33    initscripts.  I placed it into /etc/rc.d with the following command:
34         copy extras/start_udev /etc/rc.d/
35         
36  - modify the rc.sysinit script to call the start_udev script as one of
37    the first things that it does, but after /proc and /sys are mounted.
38    I did this with the latest Fedora startup scripts with the patch at
39    the end of this file.
40
41  - make sure the /etc/udev/udev.conf file lists the udev_root as /dev.
42    It should contain the following line in order to work properly.
43         udev_root="/dev/"
44
45  - reboot into a 2.6 kernel and watch udev create all of the initial
46    device nodes in /dev
47
48
49 If anyone has any problems with this, please let me, and the
50 linux-hotplug-devel@lists.sourceforge.net mailing list know.
51
52 A big thanks go out to the Gentoo developers for showing me that this is
53 possible to do.
54
55 Greg Kroah-Hartman
56 <greg@kroah.com>
57
58
59 ----------------------------------
60 Patch to modify rc.sysinit to call udev at the beginning of the boot
61 process:
62
63
64 --- /etc/rc.sysinit.orig        2004-02-17 11:45:17.000000000 -0800
65 +++ /etc/rc.sysinit     2004-02-17 13:28:33.000000000 -0800
66 @@ -32,6 +32,9 @@
67  
68  . /etc/init.d/functions
69  
70 +# start udev to populate /dev
71 +/etc/rc.d/start_udev
72 +
73  if [ "$HOSTTYPE" != "s390" -a "$HOSTTYPE" != "s390x" ]; then
74    last=0
75    for i in `LC_ALL=C grep '^[0-9].*respawn:/sbin/mingetty' /etc/inittab | sed 's/^.* tty\([0-9][0-9]*\).*/\1/g'`; do
76
77