Gentoo Archives: gentoo-dev

From: Nathan Phillip Brink <binki@g.o>
To: gentoo-dev@l.g.o
Cc: Walter Dnes <waltdnes@××××××××.org>
Subject: Re: [gentoo-dev] Suggestion for getting rid of udev
Date: Wed, 12 Oct 2011 05:28:21
Message-Id: 20111012053204.GE22488@ohnopublishing.net
In Reply to: [gentoo-dev] Suggestion for getting rid of udev by Walter Dnes
1 On Wed, Oct 12, 2011 at 12:40:23AM -0400, Walter Dnes wrote:
2 > Hi all
3 >
4 > Recently, there was a firestorm on the gentoo-user list over the idea
5 > that udev would eventually require /usr to be on the same physical
6 > parition as /, or else use initramfs, which is its own can of worms. I'm
7 > not a programmer, let alone a developer. Rather than merely ranting, I
8 > went and searched for an alternative.
9 ...
10 >
11 > Another option is to take the current Gentoo setup, drop udev and
12 > use mdev in the same manner as Alpine uses it. In case anyone asks,
13 > auto mounting should still be possible. Attached is an excerpt from
14 > /var/log/messages from a basic Alpine install. The kernel messages were
15 > generated when I inserted a USB key into a usb jack.
16
17 Seeing from the prior conversations here (sorry for lack of citation)
18 and
19 http://lists.busybox.net/pipermail/busybox/2011-September/076710.html
20 , I suspect that the root problem isn't with udev itself but with the
21 udev rules.
22
23 The magic which makes automatic userspace configuration possible is in
24 the udev rules and makes udev appear to be the problem. For example,
25 if you switch to mdev currently, you will notice that X11's device
26 autodetection doesn't work so well. (At least for me, X11's
27 autodetection magically works for detecting input devices with udev
28 but not with mdev). It is concievable that you could develop a
29 parallel database of mdev-compatible rules and even let packages
30 install rules specific to themselves (with modification to mdev
31 http://lists.busybox.net/pipermail/busybox/2011-September/076666.html
32 ). With these sorts of things, you might figure out a way to make
33 X11's device autoconfiguration work or perform other device
34 initialization tasks. But at the same time, you have a good chance of
35 accidentally introducing a reliance on libraries/programs installed to
36 /usr. This latter problem is the issue, deciding how much software
37 should have --prefix=/ versus the normal --prefix=/usr.
38
39 You can already try out what using mdev instead of udev is like in
40 Gentoo. Just add `sys-apps/busybox mdev' to /etc/portage/package.use,
41 remerge busybox. You must be sure to be using busybox-1.92.2 or later
42 for bug #83301.
43
44 # rc-update add mdev sysinit
45 # rc-update del udev sysinit
46
47 But be 'ware that this isn't guaranteed to provide a successful boot
48 ;-).
49
50 > Oct 9 13:46:00 e521 kern.info kernel: [10714.105621] usb 2-8: new high speed USB device using ehci_hcd and address 4
51 > Oct 9 13:46:00 e521 kern.info kernel: [10714.241353] usb 2-8: New USB device found, idVendor=13fe, idProduct=1e00
52 > Oct 9 13:46:00 e521 kern.info kernel: [10714.241357] usb 2-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
53 > Oct 9 13:46:00 e521 kern.info kernel: [10714.241360] usb 2-8: Product: Patriot Memory
54 > Oct 9 13:46:00 e521 kern.info kernel: [10714.241362] usb 2-8: Manufacturer:
55 > Oct 9 13:46:00 e521 kern.info kernel: [10714.241364] usb 2-8: SerialNumber: 078215A302CF
56 > Oct 9 13:46:00 e521 kern.info kernel: [10714.244241] scsi4 : usb-storage 2-8:1.0
57 > Oct 9 13:46:01 e521 kern.notice kernel: [10715.279753] scsi 4:0:0:0: Direct-Access Patriot Memory PMAP PQ: 0 ANSI: 0 CCS
58 > Oct 9 13:46:02 e521 kern.notice kernel: [10715.930991] sd 4:0:0:0: [sdb] 31326208 512-byte logical blocks: (16.0 GB/14.9 GiB)
59 > Oct 9 13:46:02 e521 kern.notice kernel: [10715.931980] sd 4:0:0:0: [sdb] Write Protect is off
60 > Oct 9 13:46:02 e521 kern.debug kernel: [10715.931983] sd 4:0:0:0: [sdb] Mode Sense: 23 00 00 00
61 > Oct 9 13:46:02 e521 kern.err kernel: [10715.931986] sd 4:0:0:0: [sdb] Assuming drive cache: write through
62 > Oct 9 13:46:02 e521 kern.err kernel: [10715.935986] sd 4:0:0:0: [sdb] Assuming drive cache: write through
63 > Oct 9 13:46:02 e521 kern.info kernel: [10715.981381] sdb: sdb1
64 > Oct 9 13:46:02 e521 kern.err kernel: [10715.986028] sd 4:0:0:0: [sdb] Assuming drive cache: write through
65 > Oct 9 13:46:02 e521 kern.notice kernel: [10715.986035] sd 4:0:0:0: [sdb] Attached SCSI removable disk
66
67 Unless if I'm missing something, those messages _always_ show up even
68 if udev or mdev haven't been invoked.
69
70 --
71 binki
72
73 Look out for missing or extraneous apostrophes!

Replies

Subject Author
Re: [gentoo-dev] Suggestion for getting rid of udev Walter Dnes <waltdnes@××××××××.org>