Gentoo Archives: gentoo-user

From: Daddy <daddy@×××××××××××××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Beta test Gentoo with mdev instead of udev; version 5
Date: Sun, 11 Mar 2012 19:38:46
Message-Id: 1018566402.530386.1331494646526.JavaMail.open-xchange@email.1and1.com
In Reply to: Re: [gentoo-user] Beta test Gentoo with mdev instead of udev; version 5 by Alan McKinnon
1 On March 11, 2012 at 10:17 AM Alan McKinnon <alan.mckinnon@×××××.com>
2 wrote:
3
4 > On Sun, 11 Mar 2012 07:27:05 -0400 (EDT)
5 > Daddy <daddy@×××××××××××××××××××××.com> wrote:
6 >
7 > > On March 11, 2012 at 5:09 AM Walter Dnes <waltdnes@××××××××.org>
8 > > wrote:
9 > >
10 > > > This revision makes 2 changes...
11 > > >
12 > > > A) The removal of udev is now standard instead of optional.
13 > > > udev-181 and higher will be pulling in kmod, and anything else that
14 > > > kmod depends on. Removing udev will avoid unnecessary cruft on
15 > > > your machine.
16 > > >
17 > > > B) Splitting up step 3) into 3a) and 3b) for greater clarity as
18 > > > requested in user feedback.
19 > > >
20 > > > The usual warnings apply...
21 > > > * this is a beta
22 > > > * use a spare test machine
23 > > > * if you don't follow the instructions correctly, the result might
24 > > > be an unbootable linux
25 > > > * even if you do follow instructions, the result might be an
26 > > > unbootable linux
27 > > >
28 > > >
29 > > > 1) Set up your kernel to support and automount a devtmpfs
30 > > > filesystem at /dev
31 > > >
32 > > > * If you prefer to edit .config directly, set
33 > > > CONFIG_DEVTMPFS=y and CONFIG_DEVTMPFS_MOUNT=y
34 > > >
35 > > > * If you prefer "make menuconfig", the route is as shown below.
36 > > > Note that the "Autount devtmpfs..." option won't appear until you
37 > > > enable "Maintain a devtmpf..." option.
38 > > >
39 > > > make menuconfig
40 > > > Device Drivers --->
41 > > > Generic Driver Options --->
42 > > > [*] Maintain a devtmpfs filesystem to mount at /dev
43 > > > [*] Automount devtmpfs at /dev, after the kernel mounted the
44 > > rootfs
45 > > >
46 > > > Once you've made the changes, rebuild the kernel.
47 > > >
48 > > >
49 > > > 2) Set up for emerging busybox. busybox requires the "mdev" flag in
50 > > > this situation. The "static" flag is probably also a good idea. In
51 > > > file /etc/portage/package.use add the line
52 > > >
53 > > > sys-apps/busybox static mdev
54 > > >
55 > > > Now, "emerge busybox"
56 > > >
57 > > >
58 > > > 3 a) Create /sbin/linuxrc containing at least
59 > > >
60 > > > #!/bin/busybox ash
61 > > > mount -t proc proc /proc
62 > > > mount -t sysfs sysfs /sys
63 > > > exec /sbin/init
64 > > >
65 > > > This should be enough for most users. If you have an unusual
66 > > > setup, you may need additional stuff in there. Remember to
67 > > > "chmod 744 /sbin/linuxrc" to make it executable.
68 > > >
69 > > > In the bootloader "append" line, include "init=/sbin/linuxrc". If
70 > > > you're using lilo remember to re-run lilo to implement the
71 > > > changes. If you're using another bootloader, make the equivalant
72 > > > initialization.
73 > > >
74 > > >
75 > > > 4) Remove udev from the services list, and replace it with mdev.
76 > > > Type the following 2 commands at the command line
77 > > > rc-update del udev sysinit
78 > > > rc-update add mdev sysinit
79 > > >
80 > > >
81 > > > 5) reboot to your new kernel. You're now running without using
82 > > > udev.
83 > > >
84 > > >
85 > > > 6) Remove udev as per the following instructions...
86 > > >
87 > > > * execute the following command at the commandline
88 > > > emerge --unmerge sys-fs/udev
89 > > >
90 > > > * In file /atc/portage/package.mask, append the line
91 > > > sys-fs/udev
92 > > > Create the file if it doesn't already exist. You now have a
93 > > > totally udev-free machine
94 > > >
95 > > > --
96 > > > Walter Dnes <waltdnes@××××××××.org>
97 > > >
98 > >
99 > > Having personally long considered Lennart Poettering a 'spawn of the
100 > > devil' my question is ... is this your reaction to systemd?
101 >
102 >
103 > No, it's his reaction to the fantastical amount of kitchen-sinking
104 > going on surrounding udev. Most specifically, it's the recent
105 > "requirement" foisted on the udev-using community to require
106 > either /usr to be part of / or to use an initramfs.
107 >
108 > Walter simply wants to show that mdev is a suitable replacement for
109 > udev in simple environments eg embedded, simple desktops without
110 > complex hotplug requirements, and servers.
111 >
112 > Canek will no doubt chip in about how this is the way things are going,
113 > it is inevitable, the boot sequence is becoming complex and various
114 > other rehashings of what's coming out of udev upstream.
115 >
116 > However, something needs to be pointed out in that regard. What udev
117 > upstream is saying is probably quite true, but only within the limits
118 > of the environment in which they work and udev is designed to handle -
119 > sophisticated desktops. The three cases I mentioned are perfectly valid
120 > use-cases, comprise a large percentage of the Linux installed base,
121 > should be catered to and have no need of the sophistication current
122 > udev aims to provide.
123 >
124 > As such, mdev is a good fit and we can add Walter to the long list of
125 > people before him who selflessly worked to make our software work
126 > better.
127 >
128 > >
129 > > One minor typo to point out:
130 > >
131 > > /atc/portage/package.mask should be /etc/portage/package.mask
132 > >
133 > > I just joined this list last week, but might consider sacrificing some
134 > > hardware to join your endeavor if you need more testers.
135 >
136 >
137 > Welcome to the list, you'll soon get to know all the personalities
138 > here. We have at least one of everything - class clowns, old farts,
139 > newbies, voices of reason, influential devs and even the occasional
140 > fellow who knows what he's talking about.
141 >
142 > :-)
143 >
144 >
145 >
146 >
147 > --
148 > Alan McKinnnon
149 > alan.mckinnon@×××××.com
150
151
152 First, my class is old fart. Though I'm always in IRC, mailing lists and
153 forums are more my speed.
154
155 <story>
156
157 I built my first PC in 1984, but dropped out of society in totality from
158 1986 until 1996. In '97 an old PC was given me, then in '98 we bought a
159 bare bones desktop box online and applied some nasty Mickey$oft OS to it.
160 Subsequent hardware failures led me down the path I'm on today.
161
162 In 1999 a Linux geek where I worked introduced me to RedHat, which couldn't
163 be successfully updated on my dialup connection. To me at that time, it
164 looked like some hobby kit you'd get from Radio Shack.
165
166 In 2003, while living in China, one of the principles of the privacy
167 service we used out of Virginia convinced me my computer was fast enough,
168 and rather than making a RAID0 with the second drive, to "try Linux". It
169 was RedHat 9.0, and after one month the distro itself sickened me.
170
171 However, in that length of time I'd found "cdrecord" and various other apps
172 and scripts via CLI ... and seen the ability of Linux to multitask ... and
173 I was hooked. The next few months were spent on Debian, with a kind
174 gentleman from Belgium offering to mentor me. But all he offered, it turned
175 out, were his scripts to do things. One day he just disappeared off the
176 face of the earth.
177
178 By that time I'd gotten addicted to rebuilding my kernel, especially
179 getting it down to < 1.0MB. And since this guy's "script" was the only way
180 I'd done it, me and Google struck out for the bright, new Linux horizon.
181 Someone had pointed me to "The Cathedral and The Bazaar", also, and my mind
182 was made up. The business model and practices of Mickey$oft and that
183 fruitloop company had opened my eyes to a world I wished I'd never seen, so
184 I was looking for a way out. (They'd stolen, and killed by lawsuit, two
185 particular projects of interest to me.)
186
187 After a month of reading (primarily some Google groups and
188 LinuxQuestions.org), it seemed that my desires would best be met by (a)
189 LFS, (b) Gentoo, or (c) Slackware. Not wanting to spend so much time
190 compiling from source, not knowing the benefit, and having Gentoo buddies
191 who regularly broke their system and spent more time compiling than I spent
192 awake -- Slackware became my Linux distro. From Nov 2003 until the end of
193 2010, I was a Slacker.
194
195 Eventually the Slackware community no longer appealed to me (nicest thing I
196 can say). Most of my time working on projects was spent with the #2 in
197 Slackware via email and IM anyway.
198
199 In January 2011 we moved from China back to America. The other big change
200 was my migration to Gentoo.
201
202 Today we have 1 workstation, 1 server, one PC, and 2 laptops running Gentoo
203 (all but one laptop have no other OS). No devices plugged into our LAN are
204 automounted.
205
206 My server is headless and X-less; all the other comps run Fluxbox. IMO
207 there is no need for a desktop environment, but then, we use our computers
208 for work. When we want to play we leave them alone.
209
210 We opened Happy Penguin Computers 5 months after returning to America, and
211 are still getting established. That's my introduction to this list.
212
213 </story>
214
215 We have spare parts so tomorrow I'll build a test machine. My Gentoo
216 knowledge is quite limited, seeing as how we moved back after 9 years and
217 had to start life over. But I can start by following this guide, and
218 probably reading and learning about ebuilds. They're quite different from
219 Slackware's build scripts, primarily due to dependency checking, etc.
220
221 Kindest regards,
222 Bruce Hill

Replies

Subject Author
Re: [gentoo-user] Beta test Gentoo with mdev instead of udev; version 5 David Abbott <david@×××××××××.com>
Re: [gentoo-user] Beta test Gentoo with mdev instead of udev; version 5 Alan McKinnon <alan.mckinnon@×××××.com>