Commit Graph

2910 Commits (049)

Author SHA1 Message Date
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
Harald Hoyer 6b28bb54b6 add more tools to the debug module 2009-06-08 14:49:23 +02:00
David Dillow 61752d529a NBD: fix parsing of Debian-style nbdroot config 2009-06-08 00:25:20 -04:00
David Dillow 9fe7bc1bba dracut init: add rdnetdebug to exclude list 2009-06-07 18:17:03 -04:00
David Dillow abe9ccc89a NFS root: add support for default root path and %s substitution
This implements a default path of /tftpboot/%s if no path is provided,
and adds host name substitution for %s, with a fall back to the IP address,
as provided by the kernel's nfsroot handling.

The test suite is updated to test this functionality.
2009-06-07 17:17:48 -04:00
David Dillow 4107be9f9f NFS root: add missing DHCP root-path/nfsroot=[IP:]/path[,options] format
Reported-by: Seewer Philippe <philippe.seewer@bfh.ch>
2009-06-07 14:59:38 -04:00
David Dillow a2810bf24a root option parsing belongs in 99base now
We use this for NFS root as well, and NFSv4 was getting broken when
it wasn't present.
2009-06-06 02:31:45 -04:00
Peter Jones 3871f8f53b Don't use backticks, use $()
This is a minor style fix.
2009-06-05 10:20:13 -04:00
Seewer Philippe 07b2fbb183 Get rid of cat and grep 2009-06-05 16:10:52 +02:00
Harald Hoyer 5fd2decfec Merge branch 'master' of ssh://dracut.git.sourceforge.net/gitroot/dracut 2009-06-05 08:51:31 +02:00
Harald Hoyer 7e05060f77 Merge commit 'dillow/master'
Conflicts:
	test/TEST-20-NFS/make-client-root
2009-06-05 08:47:51 +02:00
David Dillow 2129ffe93e nfs: cleanup currently needs grep 2009-06-05 00:26:10 -04:00
Victor Lowther fa0f73f438 Ugh, using backticks instead of $()
Get that evilness out of dracut, please.
2009-06-04 22:02:37 -05:00
Victor Lowther 8158ad29ec make udevtriggeropts just use an environment variable
No point in making a file and then reading from it when hooks are sourced.
2009-06-04 22:02:37 -05:00
Harald Hoyer 2e7f65d96e try to install switch_root from system 2009-06-04 17:44:26 +02:00
Harald Hoyer 53759538cb fix udevtriggeropts 2009-06-04 17:44:21 +02:00
Harald Hoyer 91b1157500 add support to specify additional udev trigger options 2009-06-04 13:07:01 +02:00
Warren Togami 2c02c8318c Ensure KMS drivers are loaded before plymouth. 2009-06-03 14:25:50 -04:00
Warren Togami dff7ea6864 No longer needed, already ran in pre-trigger 2009-06-03 13:10:57 -04:00
Harald Hoyer 27a101f47c simplify plymouth startup 2009-06-03 17:31:48 +02:00
Harald Hoyer 071bd6e1a0 don't run plymouth --show-splash from udev rule
we have to run it no matter what, so don't rely on a rule
2009-06-03 17:12:07 +02:00
Harald Hoyer 1eeddd31af run udevadm trigger for graphics for plymouth in pre-trigger hook 2009-06-03 17:07:23 +02:00
Warren Togami 0a56724cd6 plymouth0.7: Launch plymouth --show-splash from udev event, and once before switch_root in case it didn't start 2009-06-02 20:20:44 -04:00
Warren Togami e9b1426eb7 Detect KMS capable drm drivers instead of hard coded list. 2009-06-02 16:51:49 -04:00
Harald Hoyer 87ce134e08 preserve the original root= variable 2009-06-02 18:01:52 +02:00
Harald Hoyer 92bfa4c6e3 use iscsi-iname to generate the initiator name, if not specified 2009-06-02 16:10:36 +02:00
Harald Hoyer 61537c7de6 override commandline/conf options by root_path 2009-06-02 16:10:04 +02:00
Harald Hoyer 34cb684936 removed debug code 2009-06-02 13:32:11 +02:00
Harald Hoyer ac4ded9128 add iSCSI module 2009-06-02 13:22:29 +02:00
Harald Hoyer 4332e5f71f install cat for network module 2009-06-02 13:21:16 +02:00
Harald Hoyer cff3457e32 fixed fstype mount options 2009-06-02 09:25:24 +02:00
Warren Togami d0c7d42b3e plymouth-0.7: details.so must be copied as well 2009-06-01 22:57:08 -04:00
David Dillow ebd5615489 strip block: off root= when using the mount hooks
I'm not sure they are still used, but if so they need to
trim the prefix.
2009-06-01 21:43:07 -04:00
David Dillow b4dc8ad346 Allow NFS and NBD to be built into the kernel
Probe for NFS and NBD capability before trying to load their modules
in case they are built into the kernel. Ugly use of flag files, but
avoids the need for grep to be on the image.
2009-06-01 19:59:22 -04:00
David Dillow 7132e6a346 Remove dependency on /bin/echo
Actually cut the last dependency on //bin/echo for resume.
2009-06-01 19:46:43 -04:00
David Dillow 92997caf35 cleanup shebangs in sourced scripts
All of the scripts are sourced, so there is no need to have
will pick up on the .sh extension.
2009-06-01 19:17:48 -04:00
Warren Togami 4f0e32751f nfs needs sunrpc 2009-06-01 18:38:53 -04:00
Warren Togami 9dcf9cef38 Include only wired ethernet drivers, explicitly exclude wireless.
(If you REALLY want wireless boot, you need to write your own module to configure it properly.)
2009-06-01 18:21:40 -04:00
Warren Togami e902c65391 plymouth-0.7: fully install default theme and associated plugin 2009-06-01 16:09:24 -04:00
Warren Togami e26cb36fca Merge branch 'master' of ../dracut-dillow 2009-06-01 14:54:59 -04:00
Victor Lowther 4eba843dde Revert --resolve-names=never in init
That flag is too new to work on most shipping distros, so fall back to
including /etc/group and the libnss_files.
2009-06-01 04:04:34 -05:00
David Dillow 2b117123ec Add NBD support
This adds basic support for root on a network block device to
the netroot framework.
2009-06-01 00:59:52 -04:00
David Dillow 5103130352 nfsroot: move to netroot framework
Parse and convert commandline options in the cmdline hook, and
fill in the missing pieces in the netroot hook. This also allows
root=dhcp to work as expected.
2009-06-01 00:56:01 -04:00
David Dillow 7d7efa4a3d netroot: add common handler for network root devices
/sbin/netroot is a jumping off point to allow various network
root devices to share infrastructure. It will loop over scriptlets
in the netroot handler, looking for a handler to run for this type
of netroot. Handlers can do choose to act based on command line
options to the kernel, or via DHCP options received on this interface.
They should massage root= into a form suitable for their handler.
2009-06-01 00:42:43 -04:00
David Dillow ae5bc1fd8a dracut-lib: add source_all to library
The network root handler will need this.
2009-06-01 00:39:56 -04:00
David Dillow 9810ce7e38 resume: add support for labeled resume devices
I noticed when doing the block root= parser that resume
didn't support labeled resume devices. Fix that up and
get rid of a dependency on /bin/echo in the process.
2009-06-01 00:27:06 -04:00
David Dillow d15c7a1ab7 cmdline: cleanup handling and block: handler
Now init checks that we understood the root= option, and can
act upon it, presenting and error if not. Also, clean up the
generation of udev rules such that we don't require /bin/echo.
2009-06-01 00:21:53 -04:00
David Dillow e450281431 dracut: add cmdline hook
This hook is where each module should parse kernel command line
options and perform any legacy translation.
2009-06-01 00:07:26 -04:00
David Dillow 5c123162ed block root: split out resume parsing and udev rules
We have a resume module, and these rules should live in it. Modify
the sort order a bit to ensure the resume rules continue to execute
first.
2009-05-31 23:19:31 -04:00
David Dillow 145ca9e5b3 nfsroot: move to same sort order as block methods
There is no reason for this to be a 40nfsroot rather than 95nfs
once other network root handlers are added. Go ahead and move it.
2009-05-31 22:45:12 -04:00
Victor Lowther e314863e67 Several updates to make dracut a bit more robust.
First, add a check script to 99base to ensure that it will load its
prerequisites.

Second, disable the udev magic dracut normally uses when generating
test images -- it was causing random failures when creating the test
root filesystem, presumably due to race conditions between the
rootfs creation scripts and udev.

Third, consolidate the rootfs creation scripts into one script.
2009-05-30 16:53:12 -05:00
Victor Lowther 5033486389 Have udevd never try to resolve user or group ownership of devices.
This gets rid of the need to have potentially security-sensitive files
like /etc/passwd and /etc/group in the initramfs, and makes the initramfs
a bit smaller.  We trust the final userspace to do The Right Thing when
assigning user/group ownership to devices.
2009-05-30 11:45:47 -05:00
Victor Lowther f3fb8d8074 Modify the check script so that 40network will only load as a
dependency on another module.
2009-05-29 23:07:56 -05:00
Victor Lowther 3774d3cc15 Removed 90kernel-modules-loaded.
Sure, it will load all the modules that are currently installed into the
initramfs.  Why was this a good thing, again?
2009-05-29 23:07:56 -05:00
Victor Lowther 66ac3cd1f0 Update check scripts in modules to make them work again.
Also got rid of "dracutmodules=hostonly".  We have --hostonly, and it
does the same thing.
2009-05-29 23:07:15 -05:00
Warren Togami 2c54bc996a Victor pointed out --hostonly doesn't go into check. 2009-05-29 23:56:55 -04:00
Warren Togami 2d7d2fdbbb Properly detect -H and --hostonly mode 2009-05-29 18:38:49 -04:00
Warren Togami adfe014640 Remove redundant modprobe.d copy 2009-05-29 13:20:33 -04:00
Warren Togami 642e160c0e Install KMS drivers. It sucks to have a hard coded list, but there is no clean way of doing this distro-neutral at the moment. 2009-05-29 01:14:59 -04:00
Victor Lowther 06558b3ee4 Make nfsroot work with hostonly mode. 2009-05-28 21:02:14 -05:00
Warren Togami c1143d3d6c Filesystem modules already included in =fs, no runtime detection allowed in default dracut 2009-05-28 16:29:22 -04:00
Warren Togami ba126e82af $drivers specified from .conf or --drivers get copied once, instead of multiple times with other calls to instmods() 2009-05-28 15:55:44 -04:00
Warren Togami e19d6bf603 Disambiguate modules and drivers. modules are dracutmodules. drivers are kernel modules. 2009-05-28 14:27:02 -04:00
David Dillow aa43d0b0df More runtime files to /tmp 2009-05-27 22:54:03 -04:00
Warren Togami 3da5856981 Move all files generated during initrd runtime to /tmp 2009-05-27 22:41:18 -04:00
Warren Togami 6941b1b556 Make /sbin/nfsroot executable 2009-05-27 14:35:15 -04:00
Harald Hoyer 4127130480 prefixed more internal command line options with "rd"
break -> rdbreak
netdebug -> rdnetdebug
2009-05-27 14:56:20 +02:00
Harald Hoyer ee0deb9918 better handling of mount moving rpc_pipefs 2009-05-27 14:21:52 +02:00
Harald Hoyer 77f6725c4e install umount for nfsroot 2009-05-26 18:08:56 +02:00
Andreas Thienemann 5fa499403f cleanup environment before calling real init 2009-05-26 18:08:19 +02:00
Andreas Thienemann e89bf85757 Prevent unnecessary installation of bash if bash. Same goes for dash. 2009-05-26 18:06:56 +02:00
Victor Lowther 08d924f6a8 Actaully make 95udev-rules.ub810/check work 2009-05-25 17:08:04 -05:00
Victor Lowther cfc5b698e6 Add dependency info to the plymouth modules and the nfsroot module.
No point in making it easy for them to fail.
2009-05-25 16:59:17 -05:00
Victor Lowther 1e19548857 Add check files for network and nfsroot
This way dracut will not try to install them if the system does not have
the needed prerequisites.
2009-05-25 16:35:57 -05:00
Victor Lowther fa9763f52a Make check scripts for 90dmraid and 90dmsetup actually work. 2009-05-25 11:52:17 -05:00
Harald Hoyer 16a775be26 Revert "root=dhcp"
This reverts commit 4c715d64b2.
2009-05-25 18:24:13 +02:00
Harald Hoyer 65f14ce19c renamed internal command line options to rd* namespace
ramfsdebug -> rdinitdebug
udevinfo -> rdudevinfo
udevdebug -> rdudevdebug
2009-05-25 17:59:21 +02:00
Victor Lowther fe9143d9ca 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.
2009-05-25 17:49:56 +02:00
Victor Lowther 0c2e3d1221 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.
2009-05-25 17:49:39 +02:00
Harald Hoyer 443a72d0cf chmod u+x modules.d/40nfsroot/install 2009-05-25 16:49:26 +02:00
Harald Hoyer 5a87522d49 use 40nfsroot 2009-05-25 16:49:10 +02:00
Harald Hoyer e6db216f0b move /var/lib/nfs/rpc_pipefs to NEWROOT only if directory exists 2009-05-25 16:48:36 +02:00
Harald Hoyer 4c715d64b2 root=dhcp 2009-05-25 16:48:19 +02:00
Harald Hoyer 28df9479e1 make root=dhcp work 2009-05-25 16:48:01 +02:00
Harald Hoyer 0e14fae0fe use 40nfsroot instead of 95NFS 2009-05-25 15:32:30 +02:00
Harald Hoyer 9223814d59 do not trap if hostname is empty 2009-05-25 15:32:30 +02:00
David Dillow f6f74096f6 nfsroot: mount NFS root from udev rules
Work-in-progress to mount NFS root from udev, using the DHCP options and
allowing an override from the kernel command line. Supports NFSv4 w/locking
and NFSv2/v3 with nolock.

This is just an RFC patch, you'll note all the XXX markings where I've been
thinking about how to best do things. In addition, we really want to retry
DHCP and NFS mounting in a loop, in case the servers are down or overloaded
like when booting a full diskless cluster.
2009-05-25 12:19:38 +02:00
David Dillow 7e9919b927 network: prepare network configuration engine for udev-based nfsroot
This changes the network config to run dhclient from within udev, and
allows multiple dhclients to run at once. It also sets the hostname and
adds a kernel command line option 'netdebug' to help debug network issues.
2009-05-25 12:19:25 +02:00
David Dillow df44688f3e lib: create a library for useful shell functions
There are several snippits of shell code that are useful to multiple
scripts. Start by moving getarg() into the library.

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

correct patch below:
2009-05-25 11:50:20 +02:00
Victor Lowther 4957ab92f2 Create test image on an md array and improve cryptroot handling
If we purport to test booting to an md raid, we may as well test it.

We do not need the plymouth module and the normal crypt module to include
duplicate functionality.
2009-05-25 11:36:32 +02:00
Victor Lowther 9335cb383a We create our test image with root as an LVM menber.
We purport to support booting off an encrypted LVM PV, may as well test it.
2009-05-25 11:36:27 +02:00
Warren Togami 7ee170746f Abort if switch_root does not exist.
Otherwise it would succeed silently when we KNOW it would fail, which is not cool.
Usually this means you didn't build switch_root in your dracut checkout and you used dracut -l.
(This currently cannot be done in a check script, because of the current design of check.
Andreas intends on discussing a redesign on the list.)
2009-05-21 19:14:50 -04:00
Warren Togami 4ae46e575d Oops, make it work 2009-05-21 15:16:44 -04:00
Warren Togami 76434898ad Do not attempt to load policy if selinux-policy is not installed. 2009-05-21 14:34:38 -04:00
Warren Togami d03caf15cc Check /sbin/plymouthd for arch instead of /proc/$$/exe. /sbin/plymouthd is guaranteed to be there and be the correct arch. 2009-05-21 12:15:58 -04:00
Warren Togami 1a1b179a5b module-init-tools only recognizes files ending in *.conf, so only copy files of that pattern. 2009-05-21 11:38:25 -04:00
Andreas Thienemann 3b8c6ac696 add xts module to crypto 2009-05-20 18:06:27 +02:00
Andreas Thienemann fc791a7fde fix -t auto for fstype="" 2009-05-20 16:51:50 +02:00
Andreas Thienemann 9a4495557f add missing files for plymouth 2009-05-20 14:38:22 +02:00
Harald Hoyer 5ce91332ba silence plymouth install 2009-05-20 14:25:35 +02:00
Harald Hoyer 69f8af0267 plymouth hide-splash on emergency shell 2009-05-20 14:25:35 +02:00
Harald Hoyer a4aee9e573 add emergency hook 2009-05-20 14:25:35 +02:00
Harald Hoyer ea62f0eb2a fixed NFS mounting 2009-05-20 14:25:31 +02:00
Harald Hoyer 9c6f43f0e7 set "-t auto" as default if fstype is emtpy 2009-05-20 14:01:03 +02:00
Harald Hoyer 6d090d6427 silence the "check"'s 2009-05-20 14:00:28 +02:00
Harald Hoyer 6cfef0c638 check for plymouth-set-default-theme not plymouth-set-default-plugin 2009-05-20 12:33:11 +02:00
Harald Hoyer 155c171d88 recreate /dev/null after /dev mounting 2009-05-20 11:59:34 +02:00
Harald Hoyer 9e30573629 fix node check for plymouth-start.sh 2009-05-20 11:42:41 +02:00
Harald Hoyer 1babfad10a fix node check for plymouth-start.sh 2009-05-20 11:32:55 +02:00
Harald Hoyer 42baa902f2 add plymouth module for plymouth < 0.7 2009-05-20 11:14:56 +02:00
Andreas Thienemann 7a02208af4 Prevent plymouth-start.sh from creating already existing device nodes.
Prevent messages such as the following when booting dracut:

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

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

This patch makes the mknod calls conditional.

diffstat dracut-plymouth-prevent-mknod-errormsg.patch
 plymouth-start.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
2009-05-20 11:13:37 +02:00
Harald Hoyer 24987e12a9 remove "set -x" from nfs-mount-root.sh 2009-05-18 20:44:00 +02:00
Harald Hoyer d4244cb25b support normal nfs root definition syntax 2009-05-18 19:55:58 +02:00
Harald Hoyer 2f1408b3ce only create udev rules for root=/dev/... 2009-05-18 19:32:01 +02:00
Harald Hoyer a86c07a0b4 basic support for "nfs://" dhcp root_path 2009-05-18 19:31:08 +02:00
Harald Hoyer a8084e23dd reenable manual block mount for e.g. lvm devices 2009-05-18 18:18:21 +02:00
Harald Hoyer 6c00df2068 removed debug code 2009-05-18 16:38:32 +02:00
Harald Hoyer c02c339bb5 fixed dhclient dhcp options saving 2009-05-18 16:08:58 +02:00
Harald Hoyer b80a6fda40 fixed wildcard test of run-dhclient.sh 2009-05-18 15:31:07 +02:00
Harald Hoyer 32f32c14b6 fixed 40network module 2009-05-18 15:22:33 +02:00
Harald Hoyer f360cabf1f add "rm" to debug module 2009-05-18 15:22:03 +02:00
Harald Hoyer 17edb6aa4e mkdir /var/run for dhclient 2009-05-18 14:08:02 +02:00
Harald Hoyer b300c0354a kill dhclient if pid was found 2009-05-18 14:07:34 +02:00
Harald Hoyer c3c06c2da8 merge 95rootfs-block-udev and 95rootfs-block 2009-05-18 14:05:36 +02:00
Harald Hoyer 4b3c5cf17c merge 95rootfs-block-udev and 95rootfs-block 2009-05-15 15:42:28 +02:00
Harald Hoyer 9b1581051f fall back to filesystem type "auto" 2009-05-15 13:15:11 +02:00
Harald Hoyer e419faf652 dash echo does not support -e option
use /bin/echo, instead of dash builtin echo
do not use "sh -c"
2009-05-15 12:52:54 +02:00
Harald Hoyer b6e0fea80c change file descriptor for flock locking
dash does not like filedescriptors > 9
2009-05-15 12:48:11 +02:00
Harald Hoyer 41fab50b5f fixed plymouth installation for plymouth-0.7.0-0.2009.05.08.1.fc11 2009-05-15 12:43:46 +02:00
Harald Hoyer e7b6ed1379 do not run dhclient, if no net device found 2009-05-15 12:43:03 +02:00
Harald Hoyer a011d66860 install all network modules 2009-05-12 15:47:01 +02:00
Harald Hoyer c9a9cf7363 add module for rootfs mounting via udev rules 2009-03-24 11:36:56 +01:00
Harald Hoyer fea5683693 sleep 0.5 seconds instead of 1 2009-03-24 11:35:52 +01:00
Harald Hoyer c7e0d91c80 add udevdebug and udevinfo command line arguments 2009-03-24 11:34:45 +01:00
Harald Hoyer 4479cb2b45 move root command line argument parsing to modules 2009-03-24 11:33:58 +01:00
Harald Hoyer 2003e18962 rename "debug" to "ramfsdebug" to differ from the kernel "debug" argument 2009-03-24 11:32:54 +01:00
Harald Hoyer ef08521555 only create the /bin/sh symlink to bash, if it does not exist yet 2009-03-24 11:29:03 +01:00
Harald Hoyer 9d5fc7b46e add filesystem modules to the initrd 2009-03-24 11:28:25 +01:00
Harald Hoyer 48677b2a8f only install the dash symlink to /bin/sh, if dash is installed 2009-03-24 11:27:35 +01:00
Harald Hoyer 47f151f762 Merge branch 'enhanced-test-framework' of git://fnordovax.org/dracut into test
Conflicts:
	modules.d/50plymouth/63-luks.rules
	modules.d/50plymouth/cryptroot.sh
	modules.d/50plymouth/install
	modules.d/90crypt/63-luks.rules
	modules.d/90crypt/cryptroot.sh
	modules.d/90crypt/install
2009-03-23 15:28:14 +01:00
Victor Lowther 37dcb40001 do not use grep to test if sysroot is mounted 2009-03-23 15:06:45 +01:00
Victor Lowther 4620284073 Move loading crypt kernel modules to the crypt module 2009-03-20 03:36:21 -05:00
Victor Lowther 80c9d068b2 Just pass args the kernel passed to us, not /proc/cmdline args. 2009-03-20 03:08:40 -05:00
Victor Lowther b5c7c7e829 Silence in the initramfs is golden.
Get rid of gratuitous text -- we should only talk if asking a question or
if something screwed up.
2009-03-20 03:08:40 -05:00
Victor Lowther 35f90aafd2 Move finding and mounting root on block devices into its own hook. 2009-03-20 03:08:40 -05:00
Victor Lowther 99576a2a63 Split out resume handling into its own hook. 2009-03-20 03:08:40 -05:00
Victor Lowther 1b87b9670a Move parsing rootfs options to a pre-udev hook. 2009-03-20 03:08:40 -05:00
Victor Lowther 5fff86626b Update plymouth to work with running cryptsetup from a udev rule. 2009-03-20 03:08:40 -05:00
Victor Lowther fa0115c3c0 Unlock our encrypted root in a udev rule. 2009-03-20 03:08:39 -05:00
Victor Lowther f81a894eb0 Move processing root options into a pre-udev hook.
Also make changes that will make it easier to udevify resuming
from hibernate and mounting root.
2009-03-20 03:08:39 -05:00
Victor Lowther 88ffd2df3f Update test framework to create and use LVM on cryptroot 2009-03-20 03:08:39 -05:00
Harald Hoyer 8214a17d58 changed mode of modules.d/90dmsetup/check to 0755 2009-03-09 13:18:06 +01:00
Harald Hoyer 04726f4169 removed exit 1 from debug 2009-03-09 13:11:38 +01:00
Harald Hoyer bb040f9315 trigger root mount via udev rules 2009-03-09 13:08:12 +01:00
Harald Hoyer 85e90fd44b removed trailing \ 2009-03-09 13:08:12 +01:00
Harald Hoyer ab83e0a6f5 get crypt password with rules 2009-03-09 13:08:12 +01:00
Harald Hoyer e22d1330d1 Revert "Make plymouth play nice with the current crypt code, part 1"
This reverts commit 79ec17c74d.
2009-03-09 13:08:12 +01:00
Harald Hoyer f5f9bfee2d add full patch to /sbin/ip and check for dhclient $pid before kill 2009-03-09 13:08:12 +01:00
Harald Hoyer 0a98b6d905 do not display "file not found" for /etc/lsb-release 2009-03-09 09:18:25 +01:00
Victor Lowther 7bff75da14 Make udevd shut up
Do this by loading /etc/group and /lib*/libnss_files.so.* onto the initramfs
2009-03-08 11:39:43 -05:00
Victor Lowther cac7ac4a45 Fixup 90kernel-modules-loaded
The inst functions do not know how to handle directories directly.
Just find the files, and they will create the directories as needed.
2009-03-08 11:39:43 -05:00
Victor Lowther 76c88488c4 Move root option processing into a pre-mount hook.
This will make it easier to add support for root on nfs, root on iscsi,
root on multipath, and other such oddities.
2009-03-07 08:02:03 -06:00
Harald Hoyer 5cad5bb50e add hostonly check procedure 2009-03-07 14:01:32 +01:00
Seewer Philippe 4bc2c7e23a add /check for dmraim module
With the /check infrastucture in place, dmraid is missing a check file.

Patch is built on top of Harald Hoyers merge tree
(git://git.surfsite.org/pub/git/dracut.git)
2009-03-07 12:30:17 +01:00
Harald Hoyer 188c20dc31 do not autoinstall 90kernel-modules-loaded 95udev-rules.ub810 2009-03-07 12:19:55 +01:00
Victor Lowther faf882394b Simplify switch_root.c a bit
Shift some required functionality from switch_root.c to init.

String manipulation and filtering, and testing for the existence of init
is easier in the init script than in C.
2009-03-06 22:32:37 -06:00
Victor Lowther 02d7fdcab4 Minor changes to network scripts to bring inline with my current patch series 2009-03-06 17:04:05 -06:00
Victor Lowther 601a5333d2 Tighten up the ubuntu 8.10 udev rules installation script.
We need to add a check file here, but I ahve no idea how to do that for ubuntu.
2009-03-06 16:53:29 -06:00
Victor Lowther f8fc759574 Modify modprobe.d installation and add check for plymouth 2009-03-06 16:42:05 -06:00
Victor Lowther 321763882c Chop tons of unneeded stuff out of the plymouth module
Most of plymouth-populate-initrd appears to have been unneeded, and is gone.
The rest was updated to match dracut usage.
2009-03-06 16:30:17 -06:00
Victor Lowther 580ea15dee Make plymouth play nice with current ctypt code, part 2.
The reason this works is that inst will refuse to overwrite a file that
already exists.  We jsut make plymouth's code to ask for a password have the
same name as 90crypt's password asking script, and it will override 90crypt's
script while leaving everything else intact.
2009-03-06 16:01:15 -06:00
Victor Lowther 79ec17c74d Make plymouth play nice with the current crypt code, part 1 2009-03-06 16:00:56 -06:00
Victor Lowther 91b80abdce Tighten up 90kernel-modules-loaded a bit. 2009-03-06 15:36:41 -06:00
Victor Lowther cb330cac77 Tighten up 90kernel-modules/install a bit. 2009-03-06 15:34:43 -06:00
Victor Lowther 3ffa5b1135 Make 90lvm load the device-mapper rules instead of 95udev-rules 2009-03-06 15:29:09 -06:00
Victor Lowther b2a843b471 Make 90dmraid load the dm-raid udev rules instead of 95udev-rules 2009-03-06 15:26:24 -06:00
Victor Lowther 8fb66c9a3f Use new check functionaloty to only load cryptoroot when needed 2009-03-06 15:15:59 -06:00
Victor Lowther 25a244f774 Use new check functionality to make 10redhat-i18n only work on redhat. 2009-03-06 14:29:28 -06:00
Victor Lowther 4ca2254668 Make dash module use new check functionality 2009-03-06 14:27:03 -06:00
Harald Hoyer a62ac42d63 fixed the previous incomplete patch for 95udev-rules.ub810 2009-03-06 17:12:51 +01:00
Harald Hoyer 8123d43838 /etc/modprobe.d might have subdirs, so install them also 2009-03-06 16:58:44 +01:00
Seewer Philippe a916b0709d dracut and ubuntu 8.10
Followup: Harald Hoyers "Merge" repository boots on ub8.10 with a dracut.conf similar to the following one and the attached patch applied

> cat dracut.conf
modules="ata_piix sd_mod sg"
dracutmodules="dash kernel-modules debug terminfo udev-rules.ub810 base"
2009-03-06 16:35:05 +01:00
Harald Hoyer 06bb5abe9b add 90kernel-modules-loaded to install currently loaded kernel modules 2009-03-06 16:31:43 +01:00
Harald Hoyer 4ab702040a install modprobe.d for special rules and blacklists 2009-03-06 15:44:50 +01:00
Harald Hoyer 0515a94129 add sd_mod to hardcode module list of doom 2009-03-06 15:44:25 +01:00
Harald Hoyer 9ec23437fa add /sbin to $PATH 2009-03-06 14:36:18 +01:00
Harald Hoyer 7cd15fe768 use $(( instead of $[ 2009-03-06 14:33:42 +01:00
Harald Hoyer 379dd5de55 use udev rules to autoassemble a md raid and added mdmon pre-pivot 2009-03-06 12:43:13 +01:00
Harald Hoyer 1e984a27d2 start udevd with --resolve-names=never 2009-03-06 10:57:16 +01:00
Harald Hoyer 63efe29bb3 use switch_root code from http://pjones.fedorapeople.org/mkstart/usr/lib/mkstart/switchroot.c 2009-03-06 10:57:12 +01:00
Harald Hoyer 6b5951b3d6 added mdraid autoassembling 2009-03-06 10:32:12 +01:00
Harald Hoyer a890fe2922 redirect more to null 2009-03-05 17:17:32 +01:00
Harald Hoyer 0f46778162 added plymouth with crypt handling 2009-03-05 17:16:56 +01:00
Harald Hoyer e548dabcef make crypt more failsafe 2009-03-05 14:47:00 +01:00
Harald Hoyer 879305557c kill udev before switch_root and bail out after 10 seconds of mount tries 2009-03-05 14:21:59 +01:00
Harald Hoyer 38f31d8e78 only react to "add" to prevent duplicate /cryptroot lines 2009-03-05 14:21:20 +01:00
Harald Hoyer 538a94d9e5 use dash instead of underscore for udev control commands 2009-03-05 14:20:48 +01:00
Harald Hoyer ca75dc510b serialize lvm calls with a subshell 2009-03-05 14:20:27 +01:00
Harald Hoyer 7f5112e3d6 add dmraid 2009-03-05 14:19:41 +01:00
Harald Hoyer 32731fee48 install console udev rules and helper apps 2009-03-05 10:34:09 +01:00
Harald Hoyer c4da240717 replace switch_root shell script with binary
The switch_root shell script did not work with bash-4.0-2, because
"exec" gets the real path of the executable which is then
"/sysroot/lib/ld-linux.so.2" instread of "./lib/ld-linux.so.2".

Also the required chroot binary might live in /usr/bin, which can
be mounted later.

Here is the switch_root code from nash, which can be stripped down
further, but which works.

>From f1b1e4f8694104f007e4483c36b0bf40a5760167 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Date: Wed, 4 Mar 2009 13:41:07 +0100
Subject: [PATCH] replace switch_root shell script with binary

The switch_root shell script did not work with bash-4.0-2, because
"exec" gets the real path of the executable which is then
"/sysroot/lib/ld-linux.so.2" instead of "./lib/ld-linux.so.2".
Also the required chroot binary might live in /usr/bin, which can
be mounted later.

Here is the switch_root code from nash, which can be stripped down
further, but which works.
2009-03-04 17:23:03 +01:00
Victor Lowther 09805e02b8 Get rid of some RedHat specific modules and udev rules
They are not needed to boot with dracut, so away they go.

Also rewrite inst_rules to automatically search likely rule locations when
installing udev rules.
2009-03-04 17:14:53 +01:00
Victor Lowther 20abd91484 Create a self-contained structure for dracut modules
All modules now live in a subdirectory /modules.d.  Each module is
self-contained -- it should contain everything that it will install
on the initrd.  All modules must include a script named install, which
will be sourced by dracut.  This script should do the actual file installation
using inst methods.  The moddir variable will point to the full path to the
module dracut is currently working on.

As usual, this patch series applies on top of my previous patch series,
and is available as normalize-modules from http://git.fnordovax.org/dracut.
2009-03-04 16:55:14 +01:00