platform/upstream/dracut.git
15 years agoWrite MAC address to a file at successful netroot mount, NetworkManager wants this.
Warren Togami [Wed, 10 Jun 2009 15:12:14 +0000 (11:12 -0400)]
Write MAC address to a file at successful netroot mount, NetworkManager wants this.

15 years agodhclient.* files become net.* only after successful netboot.
Warren Togami [Wed, 10 Jun 2009 14:21:11 +0000 (10:21 -0400)]
dhclient.* files become net.* only after successful netboot.
This is an attempt to avoid confusing post-boot scripts by having them
consider only net.* files.

15 years agoWrite DHCP lease file, dcbw wants it for NetworkManager to take over management of...
Warren Togami [Mon, 8 Jun 2009 21:18:01 +0000 (17:18 -0400)]
Write DHCP lease file, dcbw wants it for NetworkManager to take over management of the lease post-netboot.

15 years agoCopy netboot state into /dev/.initramfs/ before switch_root
Warren Togami [Mon, 8 Jun 2009 20:51:13 +0000 (16:51 -0400)]
Copy netboot state into /dev/.initramfs/ before switch_root
If cmdline "rdcopystate", then copy all of /tmp/* into /dev/.initramfs/ for later debugging examination.

15 years agoadd ipv6 rpc.idmapd and various conf files for NFS
Harald Hoyer [Mon, 8 Jun 2009 12:50:22 +0000 (14:50 +0200)]
add ipv6 rpc.idmapd and various conf files for NFS

rpcbind on Fedora does not seem work for NFS4 without IPv6

15 years agoadd more tools to the debug module
Harald Hoyer [Mon, 8 Jun 2009 12:49:23 +0000 (14:49 +0200)]
add more tools to the debug module

15 years agospecify dhcpd.conf path for test server
Harald Hoyer [Mon, 8 Jun 2009 12:49:00 +0000 (14:49 +0200)]
specify dhcpd.conf path for test server

15 years agos/NFS/NBD
Harald Hoyer [Mon, 8 Jun 2009 12:48:39 +0000 (14:48 +0200)]
s/NFS/NBD

15 years agospecify dhcpd.conf path for test server
Harald Hoyer [Mon, 8 Jun 2009 08:34:50 +0000 (10:34 +0200)]
specify dhcpd.conf path for test server

15 years agoNBD: add test suite
David Dillow [Mon, 8 Jun 2009 04:28:52 +0000 (00:28 -0400)]
NBD: add test suite

This is an initial test suite for the NBD root. It does the basics, and
needs to be extended to check more parts of the configuration.

15 years agoNBD: fix parsing of Debian-style nbdroot config
David Dillow [Mon, 8 Jun 2009 04:25:20 +0000 (00:25 -0400)]
NBD: fix parsing of Debian-style nbdroot config

15 years agoNFS test: add test for nfs[4]:srv:/path syntax
David Dillow [Mon, 8 Jun 2009 04:03:10 +0000 (00:03 -0400)]
NFS test: add test for nfs[4]:srv:/path syntax

15 years agodracut init: add rdnetdebug to exclude list
David Dillow [Sun, 7 Jun 2009 22:17:03 +0000 (18:17 -0400)]
dracut init: add rdnetdebug to exclude list

15 years agoNFS root: add support for default root path and %s substitution
David Dillow [Sun, 7 Jun 2009 21:17:48 +0000 (17:17 -0400)]
NFS root: add support for default root path and %s substitution

This implements a default path of /tftpboot/%s if no path is provided,
and adds host name substitution for %s, with a fall back to the IP address,
as provided by the kernel's nfsroot handling.

The test suite is updated to test this functionality.

15 years agoNFS test: separate NFSv3 and NFSv4 tests into their own functions
David Dillow [Sun, 7 Jun 2009 19:48:07 +0000 (15:48 -0400)]
NFS test: separate NFSv3 and NFSv4 tests into their own functions

The full tests take over 6 minutes to run, and commenting out unneeded
ones is time consuming -- this change lets me comment out one line to
temporarily avoid an entire class of tests.

15 years agoNFS test: add test cases for DHCP/nfsroot=[IP:]/path[,options]
David Dillow [Sun, 7 Jun 2009 19:01:31 +0000 (15:01 -0400)]
NFS test: add test cases for DHCP/nfsroot=[IP:]/path[,options]

15 years agoNFS root: add missing DHCP root-path/nfsroot=[IP:]/path[,options] format
David Dillow [Sun, 7 Jun 2009 18:59:38 +0000 (14:59 -0400)]
NFS root: add missing DHCP root-path/nfsroot=[IP:]/path[,options] format

Reported-by: Seewer Philippe <philippe.seewer@bfh.ch>
15 years agoNFS test: renumber MAC addresses to ease adding new test cases
David Dillow [Sun, 7 Jun 2009 03:08:12 +0000 (23:08 -0400)]
NFS test: renumber MAC addresses to ease adding new test cases

15 years agoNFS test: add support for checking mount options used
David Dillow [Sun, 7 Jun 2009 02:59:42 +0000 (22:59 -0400)]
NFS test: add support for checking mount options used

15 years agoNFS test: verify that we used the right IP to get to the server
David Dillow [Sun, 7 Jun 2009 01:55:53 +0000 (21:55 -0400)]
NFS test: verify that we used the right IP to get to the server

15 years agoNFS test: additional option tests
David Dillow [Sat, 6 Jun 2009 09:09:43 +0000 (05:09 -0400)]
NFS test: additional option tests

Test additional combinations of command line and DHCP option formats. This
is by no means the complete list, but gets us started with some common ones.

15 years agoNFS test: allow emergency shell while debugging
David Dillow [Sat, 6 Jun 2009 09:09:13 +0000 (05:09 -0400)]
NFS test: allow emergency shell while debugging

15 years agoroot option parsing belongs in 99base now
David Dillow [Sat, 6 Jun 2009 06:31:45 +0000 (02:31 -0400)]
root option parsing belongs in 99base now

We use this for NFS root as well, and NFSv4 was getting broken when
it wasn't present.

15 years agoNFS test: rearrange the server tree so we can differentiate NFSv3 vs NFSv4
David Dillow [Sat, 6 Jun 2009 05:22:54 +0000 (01:22 -0400)]
NFS test: rearrange the server tree so we can differentiate NFSv3 vs NFSv4

15 years agoNFS test: re-add the fix for the terminal
David Dillow [Sat, 6 Jun 2009 05:13:47 +0000 (01:13 -0400)]
NFS test: re-add the fix for the terminal

When debugging, this is still needed as we won't be redirecting out
output to /dev/null or a file. However, we need to guard against not
having a terminal.

15 years agoNFS test: switch the ISC dhcpd server
David Dillow [Sat, 6 Jun 2009 05:13:16 +0000 (01:13 -0400)]
NFS test: switch the ISC dhcpd server

This will let us expand the number of client configs we can test

15 years agoNFS test: rearrange code to test multiple client configurations
David Dillow [Sat, 6 Jun 2009 04:25:07 +0000 (00:25 -0400)]
NFS test: rearrange code to test multiple client configurations

This also gets rid of BASENET, which was an unneeded idea in hindsight.

15 years agoNFS testing: add forgotten hard-off hook
David Dillow [Sat, 6 Jun 2009 04:06:04 +0000 (00:06 -0400)]
NFS testing: add forgotten hard-off hook

15 years agoHave the test framework always run the cleanup script
David Dillow [Sat, 6 Jun 2009 04:05:33 +0000 (00:05 -0400)]
Have the test framework always run the cleanup script

Also remove some extra semicolons, and put the pointer to the test log
on its own line.

15 years agoDon't use backticks, use $()
Peter Jones [Fri, 5 Jun 2009 14:20:13 +0000 (10:20 -0400)]
Don't use backticks, use $()

This is a minor style fix.

15 years agoGet rid of cat and grep
Seewer Philippe [Fri, 5 Jun 2009 14:10:52 +0000 (16:10 +0200)]
Get rid of cat and grep

15 years agomake test output more readable, log errors to test.log
Harald Hoyer [Fri, 5 Jun 2009 14:08:30 +0000 (16:08 +0200)]
make test output more readable, log errors to test.log

15 years agoMerge branch 'master' of ssh://dracut.git.sourceforge.net/gitroot/dracut
Harald Hoyer [Fri, 5 Jun 2009 06:51:31 +0000 (08:51 +0200)]
Merge branch 'master' of ssh://dracut.git.sourceforge.net/gitroot/dracut

15 years agoMerge commit 'dillow/master'
Harald Hoyer [Fri, 5 Jun 2009 06:47:51 +0000 (08:47 +0200)]
Merge commit 'dillow/master'

Conflicts:
test/TEST-20-NFS/make-client-root

15 years agonfs: cleanup currently needs grep
David Dillow [Fri, 5 Jun 2009 04:26:10 +0000 (00:26 -0400)]
nfs: cleanup currently needs grep

15 years agotest suite: automate NFS testing
David Dillow [Fri, 5 Jun 2009 04:20:26 +0000 (00:20 -0400)]
test suite: automate NFS testing

First cut at automating the NFS test suite.

15 years agotest suite: allow a user-selected kernel
David Dillow [Fri, 5 Jun 2009 04:18:29 +0000 (00:18 -0400)]
test suite: allow a user-selected kernel

Sometimes it is desirable to allow the user to test with a different
kernel than the one they are currenting running.

15 years agoUgh, using backticks instead of $()
Victor Lowther [Fri, 5 Jun 2009 02:57:30 +0000 (21:57 -0500)]
Ugh, using backticks instead of $()

Get that evilness out of dracut, please.

15 years agomake udevtriggeropts just use an environment variable
Victor Lowther [Fri, 5 Jun 2009 02:49:57 +0000 (21:49 -0500)]
make udevtriggeropts just use an environment variable

No point in making a file and then reading from it when hooks are sourced.

15 years agoMake debugging much more useful.
Victor Lowther [Fri, 5 Jun 2009 02:35:31 +0000 (21:35 -0500)]
Make debugging much more useful.

Since we are explicitly using bash, we can have nice, useful value for PS4

15 years agospecfile update
Harald Hoyer [Thu, 4 Jun 2009 15:23:41 +0000 (17:23 +0200)]
specfile update

15 years agoadd dracutbasedir as configurable variable in dracut.conf
Harald Hoyer [Thu, 4 Jun 2009 15:20:36 +0000 (17:20 +0200)]
add dracutbasedir as configurable variable in dracut.conf

15 years agotry to install switch_root from system
Harald Hoyer [Thu, 4 Jun 2009 15:20:09 +0000 (17:20 +0200)]
try to install switch_root from system

15 years agomake paths configurable
Harald Hoyer [Thu, 4 Jun 2009 15:19:42 +0000 (17:19 +0200)]
make paths configurable

15 years agofix udevtriggeropts
Harald Hoyer [Thu, 4 Jun 2009 15:38:07 +0000 (17:38 +0200)]
fix udevtriggeropts

15 years agofix dracut logging
Harald Hoyer [Thu, 4 Jun 2009 11:17:57 +0000 (13:17 +0200)]
fix dracut logging

15 years agoprepare for release
Harald Hoyer [Thu, 4 Jun 2009 11:08:39 +0000 (13:08 +0200)]
prepare for release

15 years agoadd sample dracut.conf file
Harald Hoyer [Thu, 4 Jun 2009 11:07:59 +0000 (13:07 +0200)]
add sample dracut.conf file

15 years agoadd support to specify additional udev trigger options
Harald Hoyer [Thu, 4 Jun 2009 11:07:01 +0000 (13:07 +0200)]
add support to specify additional udev trigger options

15 years agoEnsure KMS drivers are loaded before plymouth.
Warren Togami [Wed, 3 Jun 2009 18:25:50 +0000 (14:25 -0400)]
Ensure KMS drivers are loaded before plymouth.

15 years agoNo longer needed, already ran in pre-trigger
Warren Togami [Wed, 3 Jun 2009 17:10:57 +0000 (13:10 -0400)]
No longer needed, already ran in pre-trigger

15 years agosimplify plymouth startup
Harald Hoyer [Wed, 3 Jun 2009 15:31:48 +0000 (17:31 +0200)]
simplify plymouth startup

15 years agodon't run plymouth --show-splash from udev rule
Harald Hoyer [Wed, 3 Jun 2009 15:12:07 +0000 (17:12 +0200)]
don't run plymouth --show-splash from udev rule

we have to run it no matter what, so don't rely on a rule

15 years agorun udevadm trigger for graphics for plymouth in pre-trigger hook
Harald Hoyer [Wed, 3 Jun 2009 15:05:57 +0000 (17:05 +0200)]
run udevadm trigger for graphics for plymouth in pre-trigger hook

15 years agocorrected paths
Harald Hoyer [Wed, 3 Jun 2009 15:06:44 +0000 (17:06 +0200)]
corrected paths

15 years agodon't be verbose on testimage target
Harald Hoyer [Wed, 3 Jun 2009 15:04:43 +0000 (17:04 +0200)]
don't be verbose on testimage target

15 years agoplymouth0.7: Launch plymouth --show-splash from udev event, and once before switch_ro...
Warren Togami [Wed, 3 Jun 2009 00:20:44 +0000 (20:20 -0400)]
plymouth0.7: Launch plymouth --show-splash from udev event, and once before switch_root in case it didn't start

15 years agoDetect KMS capable drm drivers instead of hard coded list.
Warren Togami [Tue, 2 Jun 2009 20:51:49 +0000 (16:51 -0400)]
Detect KMS capable drm drivers instead of hard coded list.

15 years agopreserve the original root= variable
Harald Hoyer [Tue, 2 Jun 2009 16:01:52 +0000 (18:01 +0200)]
preserve the original root= variable

15 years agouse iscsi-iname to generate the initiator name, if not specified
Harald Hoyer [Tue, 2 Jun 2009 14:10:36 +0000 (16:10 +0200)]
use iscsi-iname to generate the initiator name, if not specified

15 years agooverride commandline/conf options by root_path
Harald Hoyer [Tue, 2 Jun 2009 14:10:04 +0000 (16:10 +0200)]
override commandline/conf options by root_path

15 years agomoved away Makefile for TEST-30-ISCSI
Harald Hoyer [Tue, 2 Jun 2009 12:26:48 +0000 (14:26 +0200)]
moved away Makefile for TEST-30-ISCSI

until iSCSI target VM is built by the testcase

15 years agoremoved debug code
Harald Hoyer [Tue, 2 Jun 2009 11:32:11 +0000 (13:32 +0200)]
removed debug code

15 years agoadd iSCSI module
Harald Hoyer [Tue, 2 Jun 2009 11:22:29 +0000 (13:22 +0200)]
add iSCSI module

15 years agoinstall cat for network module
Harald Hoyer [Tue, 2 Jun 2009 11:21:02 +0000 (13:21 +0200)]
install cat for network module

15 years agofixed fstype mount options
Harald Hoyer [Tue, 2 Jun 2009 07:25:24 +0000 (09:25 +0200)]
fixed fstype mount options

15 years agoplymouth-0.7: details.so must be copied as well
Warren Togami [Tue, 2 Jun 2009 02:57:08 +0000 (22:57 -0400)]
plymouth-0.7: details.so must be copied as well

15 years agostrip block: off root= when using the mount hooks
David Dillow [Tue, 2 Jun 2009 01:43:07 +0000 (21:43 -0400)]
strip block: off root= when using the mount hooks

I'm not sure they are still used, but if so they need to
trim the prefix.

15 years agoAllow NFS and NBD to be built into the kernel
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.

15 years agoRemove dependency on /bin/echo
David Dillow [Mon, 1 Jun 2009 23:46:43 +0000 (19:46 -0400)]
Remove dependency on /bin/echo

Actually cut the last dependency on //bin/echo for resume.

15 years agocleanup shebangs in sourced scripts
David Dillow [Mon, 1 Jun 2009 23:17:48 +0000 (19:17 -0400)]
cleanup shebangs in sourced scripts

All of the scripts are sourced, so there is no need to have
will pick up on the .sh extension.

15 years agonfs needs sunrpc
Warren Togami [Mon, 1 Jun 2009 22:38:53 +0000 (18:38 -0400)]
nfs needs sunrpc

15 years agoInclude only wired ethernet drivers, explicitly exclude wireless.
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.)

15 years agoplymouth-0.7: fully install default theme and associated plugin
Warren Togami [Mon, 1 Jun 2009 20:09:24 +0000 (16:09 -0400)]
plymouth-0.7: fully install default theme and associated plugin

15 years agoMerge branch 'master' of ../dracut-dillow
Warren Togami [Mon, 1 Jun 2009 18:54:59 +0000 (14:54 -0400)]
Merge branch 'master' of ../dracut-dillow

15 years agoRevert --resolve-names=never in init
Victor Lowther [Mon, 1 Jun 2009 09:04:34 +0000 (04:04 -0500)]
Revert --resolve-names=never in init

That flag is too new to work on most shipping distros, so fall back to
including /etc/group and the libnss_files.

15 years agoAdd NBD support
David Dillow [Mon, 1 Jun 2009 04:59:52 +0000 (00:59 -0400)]
Add NBD support

This adds basic support for root on a network block device to
the netroot framework.

15 years agonfsroot: move to netroot framework
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.

15 years agonetroot: add common handler for network root devices
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.

15 years agodracut-lib: add source_all to library
David Dillow [Mon, 1 Jun 2009 04:39:56 +0000 (00:39 -0400)]
dracut-lib: add source_all to library

The network root handler will need this.

15 years agoresume: add support for labeled resume devices
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.

15 years agocmdline: cleanup handling and block: handler
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.

15 years agodracut: add cmdline hook
David Dillow [Mon, 1 Jun 2009 03:33:56 +0000 (23:33 -0400)]
dracut: add cmdline hook

This hook is where each module should parse kernel command line
options and perform any legacy translation.

15 years agoblock root: split out resume parsing and udev rules
David Dillow [Mon, 1 Jun 2009 03:19:31 +0000 (23:19 -0400)]
block root: split out resume parsing and udev rules

We have a resume module, and these rules should live in it. Modify
the sort order a bit to ensure the resume rules continue to execute
first.

15 years agonfsroot: move to same sort order as block methods
David Dillow [Mon, 1 Jun 2009 02:45:12 +0000 (22:45 -0400)]
nfsroot: move to same sort order as block methods

There is no reason for this to be a 40nfsroot rather than 95nfs
once other network root handlers are added. Go ahead and move it.

15 years agoMake root on local block device test completly automated.
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.

15 years agoSeveral updates to make dracut a bit more robust.
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.

15 years agoExcise excess logging verbosity when installing kernel modules.
Victor Lowther [Sat, 30 May 2009 17:04:33 +0000 (12:04 -0500)]
Excise excess logging verbosity when installing kernel modules.

15 years agoHave udevd never try to resolve user or group ownership of devices.
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.

15 years agoFix bug in kernel module loading
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.

15 years agoModify the check script so that 40network will only load as a
Victor Lowther [Sat, 30 May 2009 03:58:21 +0000 (22:58 -0500)]
Modify the check script so that 40network will only load as a
dependency on another module.

15 years agoModify kernel module installation routine to respect --hostonly.
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.

15 years agoRemoved 90kernel-modules-loaded.
Victor Lowther [Sat, 30 May 2009 03:19:43 +0000 (22:19 -0500)]
Removed 90kernel-modules-loaded.

Sure, it will load all the modules that are currently installed into the
initramfs.  Why was this a good thing, again?

15 years agoUpdate check scripts in modules to make them work again.
Victor Lowther [Sat, 30 May 2009 03:14:31 +0000 (22:14 -0500)]
Update check scripts in modules to make them work again.

Also got rid of "dracutmodules=hostonly".  We have --hostonly, and it
does the same thing.

15 years agoVictor pointed out --hostonly doesn't go into check.
Warren Togami [Sat, 30 May 2009 03:56:55 +0000 (23:56 -0400)]
Victor pointed out --hostonly doesn't go into check.

15 years agoMerge branch 'master' of ssh://vlowther@dracut.git.sourceforge.net/gitroot/dracut
Victor Lowther [Fri, 29 May 2009 22:58:15 +0000 (17:58 -0500)]
Merge branch 'master' of ssh://vlowther@dracut.git.sourceforge.net/gitroot/dracut

15 years agoDon't create fully generic initramfs'es in the test framework
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.

15 years agoProperly detect -H and --hostonly mode
Warren Togami [Fri, 29 May 2009 22:38:49 +0000 (18:38 -0400)]
Properly detect -H and --hostonly mode

15 years agoRemove redundant modprobe.d copy
Warren Togami [Fri, 29 May 2009 17:20:33 +0000 (13:20 -0400)]
Remove redundant modprobe.d copy

15 years agoMerge branch 'master' of ssh://vlowther@dracut.git.sourceforge.net/gitroot/dracut
Victor Lowther [Fri, 29 May 2009 11:50:37 +0000 (06:50 -0500)]
Merge branch 'master' of ssh://vlowther@dracut.git.sourceforge.net/gitroot/dracut