Gentoo Archives: gentoo-amd64

From: Rich Freeman <rich0@g.o>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Please get me straight about sysvinit vs. systemd, udev vs eudev vs mdev, virtuals and other things...
Date: Sun, 02 Mar 2014 18:10:09
Message-Id: CAGfcS_mfCvQuZSBCRXqWtxGG3CR6NLUcanTCg_Y9zSe96EEJDw@mail.gmail.com
In Reply to: [gentoo-amd64] Please get me straight about sysvinit vs. systemd, udev vs eudev vs mdev, virtuals and other things... by Mark Knecht
1 On Sun, Mar 2, 2014 at 11:57 AM, Mark Knecht <markknecht@×××××.com> wrote:
2 > In the last few days there is a news announcement about needing to
3 > change kernel my configuration to enable CONFIG_FHANDLE to support
4 > udev-210. I'm currently at udev-208 and virtual/udev-208-r1 so no big
5 > deal yet. However reading the news announcement it appears this has
6 > more to do with systemd than anything else and I don't use systemd so
7 > does/will this effect my machines?
8
9 I'm going to avoid repeating Canek's points, which are basically
10 correct on the factual matters.
11
12 However, I will clarify a little about why you probably think the news
13 has something to do with systemd.
14
15 The big change in udev-210 is how persistent network device names are
16 implemented. The file that implements the rules is changing names,
17 which has an impact on your if you're trying to override it (your
18 override will no longer work if you don't change the name to follow
19 suit). Also, the new rule file now pulls in config settings from a
20 file that contains "systemd" in the filename. If you want to tweak
21 the persistent naming without disabling it entirely, it would make
22 sense to try to do so by editing that file, regardless of whether
23 you're using systemd. The file contains systemd in the name because
24 it is also used by systemd for network settings. So, you have udev (a
25 binary) loading a rule file (text) which loads a config file (text).
26 This is analogous to openrc running an init script which sources a
27 config file - editing the config file is preferable to editing the
28 script but nothing prevents you from doing either.
29
30 > I think the Gentoo devs forked udev to make either mdev or eudev
31 > but when it was announced it was too new for me so I just let it go
32 > by. Maybe now it's time for me to look into making a change of some
33 > type? I see eudev in portage, but not mdev.
34
35 Ok, just some definitions:
36 udev - the upstream project that you're familiar with - it has
37 recently merged with systemd, which has resulted in some changes that
38 some find objectionable (changes in install paths, incorporation of
39 systemd in file/path names, etc)
40
41 eudev - a fork of udev that attempts to basically do the same thing as
42 udev, but preserving the paths/etc used in the project prior to the
43 systemd merge.
44
45 mdev - shorthand for busybox mdev. This isn't a separate package. If
46 you have busybox installed you can use a function it supports which
47 will populate /dev based on detected devices, in a manner similar to
48 udev. It is much less functional that udev, but if you have a simple
49 system where you don't need hot-swap support and all the bells and
50 whistles, it will give you a /dev similar to what you probably would
51 find on most linux boxes 10 years ago.
52
53 > A (really, really, really) quick scan of the current install docs
54 > makes me think sysvinit/OpenRC/udev is still the default for new
55 > installs. Is this true? If so why is this kernel change being
56 > required?
57
58 Udev is changing upstream - presumably because the new kernel features
59 are helpful in some way. I haven't read the details.
60
61 > Also, I seem to have virtual/udev installed which says it's about
62 > enabling switching between udev & eudev. However there are no files
63 > associated with virtual/udev. (equery files virtual/udev returns
64 > nothing) It appears I cannot install eudev without removing udev so
65 > this seems a big step to take:
66
67 virtual/udev is a virtual package. Virtual packages are called
68 virtual because they don't install files. They exist for dependency
69 purposes - a package can depend on the virtual which lets you pick
70 whether you want to use udev or eudev or something else without lots
71 of things breaking.
72
73 Eudev is a fork of udev and cannot co-exist with it. It would be like
74 installing mariadb and mysql on the same system, or openoffice and
75 libreoffice. So, if you want to install it portage will helpfully
76 suggest uninstalling udev.
77
78 I won't tell you what you should be doing, but before you switch from
79 the defaults (openrc+udev+sysvinit) you should probably make sure you
80 understand what you're getting into. The upstream udev is certainly
81 what 99% of Linux users will be using in general for the foreseeable
82 future, though I can't really see you getting into trouble with eudev
83 or mdev (with many limitations on the latter). Migrating between them
84 isn't very hard at the moment, though if config files/etc start
85 diverging between eudev and udev that will make it harder to switch
86 (depending on how much you tweak on your system).
87
88 Rich

Replies