Gentoo Archives: gentoo-user

From: waltdnes@××××××××.org
To: Gentoo Users List <gentoo-user@l.g.o>
Subject: [gentoo-user] Anybody want to beta test Gentoo with mdev instead of udev?
Date: Tue, 15 Nov 2011 06:22:39
1 After a recent thread, about udev developers wanting /usr on the same
2 partition as / (or else requiring initramfs), it was pretty obvious
3 that 90%+ of the users here strongly disliked the idea. I went around
4 asking on various lists if it was possible to run Gentoo without udev.
5 After some research, and various unrelated delays, I've come up with a
6 working Gentoo without udev. It turns out that busybox's mdev
7 implementation is sufficient for my needs. I do the usual email, web
8 surfing, including Youtube. I'm listening to as I type this
9 email, so Flash works just fine. Contrary to the FUD I've heard, X
10 works just fine, thank you, without an xorg.conf. Modern flatscreens
11 with EDID info are set up automatically. I suppose that old CRT
12 monitors without EDID info might require xorg.conf, but that's "exotic
13 hardware" nowadays. The only change I notice is somewhat faster bootup.
15 The purpose of this email is to ask adventurous people here to beta
16 test my approach to a udev-less Gentoo. If we don't find any
17 showstopper problems, we can think about requesting Gentoo developers to
18 support an mdev-based profile. It would help the cause if a large
19 number of testers can report that it works for them. The instructions
20 for a udev-ectomy follow below. Thanks to Zac Medico and others on the
21 Gentoo developers' list for their helpful hints and pointers on how to
22 do this. I couldn't have figured this out by myself.
24 The usual warnings apply...
25 * this is a beta
26 * use a spare test machine
27 * if you don't follow the instructions correctly, the result might be
28 an unbootable linux
29 * even if you do follow instructions, the result might be an unbootable
30 linux
33 1) Set up your kernel to support and automount a devtmpfs filesystem at
34 /dev
36 * If you prefer to edit .config directly, set
39 * If you prefer "make menuconfig", the route is as shown below. Note
40 that the "Autount devtmpfs..." option won't appear until you enable
41 "Maintain a devtmpf..." option.
43 make menuconfig
44 Device Drivers --->
45 Generic Driver Options --->
46 [*] Maintain a devtmpfs filesystem to mount at /dev
47 [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs
49 Once you've made the changes, rebuild the kernel.
52 2) Set up for emerging busybox, there are 2 items to change
54 A) It appears that there may be an mdev bug in older versions of
55 busybox. To avoid that bug, keyword busybox-1.19.2 in
56 /etc/portage/package.keywords E.g. if you're using 32-bit Gentoo on
57 Intel, the incantation is...
59 =sys-apps/busybox-1.19.2 ~x86
61 Change the "~x86" to reflect your architecture, etc.
63 B) busybox requires the "mdev" flag in this situation. The "static"
64 flag is probably also a good idea. In file /etc/portage/package.use
65 add the line
67 sys-apps/busybox static mdev
69 Now, "emerge busybox"
72 3) In the bootloader append line, include "init=/sbin/linuxrc" where
73 the file /sbin/linuxrc consists of *AT LEAST*...
75 #!/sbin/busybox ash
76 mount -t proc proc /proc
77 mount -t sysfs sysfs /sys
78 exec /sbin/init
80 This should be enough for most users. If you have an unusual setup,
81 you may need additional stuff in there. If you're using lilo remember
82 to re-run lilo to implement the changes.
84 4) Remove udev from the services list, and replace it with mdev. Type
85 the following 2 commands at the command line
86 rc-update del udev sysinit
87 rc-update add mdev sysinit
90 5) reboot to your new kernel. You're now running without using udev.
93 6) ***THIS STEP IS OPTIONAL*** This is only to alay any suspicion that
94 udev is still in use. udev is pulled in by virtual/dev-manager,
95 which in turn is pulled in by the kernel.
96 * cd /usr/portage/virtual/dev-manager
97 * Make a backup copy of dev-manager-0.ebuild
98 * Edit dev-manager-0.ebuild to include "sys-apps/busybox" as one option
99 in RDEPEND, like so...
101 RDEPEND="|| ( sys-fs/udev
102 sys-fs/devfsd
103 sys-apps/busybox
104 sys-fs/static-dev
105 sys-freebsd/freebsd-sbin )"
107 I had really wanted to use "sys-apps/busybox[mdev]", but an EAPI-0
108 ebuild can't handle that syntax.
110 * execute the following 3 commands at the commandline
111 ebuild dev-manager-0.ebuild digest
112 emerge -1 dev-manager
113 emerge --unmerge sys-fs/udev
115 * In file /atc/portage/package.mask, append the line
116 sys-fs/udev
117 Create the file if it doesn't already exist. You now have a totally
118 udev-free machine
120 --
121 Walter Dnes <waltdnes@××××××××.org>