Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am building everything by hand, it is gonna take a while. I already finished the core now I am on BLFS book. Since my script skills are 0 I am building everything by hand.
Why doesn't the Eudev hint include Intltool and GPerf in the list of packages that can be omitted if Systemd is not being built? They are listed in the "What's New" section of the current development version of the LFS book along with the six packages listed in the hint (seven including systemd itself).
That same group was also listed in the release announcement of the original Systemd version of the LFS book as newly added packages for installing Systemd.
I wasn't able to find any dependency connections between Intltool or Gperf and any of the normal LFS packages.
P.S.: Some other things possibly worth mentioning in the hint are to omit the renaming steps on the Sysvinit page of the current development version of the LFS book...
Stoat, the new hint I submitted to Bruce contains all the new changes to the document, so this has already been taken care of, but the new version has not been uploaded yet, nor have I gotten a reply from Bruce, following version 0.0.3 of the Hint file. The LFS-Dev mailing list has also been fairly quiet as well. I have submitted version 0.0.2, so this version here will be newer.
Those packages listed were from BLFS additions that are unique only to systemd and not eudev. Gperf is included with LFS due to the fact Gperf is useful for laptops and netbooks. Version 3.0.4 from the BLFS book was updated to reflect this. This package is not listed because it's a laptop/netbook recommended package for eudev's keymap feature. Only Intltool is required by systemd as are the other listed packages that are safe to exclude.
As for the renaming sections, yes, you can omit a lot of the extra work shown in the book, and even delete the systemd file create from the bootscripts if necessary. If you want a pre-release of v0.0.3, I'll post it here...
Thanks for your interest and work on this. Have you tested it yourself yet? I have been testing this stuff for a day or so on a new build from LFS SVN-140408. In addition to the things that I mentioned here earlier (and you had already fixed), I found that the udev initscript installed from lfs-bootscripts-20140404.tar.bz2 has to be edited for this...
Code:
# Start the udev daemon to continually watch for, and act on,
# uevents
/lib/systemd/systemd-udevd --daemon
As soon as I figured that out, the thing started working. Actually a bunch of stuff started working. It also might be necessary for some people to edit both the udev and udev_retry initscripts for the path to udevadm. The default is for Eudev to install that as /usr/bin/udevadm, but the configure options can change that to something else. The bootscript tarball I am using has /sbin/udevadm in both udev and udev_retry.
Also that init-net-rules.sh script that used to be installed with the "udev extraction" method did not get installed. I threw that into my test setup, too. But I am not completely sure it's needed at the moment.
I was trying a bunch of stuff from your hint, notes from my earlier Eudev-1.4 eforts, the CLFS stuff, and my current BLFS system based on LFS 7.5. Honestly, I was kinda thrashing around, not keeping careful notes, so the definitive set of steps is not clear in my head at the moment. My eudev config options were slightly different from the hint making various things get installed in different places, but that is not important or can be sorted out with symlinks and such.
I have this test LFS build scripted so I plan to do it over and over until I understand the Eudev part of it. If I learn anything interesting or different from the hint, I will publish it here somewhere. Anyway, the hint will get sorted out and will work very well. I just hope the Gentoo Eudev project keeps going.
LFS 7.5 uses udev extracted from Systemd-208. So no problems. But the LFS developers recently ditched that method in the development version of LFS and briefly replaced it with Eudev which is a fork of Udev that is maintained by some developers at Gentoo. Eudev is intended to be sort of a replacement for Udev which vanished when it merged with Systemd. Eudev and the "extract-Udev-from-Systemd" methods both have been around for a year or so since Udev went away. Well now the LFS developers have changed direction again and currently have us install the whole Systemd thing in the development version. They invented a clever way for users to choose to use Systemd for the init stuff or SysVinit (and Udev from the Systemd stuff). This thread here is about the LFS hint (by ReaperX7) that preserves the short-lived steps in the LFS book on how to use Eudev for the init stuff and ignore completely Systemd & Udev. But I don't think Eudev was in the book long enough to get perfected for LFS. I've been talking here about the things in the hint that I'm having to alter. I find Eudev to be perfectly acceptable and my preferred way to deal with this whole issue.
Well to the eye (mine, anyway) there is no difference functionally. The difference to me is more technical and related to the installation steps. For the past year (or so), LFS has been extracting Udev from Systemd (because that's where it went when it vanished). It worked fine. The installation was different from other LFS packages, but not hard to do. Lately, the LFS developer maintaining the Makefile that does the "extract-Udev-from-Systemd" work, said it was beginning to be more and more difficult to dissect Udev out of the Systemd source without having to bring along a bunch of other Systemd stuff. It's Bruce Dubbs. So enter Eudev as a way around this. It does the same things old Udev did. Some of the LFS devs had already been using Eudev themselves. Eudev is at least nominally a Gentoo project, maintained by Gentoo developers, and found at Gentoo. But just as suddenly, exit Eudev from LFS and enter the whole Systemd thing as a way to provide Udev (and, at the same time, offer Systemd itself to do LFS init stuff for those who want that).
Try this "else/if" trick such as Slackware does with NetworkManager and Wicd.
Code:
if [ -x /lib/udev/udevd ]; then
/lib/udev/udevd --daemon
else
/lib/systemd/systemd-udevd --daemon
fi
I'll have to fix this, and let Bruce know.
The method was getting bothersome due to the actual libraries udev depends on within the systemd package. Lennart has been a royal jackhole in making sure udev can't be extracted as easily anymore. I think 208 was the last version that could be extracted successfully. 209 and onwards had tons of issues.
You guys should actually get on the LFS mailing lists and ask for eudev to return in LFS-7.6. Apparently not enough people wanted Eudev and wanted systemd instead. So unless a bunch of people actually say No to systemd with Bruce, then it might actually become the default method. If the day comes they excise sysvinit and the scripts out of LFS, then more or less not only will my work evaporate, but any efforts to keep sysvinit will go up in smoke too.
Last edited by ReaperX7; 04-14-2014 at 06:12 PM.
Reason: Syntax command correction
Didn't want to double post, but this was sort of separated...
Bruce just informed me he might consider re-adding a section to LFS for Eudev coverage however it may lengthen the book somewhat from what he said, but it would be a very good move on LFS's part. This isn't a definite, but I honestly feel it is a step back in the right direction for LFS being about education and choice into GNU/Linux.
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
Here's your build changes: Follow the 7.5 guide, update packages from the current SVN that only also exist in 7.5. Use 7.5 bootscripts... Be sure to omit any patches on packages that were updated unless the patch is mentioned in the SVN install guide.
Locations are all in the 7.5 guide version...
LFS:6.9.2 - Configuring Glibc
Switch out the former statement with the latter:
Code:
tar -xf ../tzdata2013i.tar.gz
Code:
tar -xf ../tzdata2014b.tar.gz
LFS:6.26 - Coreutils-8.22
One unexpected failure will always turn up, "nohup" test. This happens because the TTY is not addressable from inside the CHROOT. This bug was reported upstream so that it can be changed to XFAIL when tests are run in CHROOT. What I am saying is that it should be an expected failure, but is not currently.
LFS:6.32 & 6.33 - Readline & Bash
It's up to you whether you upgrade to SVN or not. Just make sure both packages are from the same book, Bash 4.3 won't compile against Readline 6.2 due to some link changes. Also, if you update the patch isn't necessary for Bash. Last, if you're getting strange errors during the Bash compile, try clearing MAKEFLAGS. (Or use make -j1)
LFS:6.60 - Udev 2.08 (Extracted from Systemd 2.08) -> Upgrade to Eudev 1.53
Follow the instructions here: http://www.linuxfromscratch.org/hint...v-alt-hint.txt
This includes adding the "55-lfs.rules" at the bottom.
LFS:7.6 - LFS Bootscripts-20130821
Go ahead and use the 2013 bootscripts, they're not much different. But one change needs to be made on line 52 in: /etc/init.d/udev
Code:
/lib/udev/udevd --daemon
Code:
/sbin/udevd --daemon
Almost everything else can be upgraded to the SVN version without issue, save for the completely new packages there. Also, go head and put in Attr and Acl if you intend to use those, much less hassle than recompiling Coreutils later on.
I'm running 7.5/Current-SVN Hybrid myself and currently working on BLFS 7.5/SVN Hybrid.
Last edited by Luridis; 04-14-2014 at 09:08 PM.
Reason: typos...
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
Additional Info: Linux Kernel 3.14 works fine in LFS 7.5 (non-systemd)
BLFS SVN for OpenSSL-1.0.1g
Make sure you get the latest BLFS patches for OpenSSL. Parallel build for OpenSSL works, but clear MAKEFLAGS for make test/check because that seems to be missing a lock somewhere and fails if run in parallel. (As of 04/12/2014)
Try this "else/if" trick such as Slackware does with NetworkManager and Wicd.
It's an idea for people to consider. I ended up letting Eudev install udevd and udevadm in the default locations of /usr/sbin and /usr/bin (Eudev also created a symlink in /usr/sbin to /usr/bin/udevadm). The hint tweaks that bindir/sbindir stuff a slightly different way, but it won't matter as long as symlinks or edits fix that vis-a-vis the initscripts. I decided against the symlinks and instead fixed the initscripts with seds as they were installed.
Another thing I did that isn't in the hint was initialize the hardware database. I got that from Bruce's previous udev stuff. I think it populates that hwdb.d folder and/or creates the hwdb.bin file. That stuff will be in /etc/udev or /lib/udev depending on the config options.
Code:
/usr/bin/udevadm hwdb --update
And that init-net-rules.sh script (also from Bruce's stuff) that I mentioned earlier here did turn out to be very handy to get the network card rule written to /etc/udev/rules.d. It can be copied from any of Bruce's recent lfs-udev-xxx tarballs. Maybe some people don't need that, but I did. And for me, that worked better after rebooting into the finished system (not so great in chroot in my script...errors about locking the file).
Lastly, for now, I had a spew of "udev [xxxxx]: failed to create queue file" console warnings on the first boot after installing all of this. But it doesn't occur again after that. Possibly or somehow related to /run/udev/queue.bin during the first boot.
Anyway, this is good. I played with Eudev-1.4 for a while sort of getting ready for this day. Now I am ready to go ahead with Eudev-1.5.3 in my next system if I have to (and I'm betting I will have to).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.