1 Author: James Powell <james4591 [at] hotmail [dot] com>
3 Date: 2014-04-30 Version 0.0.6
5 License: The MIT License
7 Copyright (c) 2014 James Powell
9 ================================================================================
11 Permission is hereby granted, free of charge, to any person obtaining a copy of
12 this software and associated documentation files (the "Software"), to deal in
13 the Software without restriction, including without limitation the rights to
14 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
15 of the Software, and to permit persons to whom the Software is furnished to do
16 so, subject to the following conditions:
18 The above copyright notice and this permission notice shall be included in all
19 copies or substantial portions of the Software.
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 ================================================================================
33 systemd, while being a new and exciting daemon control system, can often be
34 very invasive with how it works with other system tools, daemon services, and
35 even various software sets. Not only that but systemd is rather large at 410MB
36 and requires 4.5 SBUs of time to build and install. The overall space of the
37 actual installation is around 60-65MB or so, but still it's rather large by
40 Eudev is smaller considerably at 7.4MB and faster to build at 0.3 SBUs, and
41 provides the same functionality of systemd-udev utilzied by LFS/BLFS minus the
42 service management functionality, alternative init, and isn't invasive to the
43 environment requiring itself to be a hard dependency.
45 There are other reasons people would choose to not use systemd that are more
46 personal, political, and are opinions directed at the maintainers of systemd
47 and systemd's ultimate goal, but those are best left for another discussion
50 The point of eudev is to ask this as a question, why install all of systemd
51 just for udev, when all you want is udev? The answer is obvious, you install
52 eudev. If you don't need or want systemd, why even bother with it?
54 Eudev gives you the end-user and system administrator the ultimate choice. It's
55 small, does what its supposed to, and doesn't require anything extra. It's
56 there, it's quiet, and it behaves itself.
58 Now enough babble, and on with the installation...
60 ================================================================================
64 None. Basically, you can build LFS as normal up to systemd and switch to
67 As a side note due to eudev being a lighter weight udev implementation you may
68 also skip sections of the LFS book...
70 Attr - 4.5 SBUs - Chapter 6.22
71 Acl - 0.2 SBUs - Chapter 6.23
72 libcap - 0.1 SBUs - Chapter 6.24
73 expat - 0.1 SBUs - Chapter 6.40
74 XML::Parser - 0.2 SBUs - Chapter 6.43
75 Intltool - 0.1 SBUs - Chapter 6.50
76 D-Bus - 0.4 SBUs - Chapter 6.68
78 In all that's a total, added with systemd, 10 SBUs and about 100 MB less time
81 The rest of the system configuration is fairly much the same.
83 ================================================================================
87 I'd like to thank Bruce Dubbs, one of the LFS project maintainers for giving me
88 the chance to not only contribute to LFS, but to give users of LFS, yet another
89 choice in what they want in their system, as well as the entire LFS team for
90 giving advanced users of Linux a chance at building our own custom systems, as
91 well as insightful information that was critical to this project.
93 I'd like to also thank Stoat, Ken Moffat, and akhiezer for helping with the
94 testing, retesting, and re-retesting that sorted out bugs, cleaned up the
95 installation, directory paths, and other key features of eudev I missed.
97 I'd also like to thank the unnamed users and system builders who at least took
98 the time to read this hint and see all the hard work that went into it, and
99 more thanks to those who chose to use this hint in their own builds.
101 I'd like to thank the guys at www.boycottsystemd.org that are leading the
102 charge against systemd in favor of more compliancy with the UNIX Philosophy,
103 open and universal-platform standards, as well as the ongoing search for a
104 true successor to sysvinit that is multi-platform standard friendly.
106 I'd also like to thank Doug Mcllroy for stating the obvious in regards to how
107 UNIX should be regardless of flavor. "Write programs that do one thing and
110 ================================================================================
118 0.0.2 - Some minor corrections
121 0.0.3 - Additional information of exclusions that are not required.
122 Added information on systemd sections that can be skipped from
126 0.0.4 - Additional cleanup and reorganization of the documentation and
127 headers of the document.
130 0.0.5 - Additional scripts and extra sections to eliminate more unneeded
132 Added additional directory listed for extra udev functionality purposes.
133 Added installation map of software package.
134 Thank you Stoat at LinuxQuestions.org for the updates.
137 0.0.6 - Added information regarding updated content of Eudev-1.6.
138 Cleaned up install flags to properly build shared libs.
140 You may have noticed that the eudev-manpages are not included with this
141 release for B/LFS. This is because these manpages were pregenerated for
142 users. In order to generate the proper manpages you will first need to
143 install libxslt from BLFS. Documentation on this is included.
146 ================================================================================
150 First download a copy of eudev to your system, and it's manpages:
152 Eudev (1.6) - 1,689 KB:
153 Home page: http://www.gentoo.org/proj/en/eudev/
154 Download: http://dev.gentoo.org/~blueness/eudev/eudev-1.6.tar.gz
155 MD5 sum: c2fbf420a50d07b80158a0185cbb08f7
157 As an extra hint, you can eliminate the systemd download and md5sum entries
158 in md5sums and wget-list and replace it with these entries for eudev if desired.
160 For it's brief time it was included in LFS, Eudev was stationed at Chapter 6.62
161 so these instructions are the same instructions preserved from the book.
163 ================================================================================
165 6.62.1 Installation of Eudev
167 Prepare Eudev for compilation:
169 sed -i '/struct ucred/i struct ucred;' src/libudev/util.h
170 sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl
171 BLKID_CFLAGS=-I/tools/include \
172 BLKID_LIBS='-L/tools/lib -lblkid' \
173 ./configure --prefix=/usr \
180 --with-rootlibdir=/lib \
183 --enable-rule_generator \
187 --disable-introspection \
190 --disable-gtk-doc-html \
191 --with-firmware-path=/lib/firmware
197 Create some directories now that are needed for tests, but will also be used as
198 a part of installation:
200 mkdir -pv /lib/{firmware,udev/devices/pts}
201 mkdir -pv /lib/udev/{devices/pts,rules.d}
202 mkdir -pv /etc/udev/{hwdb.d,rules.d}
204 To optionally test the results, run this command:
208 *NOTE: The udev-test.pl will fail due to an unknown error. It's safe to ignore this.
209 I have not been able to track down the source of this error, except a flaw in
210 reading device node, /dev/null. This is probably a permissions error or a test that
211 is ran by a user account and not root.
217 If you rebuild with libxslt, "make install" will automatically install the manpages.
219 -----------------------------------------------------------------------------------------
220 This next step is probably optional, but is recommended you at least attempt to complete.
221 The LFS init-net-rules.sh script is possibly still required to be ran as far as I can
223 -----------------------------------------------------------------------------------------
225 Extract udev-lfs-20140408 into your /sources directory enter the directory and execute
228 make -f Makefile.lfs install
230 in the directory as suggested by the book. This package is no longer directly tied to
231 systemd and can be ran seperately. This will install important scripts for Eudev. Many
232 thanks to Bruce Dubbs for creating this package.
234 Lastly, this next step will be required post-installation of the LFS-Bootscripts
236 Open /etc/rc.d/init.d/udev in a text editor such as Vi, Nano, etc.
240 # Start the udev daemon to continually watch for, and act on,
242 /lib/systemd/systemd-udevd --daemon
244 and change it to the following:
246 # Start the udev daemon to continually watch for, and act on,
248 /lib/udev/udevd --daemon
250 Also change each command for:
258 Open /etc/rc.d/init.d/udev_retry in a text editor as above:
264 and edit each of them to reflect this command:
268 We want udevadm to work from the /sbin directory, not the actual install
271 By default LFS now uses systemd-udev so in order to initialize the udev
272 daemon, you'll need to edit the scripts to work from Eudev's locations.
274 Now initialize the hardware database:
276 /usr/bin/udevadm hwdb --update
278 And run the udev init-net-rules.sh shell script
280 /lib/udev/init-net-rules.sh
282 This will generate several rules used by default with udev/eudev.
284 6.62.2 Contents of Eudev
286 Installed programs: udevadm and udevd
287 Installed libraries: libudev.so
288 Installed directories: /etc/udev, /lib/udev, and /lib/firmware
294 Generic udev administration tool: controls the udevd daemon, provides info from
295 the Udev database, monitors uevents, waits for uevents to finish, tests Udev
296 configuration, and triggers uevents for a given device
300 A daemon that listens for uevents on the netlink socket, creates devices and
301 runs the configured external programs in response to these uevents
305 A library interface to udev device information
309 Contains Udev configuration files, device permissions, and rules for device naming
311 ===================================================================================
313 That's it. You now have Eudev installed on your system.
315 If and when you want to rebuild Eudev for gudev support, the compilation
316 process is the same except that you will need to simply remove per line needed:
318 BLKID_CFLAGS=-I/tools/include \
319 BLKID_LIBS='-L/tools/lib -lblkid' \
321 Per each used, they will require you install the following from BLFS:
323 GLib - required for gudev (Used by a number of BLFS packages)
324 Gperf - required for keymap (Comes with LFS and is useful for
325 laptop and netbook PCs)
326 gobject-introspection - required for gir-data (Used by some Gnome applications)
328 To enable gobject-introspection simply replace flag:
330 --disable-introspection \
334 --enable-introspection \
336 If you wish to rebuild the manpages, you will also need the package libxslt from
337 BLFS. The configure script will detect libxslt and rebuild the manpages
338 automatically upon executing make.
340 If you wish to build the API documentation change this flag:
342 --disable-gtk-doc-html
346 --enable-gtk-doc-html
348 In addition to these changes, there are other sections you may not require
349 from the book as well:
351 Chapter 6.6 - Creating Essential Files and Symlinks
353 You will not the need the following user groups for Eudev:
357 systemd-journal:x:23:
359 Special note on this:
361 Eliminating the messagebus usergroup fixes an error in BLFS regarding
362 installing d-bus where generating the usergroup described there results
365 Chapter 6.64 - SysVinit relinking command:
367 for p in init halt poweroff reboot runlevel shutdown telinit; do
368 mv -v /sbin/$p /sbin/$p-sysv
369 mv -v /usr/share/man/man8/$p.8 /usr/share/man/man8/$p-sysv.8
372 Is not required as we will not be installing systemd.
374 Chapter 7.1 - Introduction
376 Because we are using sysvinit, the systemd and sysvinit switch scripts do not
377 require being created. This chapter can be skipped.
379 Chapter 7.2 - LFS-Bootscripts
381 You can also delete the "ifupdown@.service" unit file for systemd. Simply
382 run the command "whereis ifupdown@.service", change directories to it's
383 location, and use "rm -rf ipupdown@.service" to delete this unneeded file.
384 If any systemd directories are left behind, delete them at your leisure.
386 Chapter 7.3.3 - systemd Network Interface Card setup
388 Again this is not required.
390 Chapter 7.8 - systemd Customization
392 This whole chapter is not required.
394 Chapter 7.10.2 - systemd Clock Configuration
396 Again, yet another unrequired section
398 Chapter 7.11.2 - systemd Console
400 Yet another unrequired section
404 ================================================================================
406 Additional Thanks to:
408 Ken Moffat and akhiezer for Corrections and added information.
409 Stoat and Bruce Dubbs for additional corrections, files, and other info.
411 ================================================================================