Commit Graph

1053 Commits (011)

Author SHA1 Message Date
Harald Hoyer edb511860c Fixed: Move multipath scan earlier. It must go before any other dm rules.
Also changed the filename in the install file.
2010-02-12 11:00:21 +01:00
Harald Hoyer a39ea24f10 nfs: suppress error message about missing passwd 2010-02-10 18:54:31 +01:00
Harald Hoyer 93bc3d440c make nfs4 work 2010-02-10 17:21:46 +01:00
Peter Jones 7e22ab0891 Move multipath scan earlier. It must go before any other dm rules.
multipath scan needs to go before lvm, or else lvm may grab the device
multipath would activate, and multipath will be unable to claim it.
2010-02-05 14:23:20 -05:00
Harald Hoyer c98bcec89c add preliminary IPv6 support 2010-02-04 16:05:19 +01:00
Harald Hoyer b456ab777d zfcp: install s390utils script rather than local one 2010-02-04 16:03:35 +01:00
Harald Hoyer d43036ffeb rootfs-block: strip "ro|rw" options from fstab options
https://bugzilla.redhat.com/show_bug.cgi?id=560424
2010-02-03 17:24:51 +01:00
Harald Hoyer c88b219410 dasd_mod: changed prio of cmdline hook to be executed after dasd 2010-02-03 10:17:58 +01:00
Harald Hoyer bab749e23e init: dashified $[] -> $(()) 2010-02-02 15:21:51 +01:00
Harald Hoyer 4dc4cc3fc6 fixed permissions for the check files 2010-01-27 16:11:19 +01:00
Peter Jones 3d45f9bba9 Add a check file for multipath.
If multipath isn't installed, don't use it.  If we're in hostonly mode,
only install the multipath module if it's used for / .  Otherwise, if
the user was dumb enough to install it, they get it during bootup.
2010-01-27 16:10:43 +01:00
Harald Hoyer 97c97ff6d5 base: fix selinux handling if .autorelabel is present
rhbz#557744
2010-01-27 16:09:15 +01:00
Harald Hoyer d8231fa5c2 mdraid: prefer /etc/mdadm.conf over /etc/mdadm/mdadm.conf
see https://bugzilla.redhat.com/show_bug.cgi?id=557339
https://bugzilla.redhat.com/show_bug.cgi?id=559073
2010-01-27 15:59:10 +01:00
Harald Hoyer 5db587d7c1 init: fixed emergency_shell argument parsing 2010-01-20 16:04:55 +01:00
Harald Hoyer 4bb570c9a4 dracut-lib: do not leave debug mode in getarg and getargs 2010-01-15 14:07:54 +01:00
Harald Hoyer 2dfdcbf4e7 dracut-lib: read multiple lines from $init/etc/cmdline 2010-01-15 12:33:41 +01:00
Harald Hoyer 80deff7c4b lvm: remove lvm-cleanup 2010-01-14 17:04:06 +01:00
Munehiro Matsuda 651f3f3d1a dmsquash: add support for loopmounted *.iso files
https://bugzilla.redhat.com/show_bug.cgi?id=548283
2010-01-14 16:47:16 +01:00
Harald Hoyer dc0a0f6c93 lvm: add rd_LVM_LV and "--poll n" 2010-01-13 17:59:14 +01:00
Harald Hoyer dc40ea7fa1 crypt/dm: move dmeventd to dm module 2010-01-13 16:33:40 +01:00
Mike Snitzer 0fae59d6eb lvm: lvm.conf (locking_type = 4)
- the use of sed is placeholder "hack" until lvm2 provides a proper
  tool for changing lvm.conf
- lvm_scan.sh should run lvm commands with --ignorelockingfailure to
  re-use lvm's existing initrd-specific logic; future lvm2 changes
  will split this flag out into various new command-line switches
- no monitoring should be started from within initramfs
- NOTE: the same should apply to 90dmraid/install
- the correct types would be: '[ "blkext", 1 , "cciss0", 16 ]'
  but lvm2 (>= 2.02.52) already properly supports both 'blkext' and
  'cciss' (including cciss0 -> cciss7)
2010-01-13 16:29:12 +01:00
Andrey Borzenkov 5c7821b6c5 Add user suspend support
This patch adds support for user mode suspend to disk. It is installed
in parallel to kernel mode suspend module; either will fail if
system was not suspended using correct tool so next one can be tried.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
2010-01-13 16:08:22 +01:00
Luca Berra f5745ec58b Ensure UNICODE keyboard layout is functional in emergency shell
/lib/udev/cosole_init will load either non-unicode or unicode versions
of keyboard layout for the same value of KEYMAP depending on language
setting. The simplest solution is to install both versions in initrd;
it does not take much space.

While on it, copy some additional maps to ensure emergency shell
has the same keyboard layout as full system.

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: Luca Berra <bluca@vodka.it>
2010-01-13 16:06:11 +01:00
Luca Berra b5664d5d02 base: improve emergency shell
for some unknown reason the emergency shell
starts with stderr closed, at first I even tought it was not working at
all, then I came up with this hack, which seems to work properly. I also
change the prompt to remind which step are we breaking to.
2010-01-13 16:01:36 +01:00
Luca Berra 506c7f2ab0 install umount for the modules, which use it 2010-01-13 15:57:32 +01:00
Luca Berra 17dcc1a801 base: do not force load policy if selinux is not installed at all 2010-01-13 15:56:34 +01:00
Luca Berra e22cdb9ef8 terminfo: search also for /usr/share/terminfo 2010-01-13 15:50:52 +01:00
Luca Berra 636fa8bea8 redhat-i18n: search also in /usr/lib
we have kbd data in /usr/lib, so this patch will
search for /lib/kbd and /usr/lib/kbd and use the existing one
2010-01-13 15:50:02 +01:00
Konrad Rzeszutek Wilk 9799e0ad8e 60xen: add support for loading Xen modules 2010-01-13 15:37:05 +01:00
Harald Hoyer 6ca1d346be kernel: add rdloaddriver kernel command line parameter
rdloaddriver=<drivername>
force loading kernel module <drivername>
2010-01-13 15:34:18 +01:00
Harald Hoyer e1603bf7e4 s390: add call to *_cio_free and use current s390utils udev rules 2010-01-13 14:26:46 +01:00
Harald Hoyer 71cfa2e225 dmsquash: add nasty hack for cdroms
Some CDROMs do not generate a label symlink and have to be read from.
2010-01-12 15:08:54 +01:00
Harald Hoyer bb2200ffca cryptroot-ask.sh: fixed luks handling
see https://bugzilla.redhat.com/show_bug.cgi?id=530898#c16
2010-01-12 14:55:09 +01:00
Harald Hoyer 695de8493d dracut-lib: prevent double log output 2010-01-12 10:37:27 +01:00
Harald Hoyer c5488692d4 multipath: check for existance before trying to install 2010-01-12 10:31:51 +01:00
Harald Hoyer 0a19e31886 plymouth-pretrigger: force initializing of console (bug #526570) 2009-12-21 15:15:38 +01:00
Harald Hoyer 2c2e3ad860 cryptroot-ask.sh: s/==/=/g (bug #542081) 2009-12-21 15:15:23 +01:00
Harald Hoyer 938dbad1e8 multipath: supress warnings, if multipath not installed on system 2009-11-30 15:24:47 +01:00
Harald Hoyer 8e93970944 fips: do not activate fips module by default 2009-11-27 14:55:02 +01:00
Harald Hoyer b65f499f60 fips: more shebang 2009-11-27 14:32:28 +01:00
Harald Hoyer c2bcc5be2f fips: add shebang to fips.sh 2009-11-27 14:31:05 +01:00
Harald Hoyer ba67b9239b changed hostonly documentation and handling 2009-11-27 14:29:32 +01:00
Philippe Seewer 9cce5af5af Remove Ubuntu 8.10 support
This is outdated and no longer needed
2009-11-27 14:07:21 +01:00
Philippe Seewer 2e6b98c7f6 All module scripts should have a shebang 2009-11-27 14:07:21 +01:00
Philippe Seewer a68c99c94e loginit: Fix shebang 2009-11-27 14:07:21 +01:00
Philippe Seewer 00da3293e2 initqueue: Remove trailing ;
dash -n complains about the trailing ';' and somehow I think this
really isn't needed.
2009-11-27 14:07:21 +01:00
Philippe Seewer 6a0ce0a518 Module scripts should be executable 2009-11-27 14:07:20 +01:00
Philippe Seewer 7ce55fd6b7 syslog-genrules.sh: Shebang should be /bin/sh not /bin/dash 2009-11-27 14:07:20 +01:00
Harald Hoyer 57c6b805ce rootfs-block/mount-root: remount root with /etc/fstab filesystem options 2009-11-26 19:12:10 +01:00
Harald Hoyer 17ed15182a multipath: corrected initqueue parameter 2009-11-26 11:41:53 +01:00
Harald Hoyer 77eaa2fea1 dm: install dmsetup 2009-11-26 11:02:34 +01:00
Harald Hoyer 4073e3a325 nfs: add rd_NFS_DOMAIN parameter to set the NFSv4 domain name
https://bugzilla.redhat.com/show_bug.cgi?id=537969
2009-11-26 10:38:40 +01:00
Harald Hoyer 48df9fcc11 nfs: install passwd entries for nobody and nfsnobody 2009-11-26 10:38:06 +01:00
Harald Hoyer bad6113059 lvm/dmraid: make LIBDIR depend on the binary 2009-11-25 20:08:22 +01:00
Yanko Kaneti 9e7ac6982a Wildcards need dracut_install 2009-11-25 19:55:17 +01:00
Harald Hoyer 47ab3b6c5e lvm: scan without monitor
https://bugzilla.redhat.com/show_bug.cgi?id=540289
2009-11-25 19:55:17 +01:00
Peter Jones 4ee9ce444b This has to be executable.
multipath-scan.sh has to be executable, of course.
2009-11-25 11:26:38 -05:00
Peter Jones 01ba5f2192 Fix missing shell variables.
Somehow copy+paste from one machine to the other removed all the shell
variables from this line.  Oops.
2009-11-25 11:06:35 -05:00
Peter Jones b869710aff Bring up multipath devices that are configured in multipath.conf.
This brings up multipath devices which are configured in multipath.conf
as we find them.
2009-11-25 10:54:12 -05:00
Peter Jones 323428ced5 Make sure and get all the multipath related modules.
Install all modules that are any of:
- scsi device handler
- dm log handler
- dm path selector
- dm target

It would be nice if we could tell which log handlers and targets are
multipath related, but we really can't.
2009-11-25 10:54:12 -05:00
Peter Jones 8f99a7f6e3 Add #!/bin/bash for consistency.
Most install scripts seem to have it there, may as well make this one
like the rest...
2009-11-25 10:54:12 -05:00
Peter Jones aff873923c Use glob for libdir when installing multipath libraries.
Use "/lib*/" not "/lib/" so it works when they're in /lib/multipath as
well as when they're in /lib64/multipath
2009-11-25 10:54:09 -05:00
Harald Hoyer a34a0df207 90dm: install more device mapper kernel modules 2009-11-23 12:28:58 +01:00
Harald Hoyer 5841610c7f kernel-modules: add firewire-ohci to hardcoded modules list 2009-11-23 12:28:58 +01:00
Harald Hoyer 557ea7a8da fips: search different lib paths 2009-11-23 12:28:57 +01:00
Harald Hoyer 95940758e9 multipath: install multipath kernel module 2009-11-17 14:58:51 +01:00
Harald Hoyer bfd98ad44b multipath: install xdr utils 2009-11-17 14:58:42 +01:00
Harald Hoyer 5f7149068e multipath: install udev rules and helper tools 2009-11-13 10:27:09 +01:00
Dan Horák 200e59149c move dasd initialization script and rules to s390utils
The primary source for dasd initialization script and udev rules is
now in s390utils package. The s390utils-base subpackage, that carries
the required files, is always installed on s390/s390x, because it's
part of the Core group in comps.

Signed-off-by: Dan Horák <dan@danny.cz>
2009-11-12 15:56:58 +01:00
Harald Hoyer 978d78f7b2 add module 90multipath 2009-11-12 15:12:18 +01:00
Harald Hoyer 03d8ec2601 add module fips 2009-11-12 14:59:28 +01:00
Harald Hoyer b941e8fb9f renamed module 95ccw to 95znet 2009-11-12 14:59:28 +01:00
Harald Hoyer 394f30d8d4 crypt: ignore devices in /etc/crypttab (root is not in there) 2009-11-12 14:56:36 +01:00
Harald Hoyer 1e0eb68b69 dasd: only install /etc/dasd.conf in hostonly mode 2009-11-12 14:55:30 +01:00
Harald Hoyer f791957ae3 zfcp: only install /etc/zfcp.conf in hostonly mode 2009-11-12 14:55:04 +01:00
Harald Hoyer f21b3f874f kernel-modules: add scsi_dh scsi_dh_rdac scsi_dh_emc 2009-11-12 13:50:12 +01:00
Dan Horák 8fa510d483 control filesystems included in the generic initramfs
New "filesystems" command line/config file option is added with the ability to
control the list of kernel filesystem modules that are included in the generic
initramfs.

Signed-off-by: Dan Horák <dan@danny.cz>
2009-11-10 11:16:50 +01:00
Harald Hoyer 8686bd554b 95dasd: fixed rd_DASD argument handling 2009-11-06 08:44:01 +01:00
Harald Hoyer 349bac4214 crypt: install /etc/crypttab and honor crypttab entries 2009-11-05 17:06:26 +01:00
Harald Hoyer c3844cbf4a crypt: refix rd_LUKS_UUID handling
https://bugzilla.redhat.com/show_bug.cgi?id=533177
2009-11-05 17:06:26 +01:00
Harald Hoyer d7b97367b2 udev-rules: do not run blkid on temporary device mapper devices 2009-11-05 17:06:26 +01:00
Harald Hoyer b82e22dcaf kernel-modules: install all usb storage modules also 2009-11-05 17:06:26 +01:00
David Cantrell a790547896 Support new rd_DASD parameter for s390 systems.
The new rd_DASD parameter allows dracut to handle multiple rd_DASD
options.  One parameter per DASD.  The syntax is:

    rd_DASD=<device path>[,readonly=X][,erplog=X][,use_diag=X][,failfast=X]

The device path is a CCW device path, such as 0.0.0200.  The optional
parameters are sysfs attributes for the DASD.  The X value can be 0 or
1.  Dracut will write out each of the rd_DASD settings to
/etc/dasd.conf and on bootup, the dasdconf.sh script will parse this
file and bring each DASD online with the specified attribute settings.
2009-11-03 10:43:15 +01:00
David Cantrell fe32b77f87 Rename existing 95dasd handling to 95dasd_mod.
Rename the existing rd_DASD module handler to rd_DASD_MOD.
2009-11-03 10:43:03 +01:00
Harald Hoyer 15c82415c2 90dmraid,90lvm: device mapper upstream rules got renamed 2009-10-27 16:02:56 +01:00
Philippe Seewer 41f8a4f14f Add dm_mod loader
Some kernel configurations might build base dm support as a module.
Add module dm which ensures that dm_mod is there and loaded.
2009-10-27 16:02:56 +01:00
Philippe Seewer dc490a0f08 Add old style ide drivers if available
Some distros, including debian unstable with 2.6.30, still ship
old style ide drivers. These should be installed as well.

Sadly there are no symbols to use for nm, so a simple =ide needs
to suffice.
2009-10-27 16:02:56 +01:00
Warren Togami 24dcacc78f dmsquash-live-root requires grep 2009-10-13 16:23:56 -04:00
Warren Togami 157a8ddf5c Revert to per-device resolv.conf by Seewer's suggestion. 2009-10-13 14:19:49 -04:00
Warren Togami 08d82be71d Better check if writing ifcfg files is necessary. 2009-10-13 13:20:07 -04:00
Harald Hoyer b26260a0b9 dracut-lib: fixed wait_for_if_up() 2009-10-09 13:18:59 +02:00
Harald Hoyer 67307075d1 dmraid: only install libdmraid-events-isw.so
the symlink will trigger install of the real lib file
2009-10-09 13:16:02 +02:00
Harald Hoyer 4d9b6060d4 dmraid: do not fail if /usr/lib/libdmraid-events-isw.so is not present 2009-10-09 10:16:08 +02:00
Harald Hoyer 2331d1ff15 ccw: s/layer1/layer2/g 2009-10-08 18:19:11 +02:00
Harald Hoyer 218292f6b1 add s390 network support 2009-10-08 18:10:02 +02:00
Harald Hoyer 186b9c9aac network/parse-bridge: check for bridge parameter not ip 2009-10-08 18:08:34 +02:00
Harald Hoyer 1ccc0fad27 add zfcp support for s390 2009-10-08 14:21:32 +02:00
Harald Hoyer 3e0f415fc6 dasd: rename dasd= to rd_DASD= 2009-10-08 14:21:32 +02:00
Harald Hoyer 8aa36728f5 plymouth: suppress "find" errors 2009-10-08 14:21:31 +02:00
Harald Hoyer f2a716d47c base/init: make link /dev/fd, mount devpts,tmpfs with correct dev parm 2009-10-08 14:21:31 +02:00
Warren Togami 4431431c23 Fix comment typo 2009-10-07 16:23:52 -04:00
Harald Hoyer ac36d5db7e base/init: kill loginit after one second of waiting 2009-10-07 16:09:20 +02:00
Harald Hoyer cdc74b198e dmsquash-live: run dmsquash-live-root after udev settle 2009-10-07 12:49:52 +02:00
Harald Hoyer 8d0a55cfac do not use init= arg as first argument 2009-10-07 12:48:47 +02:00
Harald Hoyer 16da29bf9d 99base/initqueue: make operations more atomic 2009-10-06 19:09:22 +02:00
Philippe Seewer 7a6e646c83 Move write-ifcfg to its own module
ifcfg config style is redhat specific, this should be in its own
module.
2009-10-06 15:23:52 +02:00
Philippe Seewer a71f1b4917 Add multinic test suite
This is a start a test suite for the multinic support of dracut
2009-10-06 15:17:39 +02:00
Philippe Seewer 5fb4ac2286 Add DAD to dhclient-script
The manpage for dhclient-script says:

Before actually configuring the address, dhclient-script should
somehow ARP for it and exit with a nonzero status if it receives a
reply.

By using arping in dracut this is very easy, since arping has a
specific option to do just that.
2009-10-06 15:17:39 +02:00
Philippe Seewer 98f25e9694 Add simple STP timeout handler
This patch adds STP timeout error handling with arping. It's rather
simple since it only cares about the primary interface and blindly
assumes that if no gateway is available the root server is on the
same subnet.
2009-10-06 15:16:52 +02:00
Philippe Seewer d92ca28b16 Get rid of hostname utility
dracut doesn't really need a utility to set the hostname. It only
saves a few ks of space, but every bit is good.
2009-10-06 15:14:04 +02:00
Seewer Philippe d1dd6bb746 Be a bit more optimistic when setting mtus
The usual approach to setting mtus is to set the interface down,
set the mtu then set the interface back up again. Modern hardware
and/or drivers may support setting this on the fly, so we try
this and fall back to the old behaviour it it doesn't work.

In addition this patch only allows mtus greater than 576, this is
taken from debian/ubuntu dhclient-script.
2009-10-06 15:09:34 +02:00
Harald Hoyer bf87d252f3 network: wait for interfaces to come up, before proceeding 2009-10-06 15:07:52 +02:00
Harald Hoyer 8f397a9be7 base: add missing loginit 2009-10-06 14:43:53 +02:00
Harald Hoyer ec01ab23fb dmsquash: use info() and die() rather than echo 2009-10-01 18:43:35 +02:00
Harald Hoyer 4592b6983a base: add logger for rdinitdebug
initlog logs to /init.log /dev/kmsg and /dev/console
2009-10-01 18:11:24 +02:00
Harald Hoyer a0e44f97bd iscsi/iscsiroot: remove redirection on rdnetdebug
iscsiroot is now executed in the initqueue
2009-10-01 15:21:55 +02:00
Harald Hoyer de439e24d7 base/init: stop udev exec queue before killing it 2009-10-01 15:17:59 +02:00
Harald Hoyer 187d04ccb0 syslog: use initqueue to start syslog 2009-10-01 14:46:16 +02:00
Harald Hoyer f214273fd6 nfs/nfsroot: do not redirect output on rdnetdebug
nfsroot is now in the initqueue
2009-10-01 14:46:16 +02:00
Harald Hoyer 52aeb3f312 base/dracut-lib: add setdebug
do not clutter rdinitdebug output with getarg and getargs debug
2009-10-01 14:46:16 +02:00
Harald Hoyer d84c1df906 nbd/nbdroot: add better check if nbd0 is ready to be mounted 2009-10-01 14:46:15 +02:00
Harald Hoyer a1dd79d4fe network/netroot: remove flock
netroot is now in the initqueue
2009-10-01 14:46:15 +02:00
Harald Hoyer 0519556070 network/netroot: do not redirect output on rdnetdebug
netroot is now in the initqueue
2009-10-01 14:46:15 +02:00
Harald Hoyer d64d04df39 nbd/nbdroot: do not redirect debug output on rdnetdebug
nbdroot is now in the initqueue and rdinitdebug should cover that
2009-10-01 14:46:15 +02:00
Harald Hoyer cf476dbc41 nbd/nbdroot: use udevsettle to wait for /dev/nbd0
nbdroot is now in the initqueue, so we can use udevsettle
2009-10-01 14:46:15 +02:00
Harald Hoyer 8bfed103d8 mdraid: do not cleanup on auto assembly with mdadm.conf 2009-10-01 14:46:14 +02:00
Harald Hoyer e9b6e4e839 nbd: finish on /dev/root rather than on nbd0 2009-10-01 14:46:14 +02:00
Harald Hoyer 1dc53cfd1e nfs: specify nfs version 3 explicitly and retry with nfs version 2 2009-10-01 14:46:13 +02:00
Harald Hoyer f57b5bc735 network: move netroot to initqueue
Schedule netroot for the initqueue inside ifup and dhclient.
2009-10-01 14:45:24 +02:00
Harald Hoyer 0e0031dc61 init: start udevd with --resolve-names=never 2009-09-30 15:04:50 +02:00
Harald Hoyer 2168327bfa init: mount /dev/shm 2009-09-30 15:04:36 +02:00
Harald Hoyer 99fd62e3be dm/lvm: make usage of new udev event rules optionally 2009-09-29 18:29:34 +02:00
Harald Hoyer 0cded44025 95dasd: add dasd_diag_mod module 2009-09-29 18:20:48 +02:00
Harald Hoyer ffe53c91c5 95dasd: use 'uname -m' instead of 'arch' 2009-09-29 17:10:22 +02:00
Harald Hoyer 9a2860a3ee 95dasd: fixed typo in modules.conf generation 2009-09-29 14:51:21 +02:00
Harald Hoyer 896199c652 95dasd: do not install zfcp kernel module 2009-09-29 14:48:06 +02:00
Harald Hoyer 5fcc6b4a0a rename 95s390 to 95dasd 2009-09-29 14:47:29 +02:00
Harald Hoyer 678b3605e8 dmraid: add missing dso 2009-09-23 17:16:31 -07:00
Harald Hoyer b9c4654a63 devicemapper: add dmeventd and new rules for device mapper 2009-09-23 16:52:14 -07:00
Warren Togami 845dd50275 Removing umount appears to be a mistake, it seems to have been OK prior. 2009-09-23 15:16:59 -04:00
Warren Togami 23aa204856 Fix LiveCD boot regression caused by bf55e2c5d3
FIXME: There is still something wrong with this boot where it wants to use umount, but doing so breaks live boot.
2009-09-21 18:14:27 -04:00
Harald Hoyer 8eb16b0827 selinux: bail out if policy could not be loaded and selinux=0 not
specified
2009-09-21 17:44:14 +02:00
Harald Hoyer fc1abcfa1f dmsquash-live: add initqueue-finished 2009-09-19 10:51:34 +02:00
Harald Hoyer c53acc3015 lvm: add rd_NO_LVMCONF 2009-09-18 12:28:36 +02:00
Harald Hoyer 7a34efa5c4 md/dm/lvm: install pre-pivot cleanup hooks only if actually needed
- removed dmraid cleanup
- only call lvm cleanup, if no lvm.conf provided
- copy over lvm.conf by default
- add --nolvmconf --lvmconf parameters
2009-09-18 12:20:21 +02:00
Harald Hoyer 2727e45b43 kernel-modules: force install of scsi_wait_scan in hostonly mode 2009-09-18 12:20:04 +02:00
Hans de Goede d6a5b04043 Recognize nodmraid and noiswmd kernel cmdline options
Recognize nodmraid and noiswmd kernel cmdline options, for anaconda /
rc.sysinit / mkinitrd compatibility.
2009-09-18 08:58:14 +02:00
Hans de Goede 1de9edc06e Do not stop / start udev exec-queue around "mdadm -As --run"
When assembling containers + embedded arrays from mdadm.conf,
mdadm needs the /dev/md# node for the container to assemble the
arrays within the container. Stopping the udev exec queue, results in
this node not getting created and mdadm failing to online the
arrays within the container.

Not having stop / start udev exec-queue around "mdadm -As --run" should
be safe as the exact same command is run from rc.sysinit without
any queue locking.
2009-09-18 08:15:59 +02:00
Harald Hoyer 0f7e10cef4 mdraid: save state dir for mdmon/mdadm for the real root 2009-09-17 12:13:54 +02:00
Harald Hoyer 689f9b8af7 create /var/run in 99base 2009-09-17 12:10:48 +02:00
Harald Hoyer 24bac034d1 65-md-incremental-imsm.rules: check if md raid is already running 2009-09-16 16:10:09 +02:00
Harald Hoyer 094097fab3 lvm/dm/md: switch from lockfiles to $sys/$devpath/holders/*
This is a more sane solution, than ignoring subsequent "change" events.

The only danger is that we could loop, if a lvm scan triggers a broken
md partition, which triggers a broken PV and so on.

Better fix the scanning tools, not to emit change events for devices,
if no action was taken.
2009-09-16 15:34:13 +02:00
Hans de Goede 04a8f224c1 Add ifname= argument for persistent netdev names
ifname=<interface>:<MAC>
Assign network device name <interface> (ie eth0) to the NIC
with MAC <MAC>.
Note that if you use this option you *must* specify an ifname=
argument for all interfaces used in ip= or fcoe= arguments
2009-09-16 15:01:08 +02:00
Harald Hoyer 597839331c dmraid: use and install kpartx for dmraids 2009-09-16 11:21:24 +02:00
Hans de Goede 26b72485cf 90dmraid: use kpartx to scan for partitions 2009-09-16 11:20:57 +02:00
Harald Hoyer 7dbaf59ccf 10rpmversion/install: fix non-rpm install 2009-09-16 11:18:22 +02:00
Harald Hoyer 95cf0a8803 10rpmversion,dracut.spec: generate version file and install it 2009-09-16 10:43:50 +02:00
Harald Hoyer 1dd5bc3fba add udevproperty() to dracut-lib and use it
newer versions of udev use --property instead of --env
2009-09-16 10:43:50 +02:00
Warren Togami bf55e2c5d3 dmsquash-live-root requires umount 2009-09-15 17:17:57 -04:00
Harald Hoyer a52586e8ea network: break udevsettle early 2009-09-15 15:38:53 +02:00
Hans de Goede 68f28d6976 Add ifname= argument for persistent netdev names
ifname=<interface>:<MAC>
Assign network device name <interface> (ie eth0) to the NIC with MAC <MAC>.
Note that if you use this option you *must* specify an ifname= argument
for all interfaces used in ip= or fcoe= arguments
2009-09-15 15:13:21 +02:00
Harald Hoyer 5c3f5746bb 90mdraid/65-md-incremental-imsm.rules: first set initqueue-finished,
then initqueue-settled

also introduce md_finished.sh to check for all md activity to be settled
2009-09-15 15:00:25 +02:00
Harald Hoyer 54a73cbb2b dracut-lib.sh: change -f to -e to allow symlinks 2009-09-15 15:00:24 +02:00
Harald Hoyer ab0f04844b 10rpmversion: try to get the correct dracut rpm version during %post 2009-09-15 15:00:24 +02:00
Harald Hoyer 3329f92136 90crypt/70-luks.rules: set unique name for initqueue job 2009-09-15 15:00:24 +02:00
Harald Hoyer c27ec060da 95rootfs-block/block-genrules.sh: beautify code 2009-09-15 15:00:24 +02:00
Harald Hoyer 82b2189d01 initqueue-finished: fail also on empty queue 2009-09-15 15:00:24 +02:00
Harald Hoyer 4ce52970c0 initqueue: first remove the job, then execute it 2009-09-15 15:00:24 +02:00
Harald Hoyer 99433dd289 90mdraid: only switch mdmon to new root, if an instance is running 2009-09-15 15:00:23 +02:00
Harald Hoyer b94c520660 plymouth: add rd_NO_PLYMOUTH 2009-09-15 15:00:23 +02:00
Harald Hoyer 2f02ae9d45 mdraid: add rd_NO_MDADMCONF --mdadmconf --nomdadmconf
Copy /etc/mdadm.conf to initramfs (even for non-hostonly) if
mdadmconf="yes" is set in dracut.conf or --mdadmconf is specified on the
dracut command line.

This was done, because there seems _no_ sane way to autoassemble md raid
arrays.

also moved rd_NO_MD to an udev ENV
2009-09-15 15:00:18 +02:00
Harald Hoyer 11fcc8c8f9 95resume/install: give resume higher prio than mount 2009-09-15 11:17:28 +02:00
Harald Hoyer e8cf498dcc 95rootfs-block/mount-root.sh: ignore /.resume 2009-09-15 11:17:28 +02:00
Harald Hoyer 2178a00eea 95resume: simplyfy rules and also recognize blkid typo 2009-09-15 11:17:27 +02:00
Harald Hoyer 33ff830c1b 90dmraid: switch rd_NO_DM to udev ENV 2009-09-15 11:17:27 +02:00
Harald Hoyer 5a8d8dfbb6 switch modules to initqueue-finished 2009-09-15 11:17:22 +02:00
Harald Hoyer 8238850caa init: add initqueue-finished
/initqueue-finished/*.sh are scripts, which return != 0, if the main
loop still has pending jobs to do.
2009-09-15 08:47:47 +02:00
Harald Hoyer 1888e57bf9 plymouth: grep for PLYMOUTH_POPULATE_SOURCE_FUNCTIONS 2009-09-14 19:34:30 +02:00
Harald Hoyer 4839a7995e add pcmcia adapter 2009-09-14 19:30:20 +02:00
Harald Hoyer 1aca526cb4 90dmraid: install parse-dm.sh 2009-09-14 16:47:30 +02:00
Harald Hoyer 600131fe85 selinux-loadpolicy: do not check for selinux config files
leave it up to load_policy
2009-09-11 16:30:10 +02:00
Harald Hoyer 8c45b484ce plymouth: removed rd_plytheme 2009-09-11 16:29:40 +02:00
Harald Hoyer 650da7bada removed initrdargs from parse-*.sh 2009-09-10 17:34:15 +02:00
Harald Hoyer 247c9f70bf init: fixed command line handling for /sbin/init and init=<custom init> 2009-09-10 16:48:36 +02:00
Harald Hoyer 233f79df99 selinux-loadpolicy.sh: also check for /etc/selinux/config 2009-09-10 15:49:03 +02:00
Harald Hoyer 6f0e469d79 selinux-loadpolicy: set initial ret=0 2009-09-09 19:50:44 +02:00
Harald Hoyer f9749f368f plymouth: use /usr/libexec/plymouth/plymouth-populate-initrd if possible 2009-09-09 18:05:00 +02:00
Harald Hoyer 0b2de1f895 99base/init: output more info() 2009-09-09 18:04:55 +02:00
Harald Hoyer 94eb3cf222 selinux-loadpolicy: do not mount /proc and /selinux
load_policy already does these things for us
2009-09-09 17:06:21 +02:00
Harald Hoyer cb47caf786 add parameter to specify additional kernel modules to include
--add-drivers for dracut
add_drivers for dracut.conf
2009-09-09 17:02:37 +02:00
Harald Hoyer d9f0633878 selinux-loadpolicy: do not mount /proc and /selinux
load_policy mounts it for us
2009-09-09 14:41:40 +02:00
Harald Hoyer 71094bee63 base/init: add scsi_wait_scan to wait for host adapter scans 2009-09-09 11:09:04 +02:00
Harald Hoyer f5c4374d2c selinux-loadpolicy.sh: mount /proc and /selinux before loading the
policies

also check for /sbin/load_policy
2009-09-08 16:26:37 +02:00
Harald Hoyer aa297ca6b6 65-md-incremental-imsm.rules: refine rules 2009-09-08 15:33:19 +02:00
Harald Hoyer 4712e4ece6 initqueue: add --name parameter to give a name for --unique 2009-09-08 15:31:48 +02:00
Harald Hoyer f25c9697f8 mdraid: stop udev queue until mdraid assembled 2009-09-08 15:30:17 +02:00
Harald Hoyer 7e282f5df1 dmraid: only install 64-md-raid.rules if no vol_id present 2009-09-08 15:29:30 +02:00
Harald Hoyer 3bb5b261c7 65-md-incremental-imsm: add additional check for md-non-containers 2009-09-08 13:42:31 +02:00
Harald Hoyer 273b197d75 added initqueue-settled and refactored code 2009-09-07 19:12:01 +02:00
Harald Hoyer 906dedf4d5 mdraid-cleanup: do not stop mdraid container 2009-09-07 19:12:00 +02:00
Harald Hoyer 4f4a79b1a1 add scp to debug module 2009-09-07 17:10:19 +02:00
Harald Hoyer 587b3497c1 mdraid_start.sh: fixed raid activation 2009-09-07 16:18:12 +02:00
Harald Hoyer 96f3cf1d27 95udev-rules: fixed c&p bug which did not install 61-persistent-storage.rules 2009-09-07 11:40:20 +02:00
Harald Hoyer e4dec3d6b6 {crypt,dmraid,lvm,mdraid}: cleanup with pre-pivot 30 and 31 2009-09-03 17:11:57 +02:00
Harald Hoyer 429aa1a2c2 mdraid: add grep for convenience 2009-09-03 17:11:03 +02:00
Harald Hoyer 52168b7b9d reordered blkid/vol_id rules 2009-09-02 15:55:34 +02:00
Peter Rajnoha d6462323d6 LVM/DM rules in dracut
I've looked at the LVM rules used in dracut just recently
and it needs fixing - we should react to change events only
for DM devices, so we have to skip vol_id/blkid call on ADD:

KERNEL=="dm-[0-9]*", ACTION=="add", GOTO="lvm_end"

Also, MD devices have their own rules, where vol_id/blkid
is called and where the symlinks are created (when looking
into raw initrd, this is in  64-md-raid.rules).

Also, if those rules are meant to be for DM devices only,
maybe we should skip symlink creation for the other devices
there, to keep the rules clean and straightforward. I think
we shouldn't create/recreate symlinks for non-dm devices in
LVM/DM rules (..should be in appropriate rules for that type
of device):

KERNEL!="dm-[0-9]*", GOTO="lvm_end"
2009-09-02 15:55:34 +02:00
Victor Lowther 1d368457e3 Merge commit 'origin/master' 2009-09-02 07:40:28 -05:00
Victor Lowther 7c3fe07ac0 Made hostonly checking for fcoe fail for now.
Having it unconditionally pass pulls in all the networking cruft even
for systems that do not need it, and that sorta defeats the purpose of
hostonly mode.
2009-09-02 07:37:33 -05:00
Harald Hoyer 194f7d125f 90*/*cleanup.sh: fixed redirection to /dev/null 2009-09-01 15:59:31 +02:00
Harald Hoyer 8ef0be5671 dracut-lib: try to set UDEVVERSION, if not set 2009-09-01 15:51:51 +02:00
Harald Hoyer b809e77f54 plymouth: in the generic case, only install text and details themes 2009-09-01 15:51:51 +02:00
Harald Hoyer 780afa9876 release any raid/crypt/lvm device assembled, but not in use 2009-09-01 15:51:51 +02:00
Harald Hoyer 5ebc1acb7f selinux-loadpolicy.sh: redirect output of selinux load_policy 2009-09-01 15:51:50 +02:00
Harald Hoyer ec74fa8789 split dracut in network / non-network 2009-09-01 15:42:28 +02:00
Harald Hoyer c1d670a893 65-md-incremental-imsm.rules: also check on "change" 2009-09-01 15:42:27 +02:00
Harald Hoyer b6bf29b054 lvm.rules: blkid for cciss devices 2009-09-01 15:42:27 +02:00
Harald Hoyer 5c6a593f2e add udevsettle function and settle after raid/lvm/crypto activities 2009-09-01 15:42:27 +02:00
Harald Hoyer f4c36b28f6 mdraid_start: check if raid is already active before trying to run it 2009-09-01 15:42:27 +02:00
Warren Togami a89fb6daa5 Write netboot config for passing to OS as requested in https://bugzilla.redhat.com/show_bug.cgi?id=515771#c18 2009-08-31 19:34:27 -04:00
Hans de Goede 3508cc816e Add fcoe booting support
Supported cmdline formats:
fcoe=<networkdevice>:<dcb|nodcb>
fcoe=<macaddress>:<dcb|nodcb>

Note currently only nodcb is supported, the dcb option is reserved for
future use.

Note letters in the macaddress must be lowercase!

Examples:
fcoe=eth0:nodcb
fcoe=4A:3F:4C:04:F8:D7:nodcb
2009-08-28 12:53:56 +02:00
Harald Hoyer 84c2266f1a network/installkernel: it's eth_type_trans and not eth_type_transfer 2009-08-27 13:06:46 +02:00
Victor Lowther 054e038512 Add accurate --hostonly checking for 95iscsi 2009-08-21 22:22:40 -05:00
Victor Lowther 240cc7c480 Abstract out hostonly vs. generic module installation differences.
This introduces filter_kernel_modules, which should be used to install
all kernel modules that match whatever criteria you want.

If running in --hostonly, filter_kernel_modules will only consider
modules that are loaded in the kernel, otherwise it will consider
all the modules installed on the system for the appropriate kernel.

This drastically reduces initramfs generation time when using --hostonly
by eliminating lots of unneeded filesystem activity.
2009-08-20 15:52:45 -05:00
Victor Lowther 16df64ef1f Abstract out vol_id vs. blkid usage.
vol_id seems to be going away, and blkid can be used as a drop-in replacement
for it.
2009-08-20 07:28:04 -05:00
Victor Lowther f76ef3aa3d Speed up loading block drivers when running with --hostonly
Instead of grovelling through all the modules available for the
kernel looking for block devices, only look at the modules that are
actually loaded. This speeds things up by a rather large amount
when generating the initramfs with --hostonly.

While we are at it, only load the filesystem module that will actually
be used for the root filesystem when running in --hostonly instead
of all the filesystem modules that happen to be loaded at the time.
2009-08-19 22:21:29 -05:00
Victor Lowther 59c88f499f Abstract out vol_id vs. blkid usage
Since different distros may or may not use vol_id in udev, and blkid
is generally replacing vol_id, abstract them out into a function which
tries to use vol_id first and blkid second, on the assumption that
blkid can take over for vol_id if vol_id is no longer there.
2009-08-19 22:21:07 -05:00
Harald Hoyer afe25d0ccc {crypt,dmraid,,lvm,mdraid}/check use blkid if no vol_id found 2009-08-19 17:11:29 +02:00
Harald Hoyer 495a964322 nbd/check: moved host-only checks and added ";" 2009-08-19 17:09:53 +02:00
Harald Hoyer 68b26290f0 udev-rules: install vol_id 2009-08-19 11:12:42 +02:00
Harald Hoyer d41f7ae750 rsyslogd-start.sh: read correct filters file 2009-08-19 10:59:37 +02:00
Marc Grimme e15bc1f330 Syslog support for dracut
This module provides syslog functionality in the initrd.
This is especially interesting when complex configuration being
used to provide access to the device the rootfs resides on.

When this module is installed into the ramfs it is triggered by
the udev event from the nic being setup (online).

Then if syslog is configured it is started and will forward all
kernel messages to the given syslog server.

The syslog implementation is detected automatically by finding the
apropriate binary with the following order:
rsyslogd
syslogd
syslog-ng
Then if detected the syslog.conf is generated and syslog is started.

Bootparameters:
syslogserver=ip    Where to syslog to
sysloglevel=level  What level has to be logged
syslogtype=rsyslog|syslog|syslogng
                   Don't auto detect syslog but set it
2009-08-19 10:40:02 +02:00
Jeremy Katz a607b7d4b8 Fix syntax error in conditional
Fix a typo in the conditionals.  Not sure how I didn't notice these
before
2009-08-19 10:34:06 +02:00
Victor Lowther 1a4c4015bc Modify nbd hostonly checking to use check_block_and_slaves.
This allows hostonly nbd checking to work in more exotic situations,
such as mdraid/dmraid/lvm/crypt on top of nbd.
2009-08-16 18:22:21 -05:00
Victor Lowther d7df77d172 Modified lvm hostonly checking to use dracut-functions 2009-08-16 15:29:59 -05:00
Victor Lowther 7e2b4f8367 Make mdraid checking use common functionality in dracut-functions 2009-08-16 15:29:59 -05:00
Victor Lowther bc9ae19deb Make dmraid checking use common functionality in dracut-functions 2009-08-16 15:29:50 -05:00
Victor Lowther 17829e94aa Move common rootfs finding and backing store tree checking to dracut-functions 2009-08-16 15:29:50 -05:00
Victor Lowther 4e207ec862 The network check script sources , so it must use /bin/bash 2009-08-16 15:29:49 -05:00
Victor Lowther b5ccf21d2b Make the lvm check script really check to see if root is on an lvm device
somehow when run in hostonly mode.
2009-08-16 15:29:42 -05:00
Victor Lowther 62bde8ed7e make mdraid check script really check to see of the rootfs is on an
mdraid block device when run in hostonly mode.
2009-08-16 15:29:27 -05:00
Victor Lowther dc670134f8 Make hostonly check for dmraid only pass if root is really on
a dmraid volume somehow.
2009-08-16 15:29:18 -05:00
Victor Lowther 39d6cb5df4 Make hostonly checking in 90crypt only pass if root is really on an
encrypted block device somewhere along the chain.
2009-08-16 15:28:56 -05:00
Victor Lowther ddfd1d10a0 Split kernel module loading into smaller chunks.
This prepares to more tightly integrate dracut-gencmdline with the
rest of the dracut scripts
2009-08-16 15:28:45 -05:00
Harald Hoyer 7addf9d430 rpmversion: dash does not want as I do 2009-08-14 17:47:07 +02:00
Harald Hoyer 6d0480426d rpmversion: fixed rpm query 2009-08-14 17:37:00 +02:00
Harald Hoyer 1c6e9e5c0a new module 10rpmversion
outputs rpm version of dracut
2009-08-14 17:27:50 +02:00
Harald Hoyer 0b610a002c removed 90dmsetup 2009-08-14 17:27:49 +02:00
Harald Hoyer 0f1361ee1c udev-rules: hardcode helper binaries 2009-08-14 17:27:49 +02:00
Harald Hoyer b806825d2a nfs: only install libnfsidmap_nsswitch.so of all libnfsidmap_*.so 2009-08-14 17:27:49 +02:00
Harald Hoyer f905c1d7d6 dmsquash-live: install the "real" eject
eject might be a symlink to consolehelper
2009-08-14 17:27:49 +02:00
Harald Hoyer 88838bf238 network: exclude kernel modules, which need iw_handler_get_spy 2009-08-14 16:21:03 +02:00
Harald Hoyer ed2de829e1 cryptroot-ask.sh: fix rd_LUKS_UUID handling 2009-08-14 16:21:03 +02:00
Harald Hoyer ff34c9dcd4 10redhat-i18n: remove unnecessary files 2009-08-14 16:21:03 +02:00
Harald Hoyer 3d4641fd98 add rdinfo command line parameter
print informational output though "quiet" is set
2009-08-14 16:21:03 +02:00
Harald Hoyer ed6220fd25 plymouth: make the daemon attach to the session/terminal
https://bugzilla.redhat.com/show_bug.cgi?id=516104

it can be so simple :-)
2009-08-07 12:08:31 +02:00
Warren Togami 148284ced6 Remove ugly hack 2009-08-06 11:07:43 -04:00
Harald Hoyer 3714170f33 plymouth-populate-initrd: do not install label.so
https://bugzilla.redhat.com/show_bug.cgi?id=515589

It ends up installing the label.so control plugin which isn't supposed
to get installed into the initrd.  this makes cairo and libX11 and all sorts of
things move into the initrd that aren't supposed to.
2009-08-06 14:43:13 +02:00
Thilo Bangert a15ad925e9 support for unusual terminfo location
the following patch makes the 95terminfo module work on gentoo.
2009-08-06 14:43:12 +02:00
Warren Togami 13d5225fc8 Temporary hack to provide ifcfg files to OS in a way that might work with existing initscripts.
I am not happy about this.  It shouldn't be the job of dracut to do this.  The initscripts should
deal with the plain /dev/.initramfs/ifcfg/ directory accordingly.  Doing this for now because
notting insists upon it.  We need to clean this up after we network option passing working.
2009-08-04 17:15:39 -04:00
Jeremy Katz cc0e7a369b Parse options earlier for live root 2009-08-04 16:25:43 +02:00
Jeremy Katz 7f819d7041 Support resetting the live overlay
If you're using a persistent overlay, you might want to reset it
at boot time if it has become corrupted somehow.  Support using
reset_overlay as a command line optino to do so
2009-08-04 16:25:43 +02:00
Jeremy Katz dfba82b3d3 And support passing in the persistent overlay
The persistent overlay can be specified with an overlay= argument
on the command line.  We'll probably try to move this into the
root= syntax soon, but this is the old way that works
2009-08-04 16:25:43 +02:00
Jeremy Katz 3ae2f09a04 Support passing live_ram
live_ram allows you to load the entirety of the live image into
RAM and run it from there rather than off of the block device
2009-08-04 16:25:43 +02:00
Jeremy Katz a2a2a956dd Support passing the live_dir with live_dir=
The live image is assumed to be under LiveOS/ unless live_dir
is passed specifying otherwise
2009-08-04 16:25:43 +02:00
Jeremy Katz fa9d7304bf Support old syntax
livecd-creator previously added 'liveimg' and used root=CDLABEL=;
it's easy enough to support that old syntax for now at least
and it will make it easier to get people testing
2009-08-04 16:25:43 +02:00
Jeremy Katz c56b63d1bd Support checking the iso
Support checking the iso image with checkisomd5 if available
2009-08-04 16:25:43 +02:00
Jeremy Katz 2e44f115b9 Add basic support for dmsquashed live images
Fedora/Red Hat live images are implemented as an ext3fs inside of
a squashfs.  Writability is achieved with a device-mapper snapshot
on top of that.

This gives the basic support without a lot of things like persistent
overlays, iso md5sum checking, etc and also with a new basic syntax
that has to be specified as root=live:LABEL=...
2009-08-04 16:25:42 +02:00
Harald Hoyer 345f573546 90mdraid/parse-md.sh: removed bashism 2009-08-04 11:36:06 +02:00
Harald Hoyer 9babe97e6f iscsiroot: check real root if it is block:... 2009-07-31 14:43:14 +02:00
Hans de Goede 766968bb6f Implement extended iscsi: rfc4173 syntax which allows specifying credentials
As discussed before, it would be nice to be able to specify
the iscsi chap credentials inside the netroot=iscsi:.....
syntax, this patch implements this in a backwards compatible way, like
this:
iscsi:username:pass@127.0.0.1::3260::iqn.2009-01.com.example:testdisk
iscsi:username:pass:reverse:pass@127.0.0.1::3260::iqn.2009-01.com.example:test

The only downside is that the backwards compatibility is broken when there
is an @ in the iscsi target name (very unlikely), that can still be used,
but only like this:
iscsi:@192.168.1.100::3260::iqn.2009-01.com.example:testdi@sk
2009-07-31 12:44:18 +02:00
Harald Hoyer 123e04b23e 40network/installkernel: do not install isdn and uwb modules 2009-07-31 12:40:53 +02:00
Harald Hoyer 9d2eb35d7a 90kernel-modules/installkernel: do not install fs/ocfs2 filesystems 2009-07-31 12:40:53 +02:00
Harald Hoyer 67a38adacf nfs: only install libnss_*.so which are used by nsswitch.conf 2009-07-31 12:40:53 +02:00
Harald Hoyer 5ea16f2790 kernel-modules: add modules for virtio devices 2009-07-31 12:40:53 +02:00
Harald Hoyer 2f24b79ddd iscsi: manually load the iscsi_ibft kernel module 2009-07-31 10:58:03 +02:00
Harald Hoyer d9f8feb04a iscsi: install iscsi_ibft kernel module 2009-07-30 16:57:30 +02:00
Harald Hoyer bb57587b42 iscsiroot: fixed udev rules for iscsi_firmware 2009-07-30 16:14:09 +02:00
Harald Hoyer a3f4e7709b add udev rules for iscsi_firmware 2009-07-30 16:12:52 +02:00
Warren Togami 984a819b92 There is only one resolv.conf. 2009-07-30 09:27:09 -04:00
Warren Togami edae4b5efb Mark the other ifcfg file when bridges are used. 2009-07-29 16:54:53 -04:00
Warren Togami 2098ebf712 Need some way of differentiating these interfaces as being netboot. 2009-07-29 14:07:08 -04:00
Harald Hoyer f72c10f657 getarg()/getargs(): check existance of /etc/cmdline before reading it 2009-07-28 18:29:40 +02:00
Warren Togami 645bde35d3 Use standard ifcfg filenames, put them into an ifcfg directory. 2009-07-27 15:54:21 -04:00
Harald Hoyer c1a37d928f dracut-lib: getarg(), getargs() read command line also from /etc/cmdline
Also honor parameters in /etc/cmdline.

getarg(): If the argument is first fround in /proc/cmdline, then it is
used
2009-07-25 11:09:35 +02:00
Harald Hoyer 0375106c78 add source_conf for static configuration variables
source_conf sources all *.conf files of a directory

init will now source all /etc/conf.d/*.conf files
2009-07-25 11:09:34 +02:00
Warren Togami 47b5c0f290 With NFS root, it is possible /tmp/net.ifaces might not exist during pre-pivot.
- udevadm settle will wait for it if necessary.
- Move write-ifcfg.sh later during pre-pivot to reduce likelihood of settling being necessary.
2009-07-24 15:26:33 -04:00
Harald Hoyer 3e6d2b31ea removed all direct references to /proc/cmdline
use getarg() and getargs() from /lib/dracut-lib.sh instead of
reinventing the wheel
2009-07-24 11:54:08 +02:00
Harald Hoyer b03edf372f 40network/parse-bridge: add bridge to $initrdargs 2009-07-24 11:54:08 +02:00
David Dillow e663608c40 dash compatible substitution 2009-07-23 23:16:31 -04:00
Warren Togami ef380e9de8 Turns out this is really a misconfigured DHCP server, apply the same workaround as Debian and upstream dhclient-script. 2009-07-23 16:22:00 -04:00
Warren Togami 39f3a51d65 Fix multiple search domains with proper quoting (thanks dcbw)
Otherwise \032 appears instead of spaces.
2009-07-23 14:31:58 -04:00
Harald Hoyer 4809126378 99base/init: fix argument stripping 2009-07-23 18:57:20 +02:00
Harald Hoyer 6c4b24afb0 nfsroot-cleanup: don't try to read from nonexistant /tmp/nfs.rpc_pipefs_path 2009-07-23 18:27:33 +02:00
Harald Hoyer c1b2cc48d6 40network/check: source dracut-functions over exported variable 2009-07-23 18:20:11 +02:00
Marc Grimme 2fe2945869 nfsroot-cleanup: make /var/lib/nfs/rpc_pipefs path configurable
/tmp/nfs.rpc_pipefs_path can contain the path where
/var/lib/nfs/rpc_pipefs will be moved before switch_root.

This is useful if /var is a separate partition in the real root.
2009-07-23 12:19:54 +02:00
Marc Grimme f016dccc89 95debug: optionally install the debug tools 2009-07-23 12:19:17 +02:00
Marc Grimme c993cfb32f 40network/check: output which binary is missing for the network module 2009-07-23 12:17:57 +02:00
Harald Hoyer 0e77eb3782 dmraid/mdraid: only try to delete partition 1-1024
add "--nr 1-1024" to partx, otherwise partx will try to delete
partitions 1-INT_MAX, which takes a long time.
2009-07-23 11:58:24 +02:00
Harald Hoyer 93ce0a7a1c 95s390: add support to boot from s390 dasds
command line parameter:

DASD
       dasd=....
              same syntax as the kernel module parameter (s390 only)
2009-07-22 16:35:49 +02:00
Harald Hoyer 33ee031c4a dracut: add --kernel-only and --no-kernel arguments
--kernel-only
              only install kernel drivers and firmware files

       --no-kernel
              do not install kernel drivers and firmware files

All kernel module related install commands moved from "install"
to "installkernel".

For "--kernel-only" all installkernel scripts of the specified
modules are used, regardless of any checks, so that all modules
which might be needed by any dracut generic image are in.

The basic idea is to create two images. One image with the kernel
modules and one without. So if the kernel changes, you only have
to replace one image.

Grub and the kernel can handle multiple images, so grub entry can
look like this:

title Fedora (2.6.29.5-191.fc11.i586)
        root (hd0,0)
        kernel /vmlinuz-2.6.29.5-191.fc11.i586 ro rhgb quiet
        initrd /initrd-20090722.img
        initrd /initrd-kernel-2.6.29.5-191.fc11.i586.img
        initrd /initrd-config.img

initrd-20090722.img
  the image provided by the initrd rpm
  one old backup version is kept like with the kernel

initrd-kernel-2.6.29.5-191.fc11.i586.img
  the image provided by the kernel rpm

initrd-config.img
  optional image with local configuration files
2009-07-22 15:07:11 +02:00
Harald Hoyer 441d31b927 use kernel module directory specified on command line in modules also 2009-07-21 17:37:41 +02:00
Harald Hoyer 308b10311c mdraid: first remove the partitions, then add to the md raid 2009-07-21 15:40:11 +02:00
Harald Hoyer 7045d15460 dmraid/mdraid: use ENV{DEVTYPE} instead of ATTR{partition} 2009-07-21 15:01:41 +02:00
Harald Hoyer 6c034582d2 redhat-i18n: export LANG 2009-07-21 11:53:56 +02:00
Harald Hoyer 57b965ef4b dmraid/mdraid: install "partx" 2009-07-21 11:31:15 +02:00
Harald Hoyer f4785648fb plymouth: also trigger dri subsystem 2009-07-21 11:30:40 +02:00
Harald Hoyer 47e1402108 nfs: do not install whole passwd, grep for rpc user 2009-07-17 16:00:20 +02:00
Harald Hoyer 1336db4f1c lvm: output info on rd_NO_LVM 2009-07-17 16:00:20 +02:00
Harald Hoyer 6c1d16ad29 lvm: install lvm.conf in hostonly mode 2009-07-17 16:00:19 +02:00
Harald Hoyer 0de01de409 mdraid: do not handle isw_raid_member if rd_NO_MDIMSM is set in udev ENV
install md-noimsm.sh if mdadm does not support imsm.
2009-07-17 16:00:19 +02:00
Harald Hoyer 499befa692 mdraid: only install mdadm.conf in hostonly mode 2009-07-17 16:00:19 +02:00
Harald Hoyer 435185d7ab mdraid: do not install passwd/group 2009-07-17 16:00:19 +02:00
Harald Hoyer e0fd2e2f74 dmraid: handle isw_raid_member if rd_NO_MDIMSM is set in udev ENV 2009-07-17 16:00:19 +02:00
Harald Hoyer 024cd021d4 dmraid: redirect error to vinfo 2009-07-17 16:00:19 +02:00
Harald Hoyer 87194701de output info on rd_NO_DM 2009-07-17 16:00:19 +02:00
Harald Hoyer 4578763326 crypt: output info, on rd_NO_LUKS handling 2009-07-17 16:00:19 +02:00
Harald Hoyer 7c00784e5c plymouth: install all themes and make them selectable by command line
Bootsplash - plymouth
       rd_plytheme=<theme name>
              specify the plymouth bootsplash theme (fallback is text)
2009-07-17 16:00:09 +02:00
Harald Hoyer 53e1c5b996 init: add "pre-trigger" and "initqueue" breakpoints 2009-07-17 14:47:49 +02:00
Harald Hoyer 835d568916 plymouth: removed console_init call
/lib/udev/console_init should be called from the udev rules already
2009-07-17 10:17:28 +02:00
Harald Hoyer 4f945a3932 dmraid.sh: activate all dmraids, if no rd_DM_UUID is specified 2009-07-17 10:16:46 +02:00
Harald Hoyer 20cfd14f41 dmraid.rules: cleanup 2009-07-17 10:16:16 +02:00
Harald Hoyer 376cfd1c27 lvm_scan: do not overwrite a preexisting /etc/lvm/lvm.conf 2009-07-17 10:13:33 +02:00
Harald Hoyer c0dc4c5d1e dracut-lib: fixed quiet argument parsing 2009-07-17 10:13:01 +02:00
Harald Hoyer 532d7d9be4 dracut-lib: output warn() and die() to stderr 2009-07-17 10:12:52 +02:00
Warren Togami beb097d9f1 Bridged network boot
* SYNTAX
bridge=<bridgename>:<ethname>
If bridge without parameters, assume bridge=br0:eth0
* When <ethname> would be configured by network scripts, instead create a bridge named <bridgename> then add <ethname> to that bridge.
* Then $netif becomes <bridgename> instead of <ethname> and all existing scripts process netroot mount via this new $netif instead of <ethname>.
* Include a few test cases in NFS and NBD
2009-07-16 16:58:19 -04:00
Warren Togami 44f1ab8285 Remove 63-luks.rules, it is no longer used 2009-07-16 09:34:07 -04:00
Warren Togami 81f83dab0a More informative failure messages or rdbreak. 2009-07-15 21:10:16 -04:00
Warren Togami c3cd4c76d7 Standardize boot failed language. 2009-07-15 16:42:34 -04:00
Harald Hoyer 1702e6c660 dracut-lib: if "quiet" is specified, do not print info() to console 2009-07-15 18:40:56 +02:00
Harald Hoyer e6df817525 install all /lib/kbd to initramfs, if not host only
KEYBOARDTYPE=sun|pc
   will be written to /etc/sysconfig/keyboard in the initramfs

KEYTABLE=<keytable file>
   will be written to /etc/sysconfig/keyboard in the initramfs

SYSFONT= Console font
   will be written to /etc/sysconfig/i18n in the initramfs

SYSFONTACM= Console map.
   will be written to /etc/sysconfig/i18n in the initramfs

UNIMAP= Unicode font map.
   will be written to /etc/sysconfig/i18n in the initramfs

LANG=<locale>
   will be written to /etc/sysconfig/i18n in the initramfs
   LANG= set locale for all categories, can be any two letter ISO
   language code
2009-07-15 18:37:44 +02:00
Harald Hoyer f874872fc2 add command line parameters to specify exact actions for root assembly
LVM
       rd_NO_LVM
              disable LVM detection

       rd_LVM_VG=<volume group name>
              only activate the volume groups with the given name

crypto LUKS
       rd_NO_LUKS
              disable crypto LUKS detection

       rd_LUKS_UUID=<luks uuid>
              only activate the LUKS partitions with the given UUID

MD
       rd_NO_MD
              disable MD RAID detection

       rd_MD_UUID=<md uuid>
              only activate the raid sets with the given UUID

DMRAID
       rd_NO_DM
              disable DM RAID detection

       rd_DM_UUID=<dmraid uuid>
              only activate the raid sets with the given UUID
2009-07-15 18:27:21 +02:00
Hans de Goede 2240d47fe5 Fix lvm on top of dmraid
The lvm rules were failing to identify PV's on mdraid because
blkid/vol_id has not been run on md raidsets by previous rules.
2009-07-15 18:27:21 +02:00
Harald Hoyer 449adc611f add info() and vinfo() to dracut-lib
- corrected the loglevel for warn()
- prepended with "dracut: " for kmesg to seperate from kernel messages

you can pipe to vinfo() for informational messages
2009-07-15 18:27:21 +02:00
Harald Hoyer 584e55654c remove partitions from raid devices before they are used for something
else
2009-07-15 18:27:20 +02:00
Harald Hoyer 1adaf3372c limit the devices for which lvm vgscan will scan
Build the filter list and create /etc/lvm/lvm.conf for all LVM_member
devices found by udev.
2009-07-15 18:27:20 +02:00
Harald Hoyer 52c3715fd4 change the way init arguments are stripped from the command line
$initrdargs now holds all command line options we want to strip from the
command line. Command line parsers can extend this space separated list.
2009-07-15 18:27:20 +02:00
Harald Hoyer dd1f72b3dd dmraid.rules changed comment in header 2009-07-15 18:27:20 +02:00
Hans de Goede 3564cb7c2c Make Intel BIOS raid use mdraid instead of dmraid when mdadm 3.0 is available
Intel BIOS raid is being shifted from dmraid to mdraid because mdraid offers
more features. So if an imsm metadata capable mdadm is present use mdraid
instead of dmraid for isw_raid_member's

This patch also adds code to mdraid_start.sh so that the raidsets
inside the imsm containers get started once udev is done probing
(doing this earlier leads to potentially degraded use of the sets and
 an unwanted resync).
2009-07-15 18:27:20 +02:00
Hans de Goede 3d2a316013 10redhat-i18n: Fix handling of kbd maps which are a symlink
Some keyboard maps are symlinks to others, we were not handling this
properly, this patch fixes this.
2009-07-15 18:27:20 +02:00
Harald Hoyer da1c03c8a0 dracut-lib add getargs()
getargs returns a space seperated list with all values found for a key
on the kernel command line
2009-07-15 18:27:20 +02:00
Harald Hoyer 3e26772cde run /bin/sh with the full path from the udev rules 2009-07-14 13:20:34 +02:00
Harald Hoyer b2543662a1 add the final mdraid_start to the "blkid" rules also 2009-07-14 13:17:07 +02:00
Harald Hoyer 3076b67917 run a final "mdadm -IRs" after udev has settled 2009-07-13 18:19:32 +02:00
Harald Hoyer 21e033f8ef prevent LVM scan loops
lvm vgscan causes "change" events for all devices, to prevent a loop,
remember the devices, which trigger the scan of the devices.
2009-07-13 18:19:09 +02:00
Harald Hoyer c81a97d1a7 install "ln" per default 2009-07-13 16:24:41 +02:00
Harald Hoyer 9a139a430a let softlink to dmraid initqueue scan end with ".sh" 2009-07-13 16:24:41 +02:00
Harald Hoyer e3b4125e83 delay lvm scan, until udev has settled 2009-07-13 16:24:41 +02:00
Harald Hoyer aceddbe8a4 do not pass rdshell option to real init 2009-07-13 16:24:41 +02:00
Harald Hoyer 4286a25041 do not force to run the mdraid array for the incremental add 2009-07-13 16:24:41 +02:00
Harald Hoyer 00c5ab3e33 only install mount script, if nbd-client succeeded 2009-07-13 16:24:35 +02:00
Harald Hoyer c094baa0fb install mount script if iscsistart succeeded and add iscsi udev rule 2009-07-13 15:03:11 +02:00
Harald Hoyer 1c709728ec removed warning "No ip= argument(s) for netroot provided..." 2009-07-13 15:03:11 +02:00
Harald Hoyer 2a652c0b95 add environment variables for different udev versions 2009-07-13 15:03:11 +02:00
Harald Hoyer 89056045f5 check for root after udevadm settle returns 2009-07-13 15:03:11 +02:00
Harald Hoyer 04f816de49 fixed LVM udev rules to run not only for dm-* devices 2009-07-13 15:03:10 +02:00
Harald Hoyer 14940c2a5c fixed typo in mdadm udev rule 2009-07-13 15:03:10 +02:00
Harald Hoyer 4d06c74ea6 only install one dmraid scan job once in the initqueue 2009-07-13 12:10:47 +02:00
Harald Hoyer d72eec354a test for empty udev queue with timeout=1 instead of 0
older udev versions do not support timeout=0
2009-07-13 12:10:47 +02:00
Harald Hoyer e60123c2ed removed bash check from md incremental rules 2009-07-13 12:10:46 +02:00
Warren Togami 19c258b689 NFSv4 rpcbind should need only the rpcbind user, not the entire /etc/passwd.
TODO: /etc/passwd and /etc/group are not removed yet due to 90mdraid.
      dledford said he'll go in and clean this up since he has the hardware
      to actually test the mdmon stuff.
2009-07-09 14:33:33 -04:00
Warren Togami dacba77805 rdbreak should imply rdshell. If sleeping forever say so, so the user doesn't wonder. 2009-07-08 13:51:43 -04:00
Harald Hoyer a75c29be45 remove redirection of output to /dev/kmesg
until we have a way to mark our messages to come from dracut.
2009-07-04 09:57:10 +02:00
Harald Hoyer a3a3448d8c rdshell 2009-07-03 18:28:09 +02:00
Harald Hoyer 58dbb43eac initqueue now loops until /dev/root exists or root is mounted
init now has the following points to inject scripts:

/cmdline/*.sh
   scripts for command line parsing

/pre-udev/*.sh
   scripts to run before udev is started

/pre-trigger/*.sh
   scripts to run before the main udev trigger is pulled

/initqueue/*.sh
   runs in parallel to the udev trigger
   Udev events can add scripts here with /sbin/initqueue.
   If /sbin/initqueue is called with the "--onetime" option, the script
   will be removed after it was run.
   If /initqueue/work is created and udev >= 143 then this loop can
   process the jobs in parallel to the udevtrigger.
   If the udev queue is empty and no root device is found or no root
   filesystem was mounted, the user will be dropped to a shell after
   a timeout.
   Scripts can remove themselves from the initqueue by "rm $job".

/pre-mount/*.sh
   scripts to run before the root filesystem is mounted
   NFS is an exception, because it has no device node to be created
   and mounts in the udev events

/mount/*.sh
   scripts to mount the root filesystem
   NFS is an exception, because it has no device node to be created
   and mounts in the udev events
   If the udev queue is empty and no root device is found or no root
   filesystem was mounted, the user will be dropped to a shell after
   a timeout.

/pre-pivot/*.sh
   scripts to run before the real init is executed and the initramfs
   disappears
   All processes started before should be killed here.

The behaviour of the dmraid module demonstrates how to use the new
mechanism. If it detects a device which is part of a raidmember from a
udev rule, it installs a job to scan for dmraid devices, if the udev
queue is empty. After a scan, it removes itsself from the queue.
2009-07-03 18:11:38 +02:00
Harald Hoyer 5b2db7d177 put back the nfs mount in the udev event
it solves the following case:

root=/dev/nfs nfsroot=server:/path

- the server could be reachable on any interface
- any interface can get an IP by dhcp
- only one IP is allowed to mount the root
2009-07-03 14:56:20 +02:00
Harald Hoyer aa254c5596 fail iscsiroot, if iscsistart fails 2009-07-03 14:47:49 +02:00
Harald Hoyer da04062e72 add rm to be installed for initqueue 2009-07-03 13:27:26 +02:00
Harald Hoyer 5cc26464e0 remove 50plymouth-pre0.7 module 2009-07-03 12:44:45 +02:00
Harald Hoyer 9719024132 Defer mount to the real mount loop
Udev rules set a /dev/root symlink to the real root and add
a mount script to /mount/. This enables the proper use of pre-mount
scripts and prevents mount being killed by a udev timeout.
2009-07-03 12:38:43 +02:00
Harald Hoyer 83701d66f6 output everything to /dev/kmesg and add dmesg for the emergency_shell 2009-07-03 12:34:51 +02:00
Daniel Drake 1b9cae5cb2 Remove modules dependency
This makes it possible to build a dracut initramfs without modules,
where all needed kernel drivers are built into the kernel image.
2009-07-02 17:18:09 +02:00
Daniel Drake 259e58a904 Add firmware loading support 2009-07-02 17:13:07 +02:00
Harald Hoyer a8e47195dd do not add debug module by default 2009-07-02 14:50:46 +02:00
Harald Hoyer e0364f95bc beautified devtmpfs mount 2009-07-02 11:59:46 +02:00
Harald Hoyer eab677a216 switch to initqueue handling of events
Jobs are no longer handled inside the udev events.
/sbin/initqueue is called with the commands to queue.
init will work on these jobs sequentially, so that we prevent jobs
from being killed by udev timeouts.
This serialization also prevents some problems introduced by
the udev event parallelization.
2009-07-02 11:47:28 +02:00
Harald Hoyer 4ce1991856 let iSCSI try to mount the complete LUN specified 2009-07-02 11:47:27 +02:00
Harald Hoyer 7e87a0bfa0 try harder to kill udev 2009-07-02 11:47:27 +02:00
Harald Hoyer 7717b4433a derror if we can't install switch_root 2009-07-02 11:47:27 +02:00
Harald Hoyer 5966b1b15d bail out of cryptroot-ask, if we have already asked about the password 2009-07-02 11:47:27 +02:00
Warren Togami bd81caa80a Clean up NFS comments. 2009-07-01 15:46:48 -04:00
Warren Togami f910f00627 Remove the NBD legacy format. It wasn't actually matching Debian's nbdroot implementation.
Talked with Debian nbdroot author and he agreed we shouldn't support their obsolete syntax in dracut.
Their root=/dev/nbd[0-9] is no longer needed.  Also their syntax was very standardized requiring
a separate boot= parameter.
2009-07-01 15:41:26 -04:00
Harald Hoyer 14f450cab2 unset netroot before we return (it was set to $root without checkin) 2009-07-01 21:32:33 +02:00
Harald Hoyer 950086e987 do not assume nfs for root=/dev/... but for /dev/nfs 2009-07-01 19:28:31 +02:00
Harald Hoyer 3473f5d938 prepare init to mount devtmpfs instead of tmpfs on /dev 2009-07-01 10:53:02 +02:00
Harald Hoyer e7170fb717 let dmraid remove the used partitions 2009-07-01 10:53:02 +02:00
Warren Togami 9d4c1799fe Fix legacy root=/dev/nfs nfsroot=IP:path case
TODO: root=/dev/nfs DHCP cases are still broken.
2009-06-30 18:22:44 -04:00
Warren Togami 6da2ee08a6 NFS empty path becomes "/tftpboot/%s" only if root=/dev/nfs legacy mode 2009-06-30 18:03:16 -04:00
Warren Togami 297cb80bab Cleanup parse-nfsroot and NFS tests.
TODO: root=/dev/nfs is still broken.
2009-06-30 17:48:56 -04:00
Warren Togami 92798bf79b netroot= variant is not supported for NFS, you must use root=
TODO: This temporarily breaks Legacy root=/dev/nfs.
2009-06-30 16:27:45 -04:00
Warren Togami 696e68c643 Really fix --drivers 2009-06-30 15:35:18 -04:00
Warren Togami d8b3d672c3 Fix case where --drivers was specified. 2009-06-30 15:17:08 -04:00
Warren Togami 8af0a48521 Detect block drivers during dracut since we cannot rely on the modules.block list. 2009-06-30 14:36:57 -04:00
Seewer Philippe 2d21db6def Bugfix: Fix BOOTIF argument translation 2009-06-25 23:28:38 -04:00
Warren Togami 3847431d3d Clarify some NFS parsing and point out things that need to be fixed. 2009-06-24 00:34:24 -04:00
Warren Togami fb3d8cf7c2 Remove legacy nfsroot.txt derived shortcuts and accompanying tests.
(further cleanup is needed)
2009-06-23 17:08:39 -04:00
Harald Hoyer d0d1ea3d87 prompt the crypto disk, when asking for a password
also check, if root is already mounted and flock against
console activities.
2009-06-23 07:49:23 +02:00
Warren Togami 5655a3ffbf Remove dracut invented variations of Legacy nfsroot.txt syntax and accompanying tests.
- Remove root=nfs nfsroot=...
- Remove root=nfs4 nfsroot=...
- Remove root=/dev/nfs4 nfsroot=...
- Legacy nfsroot= without root=/dev/nfs should be unsupported according to the nfsroot.txt.
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/filesystems/nfsroot.txt
45 root=/dev/nfs
46
47   This is necessary to enable the pseudo-NFS-device. Note that it's not a
48   real device but just a synonym to tell the kernel to use NFS instead of
49   a real device.
2009-06-22 16:40:09 -04:00
Harald Hoyer b006ff9930 removed shebang from .sh and changed mode to 0644 2009-06-19 13:00:09 +02:00
Harald Hoyer b8f39ef152 renamed dracut-lib to dracut-lib.sh 2009-06-19 13:00:09 +02:00
Harald Hoyer 30f9bb2cb1 add rdblacklist command line parameter 2009-06-19 13:00:08 +02:00
Harald Hoyer 064b6ea92d make iSCSI boot with root=dhcp and mount partitions labeled with "ROOT"
or "/"
2009-06-19 13:00:00 +02:00
Harald Hoyer d19ed691e8 install rules to ignore some devices 2009-06-19 12:55:36 +02:00
Harald Hoyer afd826bd6c prepare udev rules for udev >= 143 2009-06-19 09:29:16 +02:00
Victor Lowther d0e2110a9c Make /dev/shm in the initramfs.
Pretty much everyone uses it, and things break of userspace
does not make it because of a case of mistaken identities.

/sbin/start_udev on FC11, I am looking at you.
2009-06-18 23:13:04 -05:00
Seewer Philippe 02a187e161 removed exit on fail "sh -e" for dhclient-script
The Bug causing dhclient to recall BIND has been identified:
dhclient-script runs with #!/bin/sh -e, causing setup_interface
to fail if no hostname is provided by dhcp as it is the last statement
in that function.
2009-06-18 15:35:00 +02:00
Harald Hoyer c9111106f5 remove redundant vol_id run from out udev rules
moved mdadm rules before luks rules
add nbd vol_id rules
2009-06-18 15:15:28 +02:00
Harald Hoyer 1b01ddbaa3 install "basename" for path_id 2009-06-18 14:42:59 +02:00
Harald Hoyer a5cb5df189 also resume from "swsuspend" partitions 2009-06-18 13:57:14 +02:00
Seewer Philippe 00c0d5b869 fix check for dhclient-script, if interface is already up 2009-06-18 10:36:32 +02:00
Harald Hoyer e2ab42236b resume from any suspend partition
If not "noresume" is specified and no explicit "resume=" given, try to resume
from any partition with type "suspend"
2009-06-18 10:03:51 +02:00
Harald Hoyer 1e885ccdfb support old style root=dhcp root-path=server-ip:/path 2009-06-17 20:25:23 +02:00
Harald Hoyer d1baa0225b add PATH 2009-06-17 15:43:52 +02:00
Philippe Seewer 8ca4f85770 dhclient.conf points to the wrong location. Caused by not paying
attention while rebasing.
2009-06-17 15:43:52 +02:00
Philippe Seewer 8ecd9d010a multinic support: Add bootdev cmdline argument
This introduces a new cmdline argument bootdev, to support the case
where multiple nics need to be up before the netroot handler is called.
Cases involved might be bonding, iscsi multipathing, bonding, ...
This argument is required to decide which interface is the primary to
use for dhcp root-path, default gw, etc.

When multiple ip= items are present on the cmdline, the ip= parser
now enforces the presence of <dev> further demands that the new argument
bootdev contains the name of the primary interface. Configurtion if of
course still delegated to netroot but in is enhance to ensure that netroot
"waits" for all required interfaces to be up.

Example: root=dhcp ip=eth0:dhcp ip=client-ip:::netmask::eth1:off bootdev=eth0

First, the ip= cmdline parser ensures that all ip items contain a <dev> then
checks the ip items and checks as well that an ip= item for the given bootdev
was found.

When the first netroot starts, probably for eth1, it checks wheter interface
configuration for all interfaces is available. If not it exits. The second
start of netroot (eth0, which was a bit delayed because of dhcp) sees that
all interfaces are present, configures them and continues.
2009-06-17 08:37:40 +02:00
Philippe Seewer db8158439d multnic support: move actual interface configuration to netroot
Instead of configuring devices when they are ready, ifup and
dhclient-script write script files which are then sourced by
netroot.

This solves the problem of having multiple interfaces and not knowing
which one to use for dhcp or default route. This way, netroot (which
is serialized anyway) configures the interface before calling the root
handler and deconfigures it if the handler failed.

Example: root=nfs:server:path and ip=dhcp with eth0 and eth1 receiving
a dhcp reply, but eth0 is the correct one to use.

Assuming eth1 is the first to receive the dhcp-reply, netroot starts
and configures eth1. nfsroot is run but fails, so eth1 is deconfigured. If
eth0 has received a dhcp-reply (or not, then we wait) the other locked
netroot process starts and tries with eth0 and succeeds.
2009-06-17 08:37:40 +02:00
Philippe Seewer 3029be4df8 netroot: Add pxelinux BOOTIF support
Having BOOTIF as an argument is a clear pointer which interface should be
used for netroot. This changes network rule generation accordingly.
2009-06-17 08:37:40 +02:00
Philippe Seewer 761ffdddb9 netroot: Only start interface configuration if really needed
Currently network configuration is launched by udev as soon as it
discovers a driver. This isn't such a good idea since we don't know
if network configuration is actually required. Change this by writing
the udev rules on the fly if required.
2009-06-17 08:37:40 +02:00
Philippe Seewer 1b31fc140b netroot: Add ip= cmdline checker
As with other netroot boot arguments ip= lines should be parsed and
checked. Having this has the advantage that other cmdline scripts
can tell the ip= parser if dhcp or ip=:srv:... is needed, like
parse-root.sh (renamed dhcp-fallback) or parse-nfsroot do.

The nfs test-suite has one check which uses static ip lines, but
the autoconf param is wrong. Fixed this as well.
2009-06-17 08:37:40 +02:00
Philippe Seewer 50e7ff76de netroot: Introduce detailed cmdline parsers
This introduces detailed cmdline parsing, warning or aborting if the
cmdline does not contain arguments according to the spec.

Makeing sure the parsers don't just call getarg for netroot et al,
allows their reuse inside netroot to analyse dhcp root-path as well.
Hence we can get rid of the current netroot hooks. The hook itself stays
in order to add further modules which should run before netroot handlers
are called.

This has one drawback: nfsroot needs some more logic to handle nfs
specific data inside dhcp root-path.

The parsers have been writting according to current discussions about
cmdline arguments. This lead to the "discovery" that some test-cases
violate the spec. These tests have not been removed, but change to
"must fail".
2009-06-17 08:37:40 +02:00
Philippe Seewer 9f10836d63 Add warn() function to log warnings but not die() 2009-06-17 08:37:40 +02:00
Philippe Seewer 0fd1ab9d87 Log error messages to /dev/kmsg
When die()'ing inside scripts that are udev run, a simple echo isn't
good, udev usually swallows that. Routing messages to /dev/kmsg
ensures they appear on screen and in addition are easily saved through
dmesg.
2009-06-17 08:37:40 +02:00
Philippe Seewer 311a2769a0 Add 'die()' for easier error handling
Printing out an errormessage and quitting is easier if there's a function
to call. If the script calling die has exit trapped, like in init, the
emergency_shell is automatically called.
2009-06-17 08:37:40 +02:00
Philippe Seewer 580bb5417c netroot and others: Style changes
Multiline conditionals ( && { ... } ) should use if, function
declarations go to the top of the file, add/update comments and remove
some unnecessary clutter.
2009-06-17 08:37:39 +02:00
Philippe Seewer 447f044e8b write-ifcfg: Save static ip configuration
Saveing ip= options in ifup makes the information available for
later use. This solves the problem how to write static ip configuration
in ifcfg files.
2009-06-17 08:37:39 +02:00
Philippe Seewer 0c26abfa81 netroot: Always write an override file if an ip= line is present
Even if we use dhcp, ip= lines are allowed to contain the server-ip
for nfsroot, so we should store those variables for later use.
2009-06-17 08:37:39 +02:00
Philippe Seewer 9f73fedfd1 netroot: Move writing ifcfg config files to a pre-pivot script
This is mostly about style: Doing stuff after a successful mount
should go into pre-pivot.

In addition this corrects the case where the used netif is not eth0
2009-06-17 08:37:39 +02:00
Philippe Seewer a55d10c05c netroot: Use same method to check for already mounted root as init
base/init uses [ -d "$NEWROOT/proc" ] to check if root is mounted
or not. Netroot should do the same. In addition this gets rid of
another file in /tmp, since /tmp/netroot.done isn't needed anymore.
2009-06-17 08:37:39 +02:00
Philippe Seewer 2734a87537 netroot: Use root.info instead of netroot.info
Having two files which are used more or less at the same time isn't
that easy to handle and read. Instead, move the contents of netroot.info
to root.info and only use root.info. This is cleaner and makes debugging
easier.
2009-06-17 08:37:39 +02:00
Philippe Seewer 05e2c5923c netroot: Check argument
There's no sense in running netroot without a valid first argument
and further running netroot with no interface config present isn't
good as well.
2009-06-17 08:37:39 +02:00
Philippe Seewer 268de90f82 netroot handlers: Add argument checking
This is probably not necessary, but paranoia dictates that the actual
netroot handlers should check if all three required arguments (netif,
root, NEWROOT) are there and useable.
2009-06-17 08:37:39 +02:00
Philippe Seewer 9cdfd735a8 netroot: Don't export NEWROOT
Exporting NEWROOT to handlers when we already pass them two other
arguments doesn't make sense. Passing it as a third argument is
better.
2009-06-17 08:37:39 +02:00
Philippe Seewer d1a55b113d Exporting fstype, rflags and root is no longer necessary
Exporting these variables is no longer needed. All scripts that need
these are sourced and they're not used inside udev.
2009-06-17 08:37:39 +02:00
Philippe Seewer 115a35c175 nfsroot: statd is only needed for nfs4
rpc.statd is only needed for NFSv4, because it's required for
locking. We don't support locking for NFSv2/3, so start it only
if we are mount from NFSv4.
2009-06-17 08:37:39 +02:00
Philippe Seewer f2b44e351b Install debian renamed udev rules as well
Sadly, debian has reworked/renamed the udev default rules. If dracut
is to boot debian as well we need those rules.
2009-06-17 08:37:38 +02:00
Philippe Seewer 3da03a6036 NFS: Add support for debian based distros
This patch enhances nfsroot and the nfs test-suite with compatibility
for debian based distros. This is mainly the difference of using
portmap instead of rpcbind and the missing file /etc/netconfig
2009-06-17 08:37:38 +02:00
Warren Togami 1a945a576c move dhclient.conf to /etc 2009-06-16 11:43:13 -04:00
Seewer Philippe 1df0c915c6 Fix case where mdmon isn't available. 2009-06-15 23:03:02 -04:00
Seewer Philippe d3b0f96893 Use relative path for ip command. 2009-06-15 17:34:36 -04:00
Seewer Philippe 12375368b9 Allow dhcp to work with dhcpv3 where the -R option did not exist. Use dhclient.conf instead. 2009-06-15 16:57:10 -04:00
Warren Togami 21df4aa429 grep is installed by 95debug for the moment, remove this to simplify. 2009-06-12 23:48:54 -04:00
David Dillow 8bd5873ffc NBD root: add support for LVM/LUKS
With this change, we can now use LUKS and LVM over NBD. There are
some decisions to be made regarding where we should get the fstype
and fsoptions from (DHCP root vs rootfstype= etc), but the basic
functionality is there.
2009-06-11 01:47:11 -04:00
David Dillow aec48753c2 network: add support for netroot=...
This adds support for a command line option netroot=, which is currently
equivalent to root=. This will allow us to break out handling in NBD and
iSCSI to support constructs such as "root=LABEL=/ netroot=dhcp" to make
use of our block device handling with network attached devices.

iSCSI has not been changed in this patch as I don't currently have a way
to test it.
2009-06-11 01:47:11 -04:00
Warren Togami f3d9b04d1a .override also becomes net.* file only after successful rootfs mount. 2009-06-10 14:02:45 -04:00
Warren Togami 9a9777a19c Write ifcfg style file upon successful netboot.
TODO: static must be implemented, example in comments.
2009-06-10 13:16:50 -04:00
Warren Togami f2287b3626 Write MAC address to a file at successful netroot mount, NetworkManager wants this. 2009-06-10 11:12:14 -04:00
Warren Togami bf4626d933 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.
2009-06-10 10:21:11 -04:00
Warren Togami 1311803770 Write DHCP lease file, dcbw wants it for NetworkManager to take over management of the lease post-netboot. 2009-06-08 17:18:01 -04:00
Warren Togami e1ee93539f Copy netboot state into /dev/.initramfs/ before switch_root
If cmdline "rdcopystate", then copy all of /tmp/* into /dev/.initramfs/ for later debugging examination.
2009-06-08 16:51:13 -04:00
Harald Hoyer 169363e827 add ipv6 rpc.idmapd and various conf files for NFS
rpcbind on Fedora does not seem work for NFS4 without IPv6
2009-06-08 14:50:22 +02:00