Commit Graph

188 Commits (d0096de764e73f372f9ca93063f0270fc6b02c20)

Author SHA1 Message Date
Colin Guthrie 54f1a77fb6 init: Fix bogus message about invalid root device.
When the initqueue cannot be processed, it might be about an invalid
root device (in which case a separate message produced via
wait_for_dev() should be displayed anyway), but it could also
be for any other reason (e.g. /dev/resume not existing).

Therefore, it is best to use a more generic error message.

Also a minor tab->space conversion in the near vacinity of
the real change.
2012-01-09 13:34:40 +01:00
Daniel Drake ce335a0d5c 99base/init: avoid using cp -t
-t is not supported by busybox's cp.

Signed-off-by: Daniel Drake <dsd@laptop.org>
2011-11-15 09:47:20 +01:00
Harald Hoyer 470ee2d214 99base/init, 98usrmount: mount /usr if found in /sysroot/etc/fstab
We cannot boot correctly without /usr, because of
http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
so, we mount /usr readonly.
2011-11-15 09:47:17 +01:00
Harald Hoyer 15a5dc5b89 99base/init: fix check for in kernel polling 2011-10-20 13:06:52 +02:00
Michal Soltys f8342dd5f2 check root candidates more carefully
This is from the following thread:

http://thread.gmane.org/gmane.linux.raid/35753/focus=35795

Additional tests + more specific info.

Signed-off-by: Michal Soltys <soltys@ziu.info>

[harald@redhat.com: usable_root(): relaxed check for root]
2011-10-19 14:23:54 +02:00
Harald Hoyer 16457c869d mount securityfs in a seperate dracut module 2011-09-20 11:16:53 +02:00
Harald Hoyer d63fdc1198 99base/init: mount securityfs with source "securityfs" instead of dest 2011-09-20 10:10:29 +02:00
Harald Hoyer 6d82a0470e 99base/init: remove /dev/root helper symlink
Any tool relying on /dev/root has to be fixed.
2011-09-19 12:20:55 +02:00
Harald Hoyer 86880b8ff7 99base/init: removed cdrom polling reset code
This is done globally now.
2011-09-02 19:19:40 +02:00
Harald Hoyer dffb93feaf 99base/init: do not fail, when importing the original kernel environment 2011-09-01 16:01:21 +02:00
Harald Hoyer 1e2f60993f 99base/init: move switch_root breakpoint to a later point in the script 2011-08-30 16:23:17 +02:00
Harald Hoyer ed42e64cfc 99base/init: save and restore environment given from the kernel 2011-08-30 16:22:46 +02:00
Harald Hoyer ab55a117e2 99base/init: only poll cdroms, if the kernel does support autopolling 2011-08-29 19:12:47 +02:00
Harald Hoyer 6b592c1487 99base: add timeout queue
timeout queue is executed after half of the maximum retry count and if
jobs are found there, the counter is reset to zero.
2011-08-11 14:27:25 +02:00
Harald Hoyer 6a3c2215bb 99base/init: use udevadm control to set the logging priority
due to a bad revert commit, "udevadm control" was converted to
"udevproperty", which is the wrong command to set the logging priority.
2011-08-10 18:43:54 +02:00
Roberto Sassu a6c418ee43 base/init: mount the securityfs filesystem
Mount the securityfs filesystem and make available its location through the
exported variable SECURITYFSDIR.

Signed-off-by: Roberto Sassu <roberto.sassu@polito.it>
Acked-by: Gianluca Ramunno <ramunno@polito.it>
2011-07-28 15:01:34 +02:00
Harald Hoyer 40ee8c1814 99base/init: try to mount /usr, if init lives on /usr 2011-07-22 15:17:00 +02:00
Harald Hoyer 6a2a1ea75f base/init: do not mount devtmpfs with "noexec"
https://bugzilla.redhat.com/show_bug.cgi?id=710711

mmap /dev/zero: Operation not permitted
2011-06-17 13:50:17 +02:00
Harald Hoyer f2c6909468 base/init: mount virtual filesystems with the filesystem type as source 2011-06-17 13:14:18 +02:00
Harald Hoyer 9b30d4793d base/init: do not lazy umount /run 2011-05-20 15:17:32 +02:00
Harald Hoyer dd483f4f42 base/init: mkdir non-existant dirs 2011-05-20 15:17:32 +02:00
Harald Hoyer 543f39cb52 base/init: save timestamp earlier and remove /sys mount duplicate 2011-05-20 15:17:32 +02:00
Harald Hoyer 4826b9b0d5 base/init: mkdir $NEWROOT, if it does not exist 2011-05-20 15:17:32 +02:00
Will Woods 7573ac58f2 Fix "can't shift that many" crash with empty /proc/cmdline
If /proc/cmdline is empty (like if root=... is set in /etc/cmdline),
modules.d/99base/init will crash with a message saying "can't shift that
many" right before switch_root. The problem is in the block of code that
tries to look for init args. It does something like:

read CMDLINE </proc/cmdline
    [...]
    set $CMDLINE
    shift

If CMDLINE="" then "set $CMDLINE" will dump all the variables to stdout.
(That should be "set -- $CMDLINE" instead.) Since there's no $1, the
"shift" causes an error, and dracut crashes.

The 'shift' was copy-and-pasted from the previous block. It doesn't
belong here; remove it.

[Harald Hoyer <harald@redhat.com>: corrected commit message]
[Harald Hoyer <harald@redhat.com>: fixed indention]

Signed-off-by: Will Woods <wwoods@redhat.com>
2011-05-17 10:29:48 +02:00
Harald Hoyer 3b403b32fc removed trailing whitespaces 2011-05-10 11:56:09 +02:00
Harald Hoyer 44110df25a base/init: remove double nosuid from devtmpfs mount line 2011-05-03 09:59:15 +02:00
Michal Soltys 336eb5b04c modules.d/99base/init: missing slash in ismounted check
ismounted sys -> ismounted /sys

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-04-28 15:44:54 +02:00
Harald Hoyer bf512ee2e0 base/init: export RD_TIMESTAMP 2011-04-14 15:23:05 +02:00
Harald Hoyer 6a168568a5 base/init: use "udevadm control --exit" and "udevadm info --cleanup-db"
For udev >= 168 use the advanced udevadm features for shutting down udev.

Thanks Kay!!!
2011-04-14 12:00:11 +02:00
Harald Hoyer dbad9f4661 Move all files to /run/initramfs
Given that we boot into a modern Linux distribution with the "/run" toplevel
directory, we can easily mount move the whole /run directory to the real
root in the end and have the complete initramfs later on in
/run/initramfs. All log files and /run states are still accessible and
to save space /run/initramfs can be removed later on.

Because the kernel does not mount a tmpfs on /run prior to unpacking the
initramfs cpio image, we have to copy ourselves very early to a tmpfs
and mount it on /run.
Due to lazy umount the old initramfs binaries should
be removed in the end by switch_root.

This feature can be turned on with "--prefix".
2011-04-12 12:08:50 +02:00
Harald Hoyer 7eb40c488c base: s#initlog#loginit#g for consistency 2011-04-12 11:07:40 +02:00
Harald Hoyer 2a9b703903 set udev property hookdir
Revert "mdraid/65-md-incremental-imsm.rules: s#$hookdir#/lib/dracut/hooks/"

This reverts commit e1f68dc6a0.
2011-04-12 08:45:31 +02:00
Harald Hoyer 65e0dd452c base/init: removed rd.copystate
all files are available in /run/initramfs
2011-04-12 08:32:03 +02:00
Harald Hoyer 5d7cdc38d0 base/init: removed rd.timestamp and automatically export RD_* 2011-04-12 08:30:33 +02:00
Harald Hoyer a6c34848eb base/init: set DRACUT_QUIET based on "loglevel" and "quiet" 2011-04-11 19:24:59 +02:00
Harald Hoyer 182660d864 base/init: set PATH like new kernels do 2011-04-11 13:58:33 +02:00
Harald Hoyer 8f5d36896d loginit: create pid and kill loginit by pid 2011-04-11 13:17:24 +02:00
Harald Hoyer df60555037 precreate /run/udev/rules.d 2011-04-11 13:02:14 +02:00
Harald Hoyer fb59f4c967 get rid of absolute PATHs 2011-04-08 13:49:06 +02:00
Harald Hoyer 77e2cadd88 base/init: fixed "unset" of vars 2011-04-08 13:27:28 +02:00
Harald Hoyer 36e30eb096 init: s/RDDEBUG/RD_DEBUG/g 2011-04-08 13:26:23 +02:00
Harald Hoyer 03f405bc04 init: move /.die to /run/initramfs/.die 2011-04-08 13:26:02 +02:00
Harald Hoyer 9853774351 base/init: reset PATH after the /run move 2011-03-31 14:10:22 +02:00
Harald Hoyer 249f8b5bfc base/init: fixed compat /dev/.initramfs copy 2011-03-30 03:23:37 +02:00
Harald Hoyer e620bb01da base/init: fix cdrom polling 2011-03-30 00:01:00 +02:00
Harald Hoyer 5b2cc025f4 99base/init: fall back to manual cdrom polling 2011-03-28 17:52:33 +02:00
Harald Hoyer e94f4cce47 loginit: log to /run/initramfs/init.log 2011-03-25 16:10:47 +01:00
Harald Hoyer 07fa164e16 loginit: use /run/initramfs/init.log.end as end marker 2011-03-25 16:10:47 +01:00
Harald Hoyer 9e7a3bf242 base/dracut-lib.sh: s/RDDEBUG/RD_DEBUG/g
RDDEBUG would be unset by the environment cleanup in init and logging
would be turned off afterwards.
2011-03-25 16:10:47 +01:00
Harald Hoyer 0b53ca70b6 Move all hooks to "$hookdir"
hookdir=/lib/dracut/hooks for now, to keep the root directory clean
2011-03-25 16:10:46 +01:00