[lfs-support] Booting LFS with systemd

Frans de Boer frans at fransdb.nl
Fri Jul 13 05:28:12 PDT 2018


On 06-07-18 08:23, Frans de Boer wrote:
> On 07/06/2018 05:32 AM, Michael Shell wrote:
>> On Thu, 5 Jul 2018 21:48:16 +0200
>> Frans de Boer <frans at fransdb.nl> wrote:
>>
>>> I had even rebuild everything with systemd-232, and that worked as
>>> before. But after 232, things started to behave strange. Now way to
>>> debug systemd, whatever I do....
>>
>>     Frans,
>>
>> That's the whole point of being able to start the system with a shell
>> - so that systemd's startup, or failure thereof, can then be debugged
>> manually. What happened when you booted to shell and then tried to
>> start systemd manually?
>>
>> init=/bin/bash
>> mount -o remount,rw /
>>
>> Then, at the bash prompt, you want to try to start systemd manually.
>> You'll also want to first make sure you get a core file if/when it
>> crashes:
>>
>> echo "core" > /proc/sys/kernel/core_pattern
>> ulimit -c unlimited
>>
>> /usr/lib/systemd/systemd
>>
>>
>> With the above, does systemd crash and yield a core file?
>>
>> Does
>>
>> dmesg
>>
>> show any relevant error messages?
>>
>> If you get a core file, you can run gdb on systemd using the core
>> file:
>>
>> gdb -c core /usr/lib/systemd/systemd
>>
>> then what does the gdb backtrace reveal:
>>
>> (gdb) bt
>>
>>
>> You can also try gdb on systemd without the core:
>>
>> gdb /usr/lib/systemd/systemd
>> (gdb) run
>> (gdb) bt
>>
>>
>> If I had to bet at this point, my money would go on the theory that
>> your kernel is lacking support for something systemd (now) needs.
>> You can find a current list of systemd kernel config requirements
>> here:
>>
>> https://cgit.freedesktop.org/systemd/systemd/tree/README
>>
>> Note also, some kernel features must be *disabled*, e.g.,
>> CONFIG_SYSFS_DEPRECATED=n
>>
>> Also, "systemd requires that the /run mount point exists.
>>         systemd also requires that /var/run is a symlink to
>>         /run "
>>
>>
>>     Cheers,
>>
>>     Mike
>>
> Hi Mike,
> I will follow your suggestions, of which few are new to me, and will 
> come back with a report.
> 
> --- Frans
I get the following error:

...
bison --yacc --name-prefix=__gettext --output 
/sources-lfs/glibc-2.27/glibc-build/intl/plural.c plural.y
bison: m4 subprocess failed: No such file or directory
make[2]: *** [Makefile:46: 
/sources-lfs/glibc-2.27/glibc-build/intl/plural.c] Error 1
make[2]: Leaving directory '/sources-lfs/glibc-2.27/intl'
make[1]: *** [Makefile:215: intl/subdir_lib] Error 2
make[1]: Leaving directory '/sources-lfs/glibc-2.27'
make: *** [Makefile:9: all] Error 2

If I include 'ln -sfv /tools/bin/m4 /usr/bin' as suggested some time 
ago, I can compile glibc. In an effort to understand why systemd crashes 
and having a message that there is a segfault in glibc while booting, i 
tried to recompile all again. Now I can't even compile glibc.

Is this a result of some modification in the tool chain, or is de 
documentation not upto date?

--- Frans.


More information about the lfs-support mailing list