Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: Gentoo Users List <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Beta test Gentoo with mdev instead of udev; version 5
Date: Sun, 11 Mar 2012 21:36:36
Message-Id: 20120311213448.GB25554@waltdnes.org
In Reply to: [gentoo-user] Beta test Gentoo with mdev instead of udev; version 5 by Walter Dnes
1 Correcting a typo pointed out in the earlier post today.
2
3 This revision makes 2 changes...
4
5 A) The removal of udev is now standard instead of optional. udev-181
6 and higher will be pulling in kmod, and anything else that kmod depends
7 on. Removing udev will avoid unnecessary cruft on your machine.
8
9 B) Splitting up step 3) into 3a) and 3b) for greater clarity as
10 requested in user feedback.
11
12 The usual warnings apply...
13 * this is a beta
14 * use a spare test machine
15 * if you don't follow the instructions correctly, the result might be
16 an unbootable linux
17 * even if you do follow instructions, the result might be an unbootable
18 linux
19
20
21 1) Set up your kernel to support and automount a devtmpfs filesystem at
22 /dev
23
24 * If you prefer to edit .config directly, set
25 CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y
26
27 * If you prefer "make menuconfig", the route is as shown below. Note
28 that the "Autount devtmpfs..." option won't appear until you enable
29 "Maintain a devtmpf..." option.
30
31 make menuconfig
32 Device Drivers --->
33 Generic Driver Options --->
34 [*] Maintain a devtmpfs filesystem to mount at /dev
35 [*] Automount devtmpfs at /dev, after the kernel mounted the rootfs
36
37 Once you've made the changes, rebuild the kernel.
38
39
40 2) Set up for emerging busybox. busybox requires the "mdev" flag in
41 this situation. The "static" flag is probably also a good idea. In
42 file /etc/portage/package.use add the line
43
44 sys-apps/busybox static mdev
45
46 Now, "emerge busybox"
47
48
49 3 a) Create /sbin/linuxrc containing 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. Remember to
58 "chmod 744 /sbin/linuxrc" to make it executable.
59
60 In the bootloader "append" line, include "init=/sbin/linuxrc". If
61 you're using lilo remember to re-run lilo to implement the changes. If
62 you're using another bootloader, make the equivalant initialization.
63
64
65 4) Remove udev from the services list, and replace it with mdev. Type
66 the following 2 commands at the command line
67 rc-update del udev sysinit
68 rc-update add mdev sysinit
69
70
71 5) reboot to your new kernel. You're now running without using udev.
72
73
74 6) Remove udev as per the following instructions...
75
76 * execute the following command at the commandline
77 emerge --unmerge sys-fs/udev
78
79 * In file /etc/portage/package.mask, append the line
80 sys-fs/udev
81 Create the file if it doesn't already exist. You now have a totally
82 udev-free machine
83
84 --
85 Walter Dnes <waltdnes@××××××××.org>

Replies

Subject Author
Re: [gentoo-user] Beta test Gentoo with mdev instead of udev; version 6 Walter Dnes <waltdnes@××××××××.org>