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 built LFS SVN-140408 again incorporating Eudev-1.5.3 as we have been discussing here. I mostly used the latest version of ReaperX7's hint with a few modifications. I just wanted to post the commands I ran and report what happened, for the record only. I don't intend for anyone to do any of this.
Code:
tar xf eudev-1.5.3.tar.gz
cd eudev-1.5.3
sed -i '/struct ucred/i struct ucred;' src/libudev/util.h
sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl
BLKID_CFLAGS=-I/tools/include
BLKID_LIBS='-L/tools/lib -lblkid'
./configure --prefix=/usr \
--libexecdir=/lib \
--sysconfdir=/etc \
--disable-static \
--disable-introspection \
--disable-selinux \
--disable-gudev \
--disable-keymap \
--disable-gtk-doc-html \
--enable-libkmod \
--enable-rule_generator \
--with-rootprefix="" \
--with-rootlibdir=/lib \
--with-firmware-path=/lib/firmware &&
make
mkdir -pv /lib/firmware
mkdir -pv /lib/udev/{devices/pts,rules.d}
mkdir -pv /etc/udev/{hwdb.d,rules.d}
make install
/usr/bin/udevadm hwdb --update
tar -xvf ../eudev-1.5.3-manpages.tar.bz2 -C /usr/share
cat > /etc/udev/rules.d/55-lfs.rules << "EOF"
# /etc/udev/rules.d/55-lfs.rules: Rule definitions for LFS.
# Core kernel devices
# This causes the system clock to be set as soon as /dev/rtc becomes available.
SUBSYSTEM=="rtc", ACTION=="add", MODE="0644", RUN+="/etc/rc.d/init.d/setclock start"
KERNEL=="rtc", ACTION=="add", MODE="0644", RUN+="/etc/rc.d/init.d/setclock start"
# Comms devices
KERNEL=="ippp[0-9]*", GROUP="dialout"
KERNEL=="isdn[0-9]*", GROUP="dialout"
KERNEL=="isdnctrl[0-9]*", GROUP="dialout"
KERNEL=="dcbri[0-9]*", GROUP="dialout"
EOF
I also created the init-net-rules.sh script (but didn't need it this time) and deleted two of Eudev's rules (75-persistent-net-generator.rules and 75-cd-aliases-generator.rules). I honestly forgot why I delete those two rules or where I got that idea, but I've been doing it all along with my Eudev experiments. I might try to find out if it matters if I leave them.
As before, I let Eudev put the executables in the default locations and fixed the udev and udev_retry initscripts for them.
Anyway, everything went smoothly and works normally. Again I had some console message spew for the first boot only. This time I have not had to run the init-net-rules.sh script. My ethernet card is named eth0 and is working fine without the 70-persistent-net-rules file that usually is created for me by running that script.
P.S.: A brief update... I built the whole system again. Two things to add here. One is that I installed Eudev before util-linux this time (I've been overlooking that). The other is that I did not delete those two rules mentioned above. There was no error message spew during the first boot this time, and leaving those rules installed harmed nothing that I can detect. I think I have this all worked out the way I want it now.
To initialize the hardware database might not be recommended on some file systems like JFS for example.
This can cause the /dev file system to not want to dismount properly and if by chance you lack the proper fsck.* utility for that specific file system, you may end up with a locked out disk saying the drive is corrupt due to an improper dismount.
Updated hint file is in the works for a more comprehensive eudev package.
I'm going to be away from Linux this upcoming week, but my hint will hopefully be updated soon. I'm also going to draft up a section for the udev init script to work with either eudev or systemd if Bruce hasn't edited it his end yet.
Just a side note, but I attempted to build the default systemd+sysvinit build from the book, and I've not been impressed by it. SysV is much easier to work with by far, and there's so much already available for sysvinit that I honestly can say, in my opinion systemd is irrelevant on many levels. Eudev is all you need honestly, and if you by chance need a service supervisor, there's at least 3 out there that are small, non-intrusive, and modular that work very well.
One more piece of Systemd residue that I found in the current LFS development version is the creation of groups for adm, messagebus, and systemd-journal; and the user messagebus. The D-Bus page of the current BLFS development version still attempts to create the messagebus group and user resulting in an error. Now, this isn't a big deal really. Easy to fix one way or the other. But for someone desiring to move on without Systemd, it is one more annoyance.
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616
Rep:
Hey Reaper,
Just an FYI on your hint, and in the book. It's not entirely clear where the file "udev-lfs-20140408" comes from. I'm going to assume its in the bootscripts package. But it wasn't in the patch or package list at the book's beginning.
EDIT: Nevermind, found it now, needed to clear the page cache. It wasn't showing up in the list.
EDIT (again): Reaper, is there a /r/n in that file instead of a /n somewhere?
Quote:
root:/sources/udev-lfs-20140408# make -f Makefile.lfs install
mkdir: created directory '/usr/share/doc/udev-20140408'
mkdir: created directory '/usr/share/doc/udev-20140408/lfs'
cp: cannot stat 'udev-lfs-20140408/*.rules': No such file or directory.
Makefile.lfs:19: recipe for target 'install' failed
udev-lfs-20140404.tar.bz2 was part of systemd-212, but all it does is extract the scripts it contains within that archive. You don't technically need it, but it's there for comprehensive coverage for udev to not have to auto-generate every last rule. Technically it's a stand-alone package and doesn't even require untaring into /systemd-212 as it used to. They just do it as part of the install process if you follow it normally.
All it does is install some generator scripts to /lib/udev and other places. You can actually allow udev to auto-build the rule sets, though it might not be as clean as the pre-generated ones.
Just run the commands as stated and it should be okay. I ran it fine without incident. If it's not working I'll have some time next week to do some extra testing to debug it.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,155
Rep:
Thought I would give eudev a try but I've hit a snag it all compiles and installs OK but won't recognize my usb keyboard if I plug in an old ps2 keyboard it works fine, I don't even get any messages on the console when I plug a usb device in and out like I normally do, have I missed somwthing obvious?
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,155
Rep:
rebooted with the keyboard plugged in ( works fine in GRUB ), runs up to the login prompt but then ignores the usb keyboard even if I unplug it and replug it in I also tried a different usb wireless keyboard but plugging in the dongle produced no output to the console , usually there is a few messages indicating that a usb device has been found, the ps2 keyboard works fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.