I noticed when doing the block root= parser that resume
didn't support labeled resume devices. Fix that up and
get rid of a dependency on /bin/echo in the process.
Now init checks that we understood the root= option, and can
act upon it, presenting and error if not. Also, clean up the
generation of udev rules such that we don't require /bin/echo.
We no longer require any user intervention when testing dracut on
a local block device in qemu, assuming everything passes. If things fail,
we still might need to manually kill things.
First, add a check script to 99base to ensure that it will load its
prerequisites.
Second, disable the udev magic dracut normally uses when generating
test images -- it was causing random failures when creating the test
root filesystem, presumably due to race conditions between the
rootfs creation scripts and udev.
Third, consolidate the rootfs creation scripts into one script.
This gets rid of the need to have potentially security-sensitive files
like /etc/passwd and /etc/group in the initramfs, and makes the initramfs
a bit smaller. We trust the final userspace to do The Right Thing when
assigning user/group ownership to devices.
We were not loading all the required kernel modules due to a bug in the
dependency checking code. This was causing us to load only the first
dependent module and ignore the rest.
If dracut was run with --hostonly, instmods will only load a module
into the initramfs if it is already loaded on the host machine.
This really trims the fat out of a --hostonly generated initramfs, and
eliminates the need for the kernel-modules-loaded hook.
This patch also allows a module to flag that it should only load as
a dependency by exiting 255 instead of 0. Currently, only the network module
uses this functionality.
There is no point loading every driver available when we are not testing
network functionality and qemu does not even support the stuff we were
loading. It just wastes time and space.
If we install copy-root as a mount hook, it will be run after the root fs
is mounted and it will make hte proc directory, allowing root filesystem
creation to finish without error.
This also eliminates --skip-missing. Check scripts should now check
to ensure that any files and settings they will copy from the host
system actually exist when called without arguments.
The check scripts are also updated to not try to source dracut-functions
which(1) is a perfectly good way of checking if a command is on the path.