]>
Commit | Line | Data |
---|---|---|
de46ad19 GKH |
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 | ||
b1224bc0 | 41 | - make sure the /etc/udev/udev.conf file lists the udev_root as "/dev/" |
42 | and the udev_db as "/dev/.udev.tdb". It should contain the | |
43 | following lines in order to work properly. | |
7fdc5cb4 | 44 | udev_root="/dev/" |
b1224bc0 | 45 | udev_db="/dev/.udev.tdb" |
7fdc5cb4 | 46 | |
de46ad19 GKH |
47 | - reboot into a 2.6 kernel and watch udev create all of the initial |
48 | device nodes in /dev | |
49 | ||
50 | ||
51 | If anyone has any problems with this, please let me, and the | |
52 | linux-hotplug-devel@lists.sourceforge.net mailing list know. | |
53 | ||
54 | A big thanks go out to the Gentoo developers for showing me that this is | |
55 | possible to do. | |
56 | ||
57 | Greg Kroah-Hartman | |
58 | <greg@kroah.com> | |
59 | ||
60 | ||
61 | ---------------------------------- | |
62 | Patch to modify rc.sysinit to call udev at the beginning of the boot | |
63 | process: | |
64 | ||
65 | ||
66 | --- /etc/rc.sysinit.orig 2004-02-17 11:45:17.000000000 -0800 | |
67 | +++ /etc/rc.sysinit 2004-02-17 13:28:33.000000000 -0800 | |
68 | @@ -32,6 +32,9 @@ | |
69 | ||
70 | . /etc/init.d/functions | |
71 | ||
72 | +# start udev to populate /dev | |
73 | +/etc/rc.d/start_udev | |
74 | + | |
75 | if [ "$HOSTTYPE" != "s390" -a "$HOSTTYPE" != "s390x" ]; then | |
76 | last=0 | |
77 | for i in `LC_ALL=C grep '^[0-9].*respawn:/sbin/mingetty' /etc/inittab | sed 's/^.* tty\([0-9][0-9]*\).*/\1/g'`; do | |
78 | ||
79 |