Gentoo Archives: gentoo-user

From: Mark David Dumlao <madumlao@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Anyone switched to eudev yet?
Date: Wed, 26 Dec 2012 15:58:34
Message-Id: CAG2nJkP4qFHRCcENciHApMAgEAvry+S40NG7tGn7TXUyNcOgAg@mail.gmail.com
In Reply to: Re: [gentoo-user] Re: Anyone switched to eudev yet? by Dale
1 On Tue, Dec 25, 2012 at 9:54 AM, Dale <rdalek1967@×××××.com> wrote:
2 > Mark David Dumlao wrote:
3 >> On Tue, Dec 25, 2012 at 1:15 AM, Bruce Hill
4 >> <daddy@×××××××××××××××××××××.com> wrote:
5 >>> On Mon, Dec 24, 2012 at 11:05:25AM -0600, Dale wrote:
6 >>>> Bruce Hill wrote:
7 >>>>
8 >>>> <<< SNIP >>>
9 >>>>> No initrd...
10 >>>> YET!!! ROFL
11 >>>>
12 >>>> When eudev goes stable, then we can disregard that yet. ;-)
13 >>>>
14 >>>> Dale
15 >>> devfs still works wonderfully ... for principle, if no other reason, that file
16 >>> server will *NEVER* have an initrd image
17 >> You shouldn't need to wait for eudev.
18 >>
19 >> Technically any early mount system configured and done _before_ udev
20 >> should do the trick. I mean, it's not like udev is even *essential*
21 >> for boot - that we happen to depend on it is just a matter of
22 >> convenience. Shouldn't be hard to write an rc script that does just
23 >> that for anyone that hates init thingies bad enough. Just hardcode an
24 >> n-second sleep and plug in the kernel detected device name. Do rc
25 >> scripts count as "init thingies"? :)
26 >
27 > Is that what eudev is going to do? I follow -dev and according to the
28 > eudev people they are going to support a separate /usr with no init
29 > thingy. So, they have a plan to do this. From what they were posting,
30 > they seem pretty sure they can do this.
31
32 Contrary to all the noise in this topic, udev itself works on /.
33
34 The thing is this: udev is now being _installed to_ /usr instead of /.
35 This is an upstream decision.
36
37 See, there's a common bug with a lot of programs using udev. They are
38 also installed to /usr instead of to /. And so those programs will
39 _silently_ fail when /usr isn't mounted. Silent failures are deemed a
40 bad thing by some people, worse so than noisy failures, something to
41 do with the Unix philosophy of failing early and loudly.
42
43 Now, you can install udev to / if you want - by writing a custom
44 ebuild that does just that. And it should, in theory, work. But if you
45 want it to run without hitches, you _must_ make sure /usr is mounted
46 in time for all the rules to run. That's why an early mount script
47 will fix any issues with udev.
48
49 One way of getting an early mount script - the most reliable and
50 comprehensively tested one - is to use an "init thingy". I haven't
51 used one in a long time, but you generally just run a script,
52 mkinitrd/mkinitramfs/dracut, that generates it for you. The init
53 thingy is a compressed filesystem that contains just enough tools and
54 modules you need to test and mount your filesystems. Which,
55 conspicuously, was supposed to be the reason for the / being separated
56 from the /usr filesystem.
57
58 But besides the point - it's not the only way. You could just write a
59 mount script yourself, and force your mount script to run before udev
60 does, by editing udev's dependencies in /etc/conf.d/udev. That will
61 also fix any issues udev has with /usr.
62
63 The eudev team did a different thing. They forked udev and changed
64 some bits around that they didn't like. But the one thing they didn't
65 fix - which by definition they cannot fix - is the fact that programs
66 depending on eudev - and installed to /usr - will _still_ need /usr
67 mounted beforehand to function properly.
68
69 A lot of us don't have those programs, or invoke those programs late
70 enough in the system uptime that /usr is guaranteed to be mounted. So
71 we just coincidentally happen to not run into any trouble.
72 --
73 This email is: [ ] actionable [ ] fyi [x] social
74 Response needed: [ ] yes [x] up to you [ ] no
75 Time-sensitive: [ ] immediate [ ] soon [x] none