Installing dracut on the install client

Robert Markula robert at markula.org
Mon Feb 4 10:40:50 CET 2019


Am 29.01.19 um 15:11 schrieb Thomas Lange:
> Solved!
>
>     > Btw, the last entry right before the kernel panic is:
>     > <snip>
>     > /init: error while loading shared libraries
>     > </snip>
>
> This line in your disk_config causes the error:
>
> vgmain-vartmp        /var/tmp    1GiB    ext4 defaults,noexec,nosuid,nodev
>
>
> dracut is using /var/tmp when creating the initrd. Since you've
> mounted it with noexec, the call of ldd to resolve the dependencies on
> executables will fail, because ldd says this is not a dynamic
> executable and so a lot of shared .so libraries are missing in the
> initrd. If you mount it without noexec it works. Another solution could
> be to change the tmpdir that dracut uses.
>
Confirmed!

Thomas, I can't say how much I appreciate your effort. It's all logical
now, but before it felt like the search for the needle in the haystack.

The solution is a hook in hooks/instsoft.DRACUT:

<snip>
#!/bin/bash

error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code

mkdir $target/etc/dracut.conf.d

# FIXME: Remove the 'crc32c' kernel module as it is not available
# on Ubuntu 18.04 and leads to an error message preventing
# successful creation of the initramfs.
if ifclass UBUNTU; then
    fcopy -v /etc/dracut.conf.d/10-debian.conf
fi

# Instruct dracut to use a different directory for extracting temporary
# files, if /target/var/tmp is mounted noexec.
echo "tmpdir=/var/cache" > $target/etc/dracut.conf.d/10-tempdir.conf

exit $error
</snip>

Thank you very much!


Robert


More information about the linux-fai mailing list