Commit Graph

122 Commits (c7fbc0c8901917baf0d1f0822568e65c6ec00d18)

Author SHA1 Message Date
Harald Hoyer e8cf498dcc 95rootfs-block/mount-root.sh: ignore /.resume 2009-09-15 11:17:28 +02:00
Harald Hoyer 5a8d8dfbb6 switch modules to initqueue-finished 2009-09-15 11:17:22 +02:00
Harald Hoyer 273b197d75 added initqueue-settled and refactored code 2009-09-07 19:12:01 +02:00
Harald Hoyer c81a97d1a7 install "ln" per default 2009-07-13 16:24:41 +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 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 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 b006ff9930 removed shebang from .sh and changed mode to 0644 2009-06-19 13:00:09 +02: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
Harald Hoyer cff3457e32 fixed fstype mount options 2009-06-02 09:25:24 +02: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 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
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
Andreas Thienemann fc791a7fde fix -t auto for fstype="" 2009-05-20 16:51:50 +02:00
Harald Hoyer 9c6f43f0e7 set "-t auto" as default if fstype is emtpy 2009-05-20 14:01:03 +02:00
Harald Hoyer 2f1408b3ce only create udev rules for root=/dev/... 2009-05-18 19:32:01 +02:00
Harald Hoyer a8084e23dd reenable manual block mount for e.g. lvm devices 2009-05-18 18:18:21 +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
Victor Lowther 35f90aafd2 Move finding and mounting root on block devices into its own hook. 2009-03-20 03:08:40 -05:00