Probe for NFS and NBD capability before trying to load their modules
in case they are built into the kernel. Ugly use of flag files, but
avoids the need for grep to be on the image.
Parse and convert commandline options in the cmdline hook, and
fill in the missing pieces in the netroot hook. This also allows
root=dhcp to work as expected.
/sbin/netroot is a jumping off point to allow various network
root devices to share infrastructure. It will loop over scriptlets
in the netroot handler, looking for a handler to run for this type
of netroot. Handlers can do choose to act based on command line
options to the kernel, or via DHCP options received on this interface.
They should massage root= into a form suitable for their handler.
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.