Commit Graph

5755 Commits (053)

Author SHA1 Message Date
Daniel Drake f47478b336 switch_root: add subroot support
The current switch_root can only switch to a new root that is the root
of a mount point.

This patch adds support for "subroots", where the new root is somewhere
below a mount point. It does this by adding in a few extra steps to
chroot into the subroot after the enclosing partition has been moved
and entered.

This will be used by OLPC, who sort-of have 2 copies of Fedora stored
on a single partition under different directory trees, where the
initramfs decides which one to boot into.
2009-07-14 13:53:44 +02:00
Harald Hoyer 6281504d33 add testsuite for degraded RAID-5 array 2009-07-14 13:44:38 +02:00
Harald Hoyer 4a4c88236b modified test description for TEST-10-RAID 2009-07-14 13:44:07 +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 4fafddf78f add test for simple root on LVM 2009-07-13 16:41:05 +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 6aca2e0366 add kernel-modules module to iscsi server 2009-07-13 15:03:11 +02:00
Harald Hoyer 07253f00ca add documentation of the init hooks 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 616f1557b1 version 0.4 2009-07-04 10:05:38 +02: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 3b51f4f30b add firmware packages to be required by the dracut-generic package 2009-07-03 13:17:08 +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
Harald Hoyer f601799e94 add binutiles requirement to specfile (because of nm) 2009-07-03 12:06:16 +02:00
Harald Hoyer e2dbd86f09 add kernel-modules module to testsuite images 2009-07-03 12:06:11 +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
Seewer Philippe a55711cd86 Don't use absolute paths for utilities 2009-07-02 17:13:06 +02:00
Harald Hoyer a8e47195dd do not add debug module by default 2009-07-02 14:50:46 +02:00
Harald Hoyer 624b52c440 fixed adding modules via -a 2009-07-02 14:50:22 +02:00
Harald Hoyer 4f4454b61f add "--add" option to the manpage 2009-07-02 13:14:57 +02:00
Harald Hoyer e0364f95bc beautified devtmpfs mount 2009-07-02 11:59:46 +02:00
Harald Hoyer 970e646b00 fixed --add option handling 2009-07-02 11:57:23 +02:00
Harald Hoyer df328b6c36 version 0.3 2009-07-02 11:48:27 +02:00
Harald Hoyer 5b6e76c011 specfile: require /sbin/switch_root and turn on switch_root generation for F12 2009-07-02 11:47:32 +02:00