Gentoo Archives: gentoo-user

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

Replies