[lfs-dev] LFS-8.1-systemd comments.

Bruce Dubbs bruce.dubbs at gmail.com
Wed Dec 27 19:51:27 PST 2017


Bruce Dubbs wrote:
> Continuing:  (last one)

"8.4.3 (Suggestion)

If grub is already installed on the host system, information on how grub 
sees the partitions can be obtained by invoking the grub command line at 
boot-up.  The available partitions can be listed with ls, and ls 
(<partition>)/ shows what the partition contains."

Although what you say is true, we can get into a problem if we try to 
explain usage of the installed programs.  Generally our policy is to not 
get overly detailed in areas where explanations are available in other 
places.

---

"8.4.4 (Suggestion)

In the note for a separate boot partition, perhaps it should be made 
clearer that set root(hd0,1) points to /boot, whereas the root on the 
kernel entry:

linux /vmlinuz...  root=/dev/sda2 points to /.

I think the Caution box can be updated to contain some advice along the
following lines:

If LFS is to be used alongside a commercial distribution (which I think is
likely to be the case for the majority of users), an LFS entry can be 
included in the grub custom file (/etc/grub.d/40_custom on the host). To 
prevent grub2-mkconfig on the host from running the os-prober script 
(which would create duplicate entries) disable the prober by adding 
GRUB_DISABLE_OS_PROBER="true" to /etc/default/grub on the host. Now run 
grub2-mkconfig -o /boot/grub.cfg, and let the commercial distro take care 
of itself when it does upgrades.

My 40_custom on Fedora 27 looks like this

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'LFS (4.14.8-lfs-8.1)' {
    insmod ext2
    set root='hd0,msdos1'
    linux /vmLinuz-4.14.8-lfs-8.1 root=/dev/sda5 ro
}

Quite straightforward really. (The msdos1 refers to the partition type and
not the file system type. Grub is quite forgiving and also accepts (hd0,1).)

Note that I named the kernel vmLinuz instead of vmlinuz. This prevents the
/etc/grub.d/10_linux script from making a Fedora entry with the LFS kernel 
(it searches for kernels of the form vmlinuz-*). I accidentally booted 
Fedora with the LFS kernel which caused Fedora to crash because I have 
nvidia GPU. This card doesn't play nicely with nouveau and the gnome 
display manager and requires proprietary drivers. This in turn caused 
selinux to freak out and initiate an .autorelabel at the next boot, which 
on my system took about 10 minutes.)"

We try to discourage the use of grub-mkconfig.  Note also that only Fedora 
uses 'grub2'.  All the other distros I am aware of use grub to mean 
grub-2.0.x and pretty much ignore GRUB Legacy.

I'll also note that grub-mkconfig does a poor job when there are many 
kernels in a separate /boot partition.  They want to create a separate 
menuentry for every kernel on every partition.  the idea of LFS is to 
provide control and using grub-mkconfig gives up that control.  The user 
knows their system better than any distro.

---

Queries
-------
"2.2 (script)

version-check.sh: Fedora 27 yacc is

/usr/bin/yacc - 1.9 20170709

This yacc has no long --version, only -V"

Then they are not using bison. bison is the required package.

---
"6.24

All the tests (15) with getfattr -m- fail. Possibly an selinux issue (see 
here I think: https://lwn.net/Articles/737949/)."

I'm not really familiar with selinux as it is a much more advanced concept 
than LFS.  I get no failures when the base system is LFS.  It sounds like 
a host system kernel configuration issue.

---
"6.43.1

Testing after automake additionally fails (skipped otherwise):

38: autotools and whitespace in file names          FAILED (tools.at:1310)"

I cannot reporduce this.

---
"6.44

PASS: t/subobj.sh"

The opposite to the above.  Sometimes tests pass on systems where our 
systems show failure.  Generally individual failures can be ignored.

See 
http://www.linuxfromscratch.org/lfs/view/stable/chapter04/abouttestsuites.html

---
"6.51

Only date-debug fails. test-getlogin doesn't seem to exist:

grep test coreutils-8.27-check-non-root.log | grep login

gives no output."

Same as above.  It fails on my system.  Note that we run the tests inside 
an automated script that may indicate the error to us and not to you.

=======

Overall, thank you for your detailed comments.  They are much appreciated.

In the future, you may want to use the on-line chunked version of the book 
or download the tarball of the chunked version.

When referring to a section, mentioning the name of the main section such as

6.48. Systemd-234

would be helpful.  The numbers are not a part of the source and are only 
added when the html is generated.

   -- Bruce



More information about the lfs-dev mailing list