platform/upstream/dracut.git
15 years agorenamed internal command line options to rd* namespace
Harald Hoyer [Mon, 25 May 2009 15:59:21 +0000 (17:59 +0200)]
renamed internal command line options to rd* namespace

ramfsdebug -> rdinitdebug
udevinfo -> rdudevinfo
udevdebug -> rdudevdebug

15 years agoexit 0 on end of dracut
Harald Hoyer [Mon, 25 May 2009 15:45:15 +0000 (17:45 +0200)]
exit 0 on end of dracut

15 years agoMove content of 00test module into the test subdir
Victor Lowther [Sun, 24 May 2009 05:29:46 +0000 (22:29 -0700)]
Move content of 00test module into the test subdir

The last changes made the 00test module really awkward anyways, so just
hack the test module into the initramfs in a slight more brutal fashion.

15 years agoAdd infrastructure for dracut module dependency checking.
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.

15 years agoadd small test script to create a minimal root in /mnt/root
Harald Hoyer [Mon, 25 May 2009 14:51:10 +0000 (16:51 +0200)]
add small test script to create a minimal root in /mnt/root

15 years agochmod u+x modules.d/40nfsroot/install
Harald Hoyer [Mon, 25 May 2009 14:49:26 +0000 (16:49 +0200)]
chmod u+x modules.d/40nfsroot/install

15 years agouse 40nfsroot
Harald Hoyer [Mon, 25 May 2009 14:49:10 +0000 (16:49 +0200)]
use 40nfsroot

15 years agomove /var/lib/nfs/rpc_pipefs to NEWROOT only if directory exists
Harald Hoyer [Mon, 25 May 2009 14:48:36 +0000 (16:48 +0200)]
move /var/lib/nfs/rpc_pipefs to NEWROOT only if directory exists

15 years agoroot=dhcp
Harald Hoyer [Mon, 25 May 2009 14:48:19 +0000 (16:48 +0200)]
root=dhcp

15 years agomake root=dhcp work
Harald Hoyer [Mon, 25 May 2009 14:48:01 +0000 (16:48 +0200)]
make root=dhcp work

15 years agodo not ignore old test files
Harald Hoyer [Mon, 25 May 2009 13:33:19 +0000 (15:33 +0200)]
do not ignore old test files

15 years agouse 40nfsroot instead of 95NFS
Harald Hoyer [Mon, 25 May 2009 13:28:56 +0000 (15:28 +0200)]
use 40nfsroot instead of 95NFS

15 years agodo not trap if hostname is empty
Harald Hoyer [Mon, 25 May 2009 13:26:40 +0000 (15:26 +0200)]
do not trap if hostname is empty

15 years agointroduce modular test suite
Harald Hoyer [Mon, 25 May 2009 12:43:03 +0000 (14:43 +0200)]
introduce modular test suite

15 years agosilently run qemu
Harald Hoyer [Mon, 25 May 2009 12:11:24 +0000 (14:11 +0200)]
silently run qemu

15 years agoadd dinfo which module is handled currently
Harald Hoyer [Mon, 25 May 2009 12:10:45 +0000 (14:10 +0200)]
add dinfo which module is handled currently

15 years agofor "-l" search dracut-functions relative to dracut path
Harald Hoyer [Mon, 25 May 2009 12:09:57 +0000 (14:09 +0200)]
for "-l" search dracut-functions relative to dracut path

15 years agolet find_rule find absolute path rules
Harald Hoyer [Mon, 25 May 2009 12:08:39 +0000 (14:08 +0200)]
let find_rule find absolute path rules

15 years agonfsroot: mount NFS root from udev rules
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.

15 years agonetwork: prepare network configuration engine for udev-based nfsroot
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.

15 years agolib: create a library for useful shell functions
David Dillow [Sat, 23 May 2009 02:29:22 +0000 (22:29 -0400)]
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>
15 years agocreate test/initramfs.testing from Makefile target
Harald Hoyer [Mon, 25 May 2009 10:11:27 +0000 (12:11 +0200)]
create test/initramfs.testing from Makefile target

15 years agoAdd a README.modules that describes how dracut modules work.
Victor Lowther [Sat, 23 May 2009 02:24:29 +0000 (19:24 -0700)]
Add a README.modules that describes how dracut modules work.

15 years agoPoint README at README.modules for more detail on writing modules
Victor Lowther [Sat, 23 May 2009 02:24:33 +0000 (19:24 -0700)]
Point README at README.modules for more detail on writing modules

15 years agoChanged multiline conditional lists to if statements in dracut-functions
Victor Lowther [Sat, 23 May 2009 02:24:31 +0000 (19:24 -0700)]
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.

15 years agoStyle cleanups in main dracut script.
Victor Lowther [Sat, 23 May 2009 02:24:29 +0000 (19:24 -0700)]
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.

15 years agodracut: fix fallback to default configuration file
David Dillow [Sat, 23 May 2009 02:16:00 +0000 (22:16 -0400)]
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>
15 years agodracut-funtions: fix 'instmods =modname'
David Dillow [Sat, 23 May 2009 02:12:08 +0000 (22:12 -0400)]
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>
15 years agoMake generation of testroot images succeed
Andreas Thienemann [Thu, 21 May 2009 14:53:52 +0000 (16:53 +0200)]
Make generation of testroot images succeed

sorry, patch was reversed.

correct patch below:

15 years ago/dev/kvm is a char device
Harald Hoyer [Mon, 25 May 2009 09:44:52 +0000 (11:44 +0200)]
/dev/kvm is a char device

15 years agoset u+x for run-qemu
Harald Hoyer [Mon, 25 May 2009 09:35:19 +0000 (11:35 +0200)]
set u+x for run-qemu

15 years agoSupport different virtualization technologies for run-qemu.
Andreas Thienemann [Thu, 21 May 2009 10:24:58 +0000 (12:24 +0200)]
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.

15 years agoCreate test image on an md array and improve cryptroot handling
Victor Lowther [Thu, 21 May 2009 02:55:13 +0000 (19:55 -0700)]
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.

15 years agoAdd comments to make-test-root to explain why it is written the way it is.
Victor Lowther [Thu, 21 May 2009 02:55:11 +0000 (19:55 -0700)]
Add comments to make-test-root to explain why it is written the way it is.

15 years agoRemove generated test initramfs'es when cleaning up
Victor Lowther [Thu, 21 May 2009 02:55:08 +0000 (19:55 -0700)]
Remove generated test initramfs'es when cleaning up

15 years agoWe create our test image with root as an LVM menber.
Victor Lowther [Thu, 21 May 2009 02:55:06 +0000 (19:55 -0700)]
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.

15 years agoMake running qemu a little more generic
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.

15 years ago-I parameter allows you specify an arbitary file to install in the initrd image.
Andreas Thienemann [Sun, 24 May 2009 02:10:52 +0000 (22:10 -0400)]
-I parameter allows you specify an arbitary file to install in the initrd image.
-H becomes --hostonly because -h is already taken by --help.

15 years agoAbort if switch_root does not exist.
Warren Togami [Thu, 21 May 2009 23:14:50 +0000 (19:14 -0400)]
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.)

15 years agoOops, make it work
Warren Togami [Thu, 21 May 2009 19:16:44 +0000 (15:16 -0400)]
Oops, make it work

15 years agoDo not attempt to load policy if selinux-policy is not installed.
Warren Togami [Thu, 21 May 2009 18:34:38 +0000 (14:34 -0400)]
Do not attempt to load policy if selinux-policy is not installed.

15 years agoCheck /sbin/plymouthd for arch instead of /proc/$$/exe. /sbin/plymouthd is guaranteed...
Warren Togami [Thu, 21 May 2009 00:35:08 +0000 (20:35 -0400)]
Check /sbin/plymouthd for arch instead of /proc/$$/exe. /sbin/plymouthd is guaranteed to be there and be the correct arch.

15 years agomodule-init-tools only recognizes files ending in *.conf, so only copy files of that...
Warren Togami [Wed, 20 May 2009 19:35:23 +0000 (15:35 -0400)]
module-init-tools only recognizes files ending in *.conf, so only copy files of that pattern.

15 years agoadd xts module to crypto
Andreas Thienemann [Wed, 20 May 2009 16:06:27 +0000 (18:06 +0200)]
add xts module to crypto

15 years agofix -t auto for fstype=""
Andreas Thienemann [Wed, 20 May 2009 14:51:50 +0000 (16:51 +0200)]
fix -t auto for fstype=""

15 years agoquit plymouth in test root
Harald Hoyer [Wed, 20 May 2009 12:58:55 +0000 (14:58 +0200)]
quit plymouth in test root

15 years agoadd missing files for plymouth
Andreas Thienemann [Wed, 20 May 2009 12:38:22 +0000 (14:38 +0200)]
add missing files for plymouth

15 years agoinclude all modules for the test besides of plymouth
Harald Hoyer [Wed, 20 May 2009 12:09:23 +0000 (14:09 +0200)]
include all modules for the test besides of plymouth

15 years agosilence plymouth install
Harald Hoyer [Wed, 20 May 2009 12:08:58 +0000 (14:08 +0200)]
silence plymouth install

15 years agoignore *~
Harald Hoyer [Wed, 20 May 2009 12:08:25 +0000 (14:08 +0200)]
ignore *~

15 years agoplymouth hide-splash on emergency shell
Harald Hoyer [Wed, 20 May 2009 12:07:37 +0000 (14:07 +0200)]
plymouth hide-splash on emergency shell

15 years agoadd emergency hook
Harald Hoyer [Wed, 20 May 2009 12:05:32 +0000 (14:05 +0200)]
add emergency hook

15 years agofixed NFS mounting
Harald Hoyer [Wed, 20 May 2009 12:04:33 +0000 (14:04 +0200)]
fixed NFS mounting

15 years agoadd "-o, --omit" to omit dracut modules
Harald Hoyer [Wed, 20 May 2009 12:02:44 +0000 (14:02 +0200)]
add "-o, --omit" to omit dracut modules

15 years agoset "-t auto" as default if fstype is emtpy
Harald Hoyer [Wed, 20 May 2009 12:01:03 +0000 (14:01 +0200)]
set "-t auto" as default if fstype is emtpy

15 years agosilence the "check"'s
Harald Hoyer [Wed, 20 May 2009 12:00:28 +0000 (14:00 +0200)]
silence the "check"'s

15 years agocheck for plymouth-set-default-theme not plymouth-set-default-plugin
Harald Hoyer [Wed, 20 May 2009 10:33:11 +0000 (12:33 +0200)]
check for plymouth-set-default-theme not plymouth-set-default-plugin

15 years agodinfo print only when verbose defined
Andreas Thienemann [Wed, 20 May 2009 10:30:22 +0000 (12:30 +0200)]
dinfo print only when verbose defined

15 years agorecreate /dev/null after /dev mounting
Harald Hoyer [Wed, 20 May 2009 09:59:34 +0000 (11:59 +0200)]
recreate /dev/null after /dev mounting

15 years agofix node check for plymouth-start.sh
Harald Hoyer [Wed, 20 May 2009 09:42:41 +0000 (11:42 +0200)]
fix node check for plymouth-start.sh

15 years agofix node check for plymouth-start.sh
Harald Hoyer [Wed, 20 May 2009 09:32:55 +0000 (11:32 +0200)]
fix node check for plymouth-start.sh

15 years agoadd plymouth module for plymouth < 0.7
Harald Hoyer [Wed, 20 May 2009 09:14:56 +0000 (11:14 +0200)]
add plymouth module for plymouth < 0.7

15 years agoPrevent plymouth-start.sh from creating already existing device nodes.
Andreas Thienemann [Tue, 19 May 2009 22:02:18 +0000 (00:02 +0200)]
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(-)

15 years agoFix "--debug" parameter for dracut
Andreas Thienemann [Wed, 20 May 2009 07:03:01 +0000 (09:03 +0200)]
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.

15 years agoadd usage() to dracut
Andreas Thienemann [Tue, 19 May 2009 14:47:03 +0000 (16:47 +0200)]
add usage() to dracut

15 years agooutput error message, if dracut-functions not found
Andreas Thienemann [Tue, 19 May 2009 14:46:33 +0000 (16:46 +0200)]
output error message, if dracut-functions not found

15 years agoAdd ideas for how to possibly avoid daemon restarts.
Peter Jones [Mon, 18 May 2009 18:50:44 +0000 (14:50 -0400)]
Add ideas for how to possibly avoid daemon restarts.

15 years agoremove "set -x" from nfs-mount-root.sh
Harald Hoyer [Mon, 18 May 2009 18:44:00 +0000 (20:44 +0200)]
remove "set -x" from nfs-mount-root.sh

15 years agosupport normal nfs root definition syntax
Harald Hoyer [Mon, 18 May 2009 17:55:58 +0000 (19:55 +0200)]
support normal nfs root definition syntax

15 years agoadd nfs testcase
Harald Hoyer [Mon, 18 May 2009 17:32:22 +0000 (19:32 +0200)]
add nfs testcase

15 years agoonly create udev rules for root=/dev/...
Harald Hoyer [Mon, 18 May 2009 17:32:01 +0000 (19:32 +0200)]
only create udev rules for root=/dev/...

15 years agobasic support for "nfs://" dhcp root_path
Harald Hoyer [Mon, 18 May 2009 17:31:08 +0000 (19:31 +0200)]
basic support for "nfs://" dhcp root_path

15 years agoreenable manual block mount for e.g. lvm devices
Harald Hoyer [Mon, 18 May 2009 16:17:56 +0000 (18:17 +0200)]
reenable manual block mount for e.g. lvm devices

15 years agoremoved debug code
Harald Hoyer [Mon, 18 May 2009 14:38:32 +0000 (16:38 +0200)]
removed debug code

15 years agobetter use bash for initramfs debugging
Harald Hoyer [Mon, 18 May 2009 14:09:16 +0000 (16:09 +0200)]
better use bash for initramfs debugging

15 years agofixed dhclient dhcp options saving
Harald Hoyer [Mon, 18 May 2009 14:08:58 +0000 (16:08 +0200)]
fixed dhclient dhcp options saving

15 years agoadd minimal dnsmasq dhcp/dns server
Harald Hoyer [Mon, 18 May 2009 13:33:37 +0000 (15:33 +0200)]
add minimal dnsmasq dhcp/dns server

15 years agouse multicast net for qemu
Harald Hoyer [Mon, 18 May 2009 13:32:09 +0000 (15:32 +0200)]
use multicast net for qemu

15 years agofixed wildcard test of run-dhclient.sh
Harald Hoyer [Mon, 18 May 2009 13:31:07 +0000 (15:31 +0200)]
fixed wildcard test of run-dhclient.sh

15 years agofixed 40network module
Harald Hoyer [Mon, 18 May 2009 13:22:33 +0000 (15:22 +0200)]
fixed 40network module

15 years agoadd "rm" to debug module
Harald Hoyer [Mon, 18 May 2009 13:22:03 +0000 (15:22 +0200)]
add "rm" to debug module

15 years agoadd dhclient to test root image
Harald Hoyer [Mon, 18 May 2009 12:09:21 +0000 (14:09 +0200)]
add dhclient to test root image

15 years agomkdir /var/run for dhclient
Harald Hoyer [Mon, 18 May 2009 12:08:02 +0000 (14:08 +0200)]
mkdir /var/run for dhclient

15 years agokill dhclient if pid was found
Harald Hoyer [Mon, 18 May 2009 12:07:34 +0000 (14:07 +0200)]
kill dhclient if pid was found

15 years agoadd debug to test image
Harald Hoyer [Mon, 18 May 2009 12:06:47 +0000 (14:06 +0200)]
add debug to test image

15 years agomerge 95rootfs-block-udev and 95rootfs-block
Harald Hoyer [Mon, 18 May 2009 12:05:36 +0000 (14:05 +0200)]
merge 95rootfs-block-udev and 95rootfs-block

15 years agosetsid() and set controlling terminal for real /sbin/init
Harald Hoyer [Mon, 18 May 2009 11:57:51 +0000 (13:57 +0200)]
setsid() and set controlling terminal for real /sbin/init

enables job control in the test images

15 years agomerge 95rootfs-block-udev and 95rootfs-block
Harald Hoyer [Fri, 15 May 2009 13:42:28 +0000 (15:42 +0200)]
merge 95rootfs-block-udev and 95rootfs-block

15 years agoremoved kernel variable from test/test-initramfs
Harald Hoyer [Fri, 15 May 2009 12:09:55 +0000 (14:09 +0200)]
removed kernel variable from test/test-initramfs

15 years agocleanup make-test-root
Harald Hoyer [Fri, 15 May 2009 11:24:08 +0000 (13:24 +0200)]
cleanup make-test-root

15 years agoadd APPEND and DRACUTOPTS to make target "test"
Harald Hoyer [Fri, 15 May 2009 11:16:15 +0000 (13:16 +0200)]
add APPEND and DRACUTOPTS to make target "test"

call test with additional dracut options and kernel command line
parameter:

$ make APPEND="udevinfo quiet" DRACUTOPTS="-verbose" test

15 years agofall back to filesystem type "auto"
Harald Hoyer [Fri, 15 May 2009 11:15:11 +0000 (13:15 +0200)]
fall back to filesystem type "auto"

15 years agodash echo does not support -e option
Harald Hoyer [Fri, 15 May 2009 10:49:25 +0000 (12:49 +0200)]
dash echo does not support -e option

use /bin/echo, instead of dash builtin echo
do not use "sh -c"

15 years agochange file descriptor for flock locking
Harald Hoyer [Fri, 15 May 2009 10:48:11 +0000 (12:48 +0200)]
change file descriptor for flock locking

dash does not like filedescriptors > 9

15 years agoadd debug and changed verbose parameter
Harald Hoyer [Fri, 15 May 2009 10:45:58 +0000 (12:45 +0200)]
add debug and changed verbose parameter

previous -verbose is now -debug (set -x)
-verbose adds some information about the resulting initrd size

15 years agoadd derror(), dinfo() and dwarning()
Harald Hoyer [Fri, 15 May 2009 10:45:21 +0000 (12:45 +0200)]
add derror(), dinfo() and dwarning()

15 years agoadd target "check"
Harald Hoyer [Fri, 15 May 2009 10:44:36 +0000 (12:44 +0200)]
add target "check"

add dash syntax checking

15 years agofixed plymouth installation for plymouth-0.7.0-0.2009.05.08.1.fc11
Harald Hoyer [Fri, 15 May 2009 10:43:46 +0000 (12:43 +0200)]
fixed plymouth installation for plymouth-0.7.0-0.2009.05.08.1.fc11

15 years agodo not run dhclient, if no net device found
Harald Hoyer [Fri, 15 May 2009 10:43:03 +0000 (12:43 +0200)]
do not run dhclient, if no net device found

15 years agoupdated README and TODO
Harald Hoyer [Tue, 12 May 2009 13:48:03 +0000 (15:48 +0200)]
updated README and TODO