Commit Graph

356 Commits (f6f74096f6fa2bac0e841f21134dba00b5b65d9a)

Author SHA1 Message Date
David Dillow f6f74096f6 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.
2009-05-25 12:19:38 +02:00
David Dillow 7e9919b927 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.
2009-05-25 12:19:25 +02:00
David Dillow df44688f3e lib: create a library for useful shell functions
There are several snippits of shell code that are useful to multiple
scripts. Start by moving getarg() into the library.

Signed-off-by: David Dillow <dave@thedillows.org>
2009-05-25 12:13:54 +02:00
Harald Hoyer ce743a71cc create test/initramfs.testing from Makefile target 2009-05-25 12:11:27 +02:00
Victor Lowther 2e7b8713b4 Add a README.modules that describes how dracut modules work. 2009-05-25 12:03:39 +02:00
Victor Lowther 06896cd851 Point README at README.modules for more detail on writing modules 2009-05-25 12:03:39 +02:00
Victor Lowther cdad82fd14 Changed multiline conditional lists to if statements in dracut-functions
It seems that some people object to multiline conditional lists.
Oh, well, no accounting for taste.
2009-05-25 12:03:39 +02:00
Victor Lowther f1336ac775 Style cleanups in main dracut script.
This patch series applies on top of my previous patch series, and
is mainly concerned with coding style updates and better documentation.

Apparently [[ ]] && { ; } type flow control is scary, so translate
most instances of them into standard if-then and case constructs.
2009-05-25 12:03:31 +02:00
David Dillow 6722a717ea dracut: fix fallback to default configuration file
Need to do the fallback in a list rather than a subshell, or we never
actually set $conffile.

Signed-off-by: David Dillow <dave@thedillows.org>
2009-05-25 11:51:57 +02:00
David Dillow 5686cd41d6 dracut-funtions: fix 'instmods =modname'
Move srcmods definition into the function, as $kernel isn't defined yet when
dracut-functions is sourced from dracut.

Signed-off-by: David Dillow <dave@thedillows.org>
2009-05-25 11:51:36 +02:00
Andreas Thienemann 3512925ae2 Make generation of testroot images succeed
sorry, patch was reversed.

correct patch below:
2009-05-25 11:50:20 +02:00
Harald Hoyer 008bb4f22c /dev/kvm is a char device 2009-05-25 11:44:52 +02:00
Harald Hoyer 2281815799 set u+x for run-qemu 2009-05-25 11:36:32 +02:00
Andreas Thienemann 8a4b60d9b2 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.
2009-05-25 11:36:32 +02:00
Victor Lowther 4957ab92f2 Create test image on an md array and improve cryptroot handling
If we purport to test booting to an md raid, we may as well test it.

We do not need the plymouth module and the normal crypt module to include
duplicate functionality.
2009-05-25 11:36:32 +02:00
Victor Lowther 7f6643f9d9 Add comments to make-test-root to explain why it is written the way it is. 2009-05-25 11:36:32 +02:00
Victor Lowther c92e789ff4 Remove generated test initramfs'es when cleaning up 2009-05-25 11:36:32 +02:00
Victor Lowther 9335cb383a We create our test image with root as an LVM menber.
We purport to support booting off an encrypted LVM PV, may as well test it.
2009-05-25 11:36:27 +02:00
Victor Lowther ac6da96cc8 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.
2009-05-25 11:24:26 +02:00
Andreas Thienemann 39ff06820f -I parameter allows you specify an arbitary file to install in the initrd image.
-H becomes --hostonly because -h is already taken by --help.
2009-05-23 22:10:52 -04:00
Warren Togami 7ee170746f Abort if switch_root does not exist.
Otherwise it would succeed silently when we KNOW it would fail, which is not cool.
Usually this means you didn't build switch_root in your dracut checkout and you used dracut -l.
(This currently cannot be done in a check script, because of the current design of check.
Andreas intends on discussing a redesign on the list.)
2009-05-21 19:14:50 -04:00
Warren Togami 4ae46e575d Oops, make it work 2009-05-21 15:16:44 -04:00
Warren Togami 76434898ad Do not attempt to load policy if selinux-policy is not installed. 2009-05-21 14:34:38 -04:00
Warren Togami d03caf15cc Check /sbin/plymouthd for arch instead of /proc/$$/exe. /sbin/plymouthd is guaranteed to be there and be the correct arch. 2009-05-21 12:15:58 -04:00
Warren Togami 1a1b179a5b module-init-tools only recognizes files ending in *.conf, so only copy files of that pattern. 2009-05-21 11:38:25 -04:00
Andreas Thienemann 3b8c6ac696 add xts module to crypto 2009-05-20 18:06:27 +02:00
Andreas Thienemann fc791a7fde fix -t auto for fstype="" 2009-05-20 16:51:50 +02:00
Harald Hoyer 4b8b7c59cf quit plymouth in test root 2009-05-20 14:58:55 +02:00
Andreas Thienemann 9a4495557f add missing files for plymouth 2009-05-20 14:38:22 +02:00
Harald Hoyer 3745a7eb43 include all modules for the test besides of plymouth 2009-05-20 14:25:35 +02:00
Harald Hoyer 5ce91332ba silence plymouth install 2009-05-20 14:25:35 +02:00
Harald Hoyer 76cf8f52d6 ignore *~ 2009-05-20 14:25:35 +02:00
Harald Hoyer 69f8af0267 plymouth hide-splash on emergency shell 2009-05-20 14:25:35 +02:00
Harald Hoyer a4aee9e573 add emergency hook 2009-05-20 14:25:35 +02:00
Harald Hoyer ea62f0eb2a fixed NFS mounting 2009-05-20 14:25:31 +02:00
Harald Hoyer 3274a8f98e add "-o, --omit" to omit dracut modules 2009-05-20 14:02:44 +02:00
Harald Hoyer 9c6f43f0e7 set "-t auto" as default if fstype is emtpy 2009-05-20 14:01:03 +02:00
Harald Hoyer 6d090d6427 silence the "check"'s 2009-05-20 14:00:28 +02:00
Harald Hoyer 6cfef0c638 check for plymouth-set-default-theme not plymouth-set-default-plugin 2009-05-20 12:33:11 +02:00
Andreas Thienemann 84ffb877fd dinfo print only when verbose defined 2009-05-20 12:30:22 +02:00
Harald Hoyer 155c171d88 recreate /dev/null after /dev mounting 2009-05-20 11:59:34 +02:00
Harald Hoyer 9e30573629 fix node check for plymouth-start.sh 2009-05-20 11:42:41 +02:00
Harald Hoyer 1babfad10a fix node check for plymouth-start.sh 2009-05-20 11:32:55 +02:00
Harald Hoyer 42baa902f2 add plymouth module for plymouth < 0.7 2009-05-20 11:14:56 +02:00
Andreas Thienemann 7a02208af4 Prevent plymouth-start.sh from creating already existing device nodes.
Prevent messages such as the following when booting dracut:

++ mknod /dev/null c 1 3
mknod: `/dev/null': File exists

The plymouth-start.sh script tries to create device nodes it needs, but which
have already been created by the /init script.

This patch makes the mknod calls conditional.

diffstat dracut-plymouth-prevent-mknod-errormsg.patch
 plymouth-start.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
2009-05-20 11:13:37 +02:00
Andreas Thienemann 0053156804 Fix "--debug" parameter for dracut
remove "-d" as a short-alias for --debug. It collides with the
--driver short-alias.

If --debug is set, inst_script() spews binary "garbage" to the screen
which are interpreted as control characters by the terminal, prompting
the user to call "reset" after dracut has finished. This is related to
set -x  printing binary headers from files to stdout.
As inst_script() is only checking if it is a script it should copy by
reading the first 80chars of the file and checking for the shebang line,
it is safe to call tr on the read in data and remove all unprintable
chars if the debug switch is set.
2009-05-20 09:03:01 +02:00
Andreas Thienemann 5616feb004 add usage() to dracut 2009-05-19 16:47:03 +02:00
Andreas Thienemann adbc8a42b6 output error message, if dracut-functions not found 2009-05-19 16:46:33 +02:00
Peter Jones 9b4191d065 Add ideas for how to possibly avoid daemon restarts. 2009-05-18 21:00:13 +02:00
Harald Hoyer 24987e12a9 remove "set -x" from nfs-mount-root.sh 2009-05-18 20:44:00 +02:00