David Dillow [Mon, 1 Jun 2009 23:59:22 +0000 (19:59 -0400)]
Allow NFS and NBD to be built into the kernel
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.
Warren Togami [Mon, 1 Jun 2009 22:21:40 +0000 (18:21 -0400)]
Include only wired ethernet drivers, explicitly exclude wireless.
(If you REALLY want wireless boot, you need to write your own module to configure it properly.)
David Dillow [Mon, 1 Jun 2009 04:53:52 +0000 (00:53 -0400)]
nfsroot: move to netroot framework
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.
David Dillow [Mon, 1 Jun 2009 04:42:43 +0000 (00:42 -0400)]
netroot: add common handler for network root devices
/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.
David Dillow [Mon, 1 Jun 2009 04:25:09 +0000 (00:25 -0400)]
resume: add support for labeled resume devices
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.
David Dillow [Mon, 1 Jun 2009 04:21:53 +0000 (00:21 -0400)]
cmdline: cleanup handling and block: handler
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.
Victor Lowther [Sun, 31 May 2009 02:23:55 +0000 (21:23 -0500)]
Make root on local block device test completly automated.
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.
Victor Lowther [Sat, 30 May 2009 21:16:34 +0000 (16:16 -0500)]
Several updates to make dracut a bit more robust.
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.
Victor Lowther [Sat, 30 May 2009 16:45:47 +0000 (11:45 -0500)]
Have udevd never try to resolve user or group ownership of devices.
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.
Victor Lowther [Sat, 30 May 2009 15:52:12 +0000 (10:52 -0500)]
Fix bug in kernel module loading
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.
Victor Lowther [Sat, 30 May 2009 03:53:11 +0000 (22:53 -0500)]
Modify kernel module installation routine to respect --hostonly.
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.
Victor Lowther [Fri, 29 May 2009 22:55:31 +0000 (17:55 -0500)]
Don't create fully generic initramfs'es in the test framework
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.
Victor Lowther [Mon, 25 May 2009 16:44:42 +0000 (11:44 -0500)]
Get rid of dependency on e2mkdir
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.
Victor Lowther [Sun, 24 May 2009 05:29:44 +0000 (22:29 -0700)]
Add infrastructure for dracut module dependency checking.
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.
David Dillow [Sat, 23 May 2009 02:53:10 +0000 (22:53 -0400)]
nfsroot: mount NFS root from udev rules
Work-in-progress to mount NFS root from udev, using the DHCP options and
allowing an override from the kernel command line. Supports NFSv4 w/locking
and NFSv2/v3 with nolock.
This is just an RFC patch, you'll note all the XXX markings where I've been
thinking about how to best do things. In addition, we really want to retry
DHCP and NFS mounting in a loop, in case the servers are down or overloaded
like when booting a full diskless cluster.
David Dillow [Sat, 23 May 2009 02:43:32 +0000 (22:43 -0400)]
network: prepare network configuration engine for udev-based nfsroot
This changes the network config to run dhclient from within udev, and
allows multiple dhclients to run at once. It also sets the hostname and
adds a kernel command line option 'netdebug' to help debug network issues.
Support different virtualization technologies for run-qemu.
If the host supports kvm, use is. If this is not the case but the kqemu
module is loaded, run qemu with kqemu optimization. Otherwise fall-back to
pure usermode qemu.
Victor Lowther [Thu, 21 May 2009 02:55:04 +0000 (19:55 -0700)]
Make running qemu a little more generic
Also create the root filesystem from within the virtual env, this way there
will be no nasty suprises w.r.t interactions with the host machine. This
is important when we test booting to LVM, LUKS, and mdraid.