Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: Gentoo Users List <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Re: Beta test Gentoo with mdev instead of udev; version 4
Date: Fri, 17 Feb 2012 23:44:19
Message-Id: 20120217234045.GA25390@waltdnes.org
In Reply to: [gentoo-user] Re: Beta test Gentoo with mdev instead of udev; version 3 by Walter Dnes
1 This revision removes a couple of steps in the process, so there's
2 less stuff involved. If only software developers worked that way <G>.
3
4 * Busybox stable is now past the buggy version that didn't work with
5 mdev. There is no need to keyword version 1.19.2
6
7 * The virtual/dev-manager-0.ebuild has been modified as per my feature
8 request to support an mdev-based system. There is no longer any need
9 for a customized/hacked ebuild in an overlay
10
11 The usual warnings apply...
12 * this is a beta
13 * use a spare test machine
14 * if you don't follow the instructions correctly, the result might be
15 an unbootable linux
16 * even if you do follow instructions, the result might be an unbootable
17 linux
18
19
20 1) Set up your kernel to support and automount a devtmpfs filesystem at
21 /dev
22
23 * If you prefer to edit .config directly, set
24 CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y
25
26 * If you prefer "make menuconfig", the route is as shown below. Note
27 that the "Autount devtmpfs..." option won't appear until you enable
28 "Maintain a devtmpf..." option.
29
30 make menuconfig
31 Device Drivers --->
32 Generic Driver Options --->
33 [*] Maintain a devtmpfs filesystem to mount at /dev
34 [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs
35
36 Once you've made the changes, rebuild the kernel.
37
38
39 2) Set up for emerging busybox. busybox requires the "mdev" flag in
40 this situation. The "static" flag is probably also a good idea. In
41 file /etc/portage/package.use add the line
42
43 sys-apps/busybox static mdev
44
45 Now, "emerge busybox"
46
47
48 3) In the bootloader append line, include "init=/sbin/linuxrc" where
49 the file /sbin/linuxrc consists of *AT LEAST*...
50
51 #!/bin/busybox ash
52 mount -t proc proc /proc
53 mount -t sysfs sysfs /sys
54 exec /sbin/init
55
56 This should be enough for most users. If you have an unusual setup,
57 you may need additional stuff in there. If you're using lilo remember
58 to re-run lilo to implement the changes.
59
60 4) Remove udev from the services list, and replace it with mdev. Type
61 the following 2 commands at the command line
62 rc-update del udev sysinit
63 rc-update add mdev sysinit
64
65
66 5) reboot to your new kernel. You're now running without using udev.
67
68
69 6) ***THIS STEP IS OPTIONAL*** This is only to alay any suspicion that
70 udev is still in use.
71
72 * execute the following command at the commandline
73 emerge --unmerge sys-fs/udev
74
75 * In file /atc/portage/package.mask, append the line
76 sys-fs/udev
77 Create the file if it doesn't already exist. You now have a totally
78 udev-free machine
79
80 --
81 Walter Dnes <waltdnes@××××××××.org>

Replies