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