Commit Graph

1202 Commits (d0096de764e73f372f9ca93063f0270fc6b02c20)

Author SHA1 Message Date
Amadeusz Żołnowski b52294d00b crypt: dropped plymouth --has-active-vt check on passwd prompt
As Ray Strode explains, plymouth --has-active-vt may fail if the user
passes console=ttyS0 or something other not corresponding to
console=tty0, because plymouth is outputing to the serial console and
not a VT in this case.
2011-07-01 10:15:26 +02:00
Harald Hoyer 802e7e1c2e dmsquash-live: install eject with dracut_install
the new search path does the right thing
2011-07-01 10:14:47 +02:00
Harald Hoyer be1762caff selinux/selinux-loadpolicy.sh: set LANG=C for load_policy and restorecon
set LANG=C for chroot execed tools, because the terminal might not be
able to display the messages and the rest is not translated anyway.
2011-06-22 13:33:37 +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 565f6fb675 crypt/crypt-lib.sh: s/.console.lock/.console_lock/g
In the initrd, the init script and the sbin/cryptroot-ask script use
flock with different lock files for the console: /.console_lock and
/.console.lock respectively
2011-06-17 13:44:08 +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 657d68cfff mdraid: add shutdown script 2011-05-31 15:50:45 +02:00
Harald Hoyer 20636ce09f dm: add shutdown script 2011-05-31 15:50:45 +02:00
Harald Hoyer 168fa7e571 base: add shutdown script to be called from systemd 2011-05-31 15:50:43 +02:00
Harald Hoyer 7ed1de2f1d mount-root.sh: fixed fsck and "-a" only for "ext*" 2011-05-31 14:56:30 +02:00
Michal Soltys 0d8c1d7fa1 95rootfs-block/block-genrules.sh: Use > instead of >>
trivial, blocksymlink.sh shouldn't exist at this point.

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:51 +02:00
Michal Soltys 0216d1cda3 95rootfs-block/mount-root.sh: Rely on det_fs and wrap_fsck
Use common fsck and det_fs code. Verify filesystem type more
aggressively, which has a chance to be more resistant to
accidental mistakes.

Also, there's no need to generate custom fstab for the sake of fsck
anymore.

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:51 +02:00
Michal Soltys 8b2896f9fa 95fstab-sys: use det_fs and wrap_fsck
This patch mainly adds fsck functionality to fstab-sys, with additional
sanity checks (checking for device existence, verifying fstype via
det_fs).

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:50 +02:00
Michal Soltys e2c5015713 dracut-lib.sh: Add det_fs() and wrap_fsck()
Both functions will be used by rootfs-block and fstab-sys modules.

Both are based on code present in mount-root.sh, though few changes are
present.

det_fs:

will try to determine filesystem type for supplied device, even if it's
not auto. If fs cannot be detected, or if the detected one differs from
the supplied one - a warning is issued (so user can fix its stuff later)

wrap_fsck:

will call fsck for specific device with optionally additional
fsckoptions. The function returns fsck return value.

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:50 +02:00
Michal Soltys e639630da4 dracut-lib.sh: add vwarn() function
Similary to vinfo()

Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:50 +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
Harald Hoyer 683db19a7d base/module-setup.sh: only mkdir /lib, if it does not exist 2011-05-20 15:17:31 +02:00
Harald Hoyer 1021371daf i18n: disable systemd-vconsole-setup, until the tool is fixed 2011-05-20 15:17:31 +02:00
Harald Hoyer 6a0b3ccf4e busybox: install busybox to /usr/bin 2011-05-20 15:17:31 +02:00
Harald Hoyer 3da7836035 dracut: fix overlayfs paths 2011-05-20 13:00:46 +02:00
Harald Hoyer 23b28c0ab5 lvm/lvm_scan.sh: remove references to lvm-cleanup
lvm-cleanup was removed long time ago
2011-05-17 12:29:47 +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
Alan Pevec f7c05c5514 dmsquash-live/dmsquash-live-root: add missing changes for /run
Change to /run/initramfs/squashfs/ was not complete.
2011-05-12 14:28:04 +02:00
Harald Hoyer 29b10e65b1 dracut-functions: make local vars local and prefix with "_" 2011-05-12 11:06:47 +02:00
Harald Hoyer beb015706b dracut-lib.sh: warn, even if "quiet" is set 2011-05-11 20:19:13 +02:00
Harald Hoyer 3b403b32fc removed trailing whitespaces 2011-05-10 11:56:09 +02:00
Harald Hoyer da5f8554a4 ifcfg/write-ifcfg.sh: do not source net.*.override, if it doesn't exist 2011-05-10 10:55:48 +02:00
Amadeusz Żołnowski ba902275d5 new module - 91crypt-gpg
It's an extension to 90crypt module.  Adds support for GPG-encrypted
keys (symmetrically, of course).  Module is optional.
2011-05-06 12:23:52 +02:00
Amadeusz Żołnowski 3909d7edfc crypt: functions for ask-for-password and reading key
Asking for password and reading key parts are moved to separate
functions in crypt-lib.sh: ask_for_password and readkey.
2011-05-06 12:23:52 +02:00
Amadeusz Żołnowski 2f95d699dc crypt-lib.sh: 'command -v' preferred over 'type' 2011-05-06 12:23:51 +02:00
Harald Hoyer 3cf14ae1ae parse-kernel.sh: wrong index was used in for loop
Thanks Mike Snitzer <msnitzer@redhat.com>
2011-05-06 12:06:20 +02:00
Harald Hoyer 7c18802966 iscsi: find iscsi kernel modules by symbol names 2011-05-04 10:19:02 +02:00
Harald Hoyer 424ecce632 plymouth/gensplash: reset tty after plymouth messed with it 2011-05-03 14:49:45 +02:00
Harald Hoyer 6019e1053c 10i18n: do not use console_init shell script, if systemd-vconsole-setup
do not use console_init shell script, if systemd-vconsole-setup is
available
2011-05-03 14:49:44 +02:00
Harald Hoyer aad6898fe4 10i18n: s/systemd-vconsole/systemd-vconsole-setup/g 2011-05-03 10:34:06 +02:00
Harald Hoyer 44110df25a base/init: remove double nosuid from devtmpfs mount line 2011-05-03 09:59:15 +02:00
Harald Hoyer c99014d5ef console_init/plymouth: use systemd-vconsole, if available
also init the console before starting the plymouth daemon
2011-05-03 09:59:14 +02:00
Harald Hoyer ba7457ee00 network/parse-ip-opts.sh: fix ifname for ibft with all args 2011-05-02 11:30:29 +02:00
Harald Hoyer 7b069d5ea7 network/net-genrules.sh: also honor rename events 2011-05-02 11:29:58 +02:00
Marian Ganisin c34130f705 don't overwrite ifname=
[Harald Hoyer <harald@redhat.com>: replaced grep with strstr]
[Harald Hoyer <harald@redhat.com>: handle multiple ifname= arguments]
2011-05-02 11:28:29 +02:00
Marian Ganisin cc8f077e9f skip condition fixed 2011-05-02 11:28:22 +02:00
Marian Ganisin ccacb45c52 correct module name 2011-05-02 11:28:04 +02:00
Harald Hoyer 1325cddee9 let rpc user own /var/lib/rpcbind
https://bugzilla.redhat.com/show_bug.cgi?id=698160
2011-05-02 11:27:12 +02:00
Harald Hoyer 80df37f475 fcoe: moved edd detection to settled initqueue
At the time of modprobing edd, all pci devices must exist and have to be
initialized for the symlinks to work.
2011-05-02 11:25:13 +02:00
Harald Hoyer 4257798f8a fips: forward port RHEL-6 fips changes
- also support FIPS on separate LVM partition
- use small settle loop to get /boot
- "set -e" has no effect, if we use "||"
- make fips work with encrypted root and seperate boot
- moved to pre-pivot to support /boot in /
2011-05-02 11:15:46 +02:00
Harald Hoyer 12b9736228 dm: add 11-dm.rules for udev-168 and cleanup-db
add OPTIONS+="db_persist" to dm devices, to persist through a
udevadm info --cleanup-db
2011-05-02 10:55:44 +02:00
Amadeusz Żołnowski 64fcb3cce7 kernel-modules: inst modules.builtin if there's no modules.builtin.bin
Also report failure if none of them exist.
2011-04-28 15:44:54 +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 f024bf0dcd base, crypt: install umount, because it is used 2011-04-20 16:51:39 +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 e1f68dc6a0 mdraid/65-md-incremental-imsm.rules: s#$hookdir#/lib/dracut/hooks/ 2011-04-11 19:25:00 +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 3fc621ee45 iscsi/mount-lun.sh: use NEWROOT 2011-04-11 13:35:27 +02:00
Harald Hoyer 8234b92d85 crypt/cryptroot-ask.sh: check and use NEWROOT 2011-04-11 13:34:58 +02:00
Harald Hoyer 6822764f25 base/dracut-lib.sh: add ismounted() 2011-04-11 13:34:34 +02:00
Harald Hoyer 0d837ebf2a base/dracut-lib.sh: turn on PS4 for bash debugging 2011-04-11 13:34:06 +02:00
Harald Hoyer 8f5d36896d loginit: create pid and kill loginit by pid 2011-04-11 13:17:24 +02:00
Harald Hoyer e365864bbc removed switch_root.c 2011-04-11 13:12:30 +02:00
Harald Hoyer df60555037 precreate /run/udev/rules.d 2011-04-11 13:02:14 +02:00
Harald Hoyer 6730280c5b crypt/parse-crypt.sh: fixed rule creation
"\n" was missing
create rules file on tmp file and rename it later
2011-04-08 13:50:10 +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 a2cb4dbc82 base/dracut-lib.sh:incol2() return 1 on error 2011-04-08 13:27:07 +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 4abb498d79 initqueue: add "--finished" 2011-04-08 13:25:49 +02:00
Alan Pevec 93724aa28f dmsquash-live: hide plymouth while checking ISO
Fixes long-standing FIXME
Latest isomd5sum added an option to abort media check with ESC key,
but that key is taken by plymouth for switching to the detailed log
messages, making it impossible to abort checkisomd5.
Tested in text mode.
2011-04-08 10:54:05 +02:00
Harald Hoyer 2a72df9cf0 busybox/module-setup.sh: do not create absolute symlinks 2011-04-08 10:39:57 +02:00
Harald Hoyer d125a47061 mkdir always with -m 0755 2011-04-08 10:39:46 +02:00
Harald Hoyer 8daaa46478 loginit: fix loglevel 2011-04-08 10:39:40 +02:00
Harald Hoyer 02c1bd6bb6 fips: add "rd.fips.skipkernel" boot option 2011-04-08 10:27:32 +02:00
Harald Hoyer 1cd1da13da iscsi: add additional hardcoded modules
https://bugzilla.redhat.com/show_bug.cgi?id=692781
https://bugzilla.redhat.com/show_bug.cgi?id=689694
2011-04-08 10:26:33 +02:00
Harald Hoyer ea8ca78af0 crypt/parse-crypt.sh: fix udev rule creation 2011-04-08 10:23:58 +02:00
Harald Hoyer dc4fc03e4b fcoe/parse-fcoe.sh: s#source#.#g
dash does not understand "source"
2011-04-08 10:22:59 +02:00
Harald Hoyer 9853774351 base/init: reset PATH after the /run move 2011-03-31 14:10:22 +02:00
Harald Hoyer 79471f365e base/dracut-lib.sh: changed kmgs log levels
New kernel/dmesg understands syslog levels, so we log with "+24" to indicate
that dracut is a daemon (current init).
2011-03-31 13:12:38 +02:00
Harald Hoyer 98b108284c dmsquash-live/dmsquash-live-genrules.sh: fixed udev rule location
Fixed the rule directory to $UDEVRULESD
2011-03-31 08:24:15 +02:00
Harald Hoyer 8ee30d09a4 plymouth: use /run/plymouth/pid instead of /run/initramfs/plymouth 2011-03-30 16:24:57 +02:00
Harald Hoyer 01583ae4ad fips: fixed "boot=<dev>" handling 2011-03-30 14:57:01 +02:00
Harald Hoyer 249f8b5bfc base/init: fixed compat /dev/.initramfs copy 2011-03-30 03:23:37 +02:00
Harald Hoyer 4ad453445a base/dracut-lib.sh: relax getargbool value parsing
if a non-boolean value was specified, like "yes" or "no",
getargbool() would error, because we check for "$val -eq 0"
2011-03-30 01:45:17 +02:00
Harald Hoyer e620bb01da base/init: fix cdrom polling 2011-03-30 00:01:00 +02:00
Harald Hoyer 7931bf0420 plymouth gensplash: check for console_init before calling it
Thanks Jon Ander Hernandez!
2011-03-29 16:38:11 +02:00
Jon Ander Hernandez c174aea07d Ensure rpc_pipefs is mounted
While on some systems (like Fedora) rpc_pipefs is mounted
automatically when sunrpc module is loaded, on Debian based systems it
needs to be mounted manually.
2011-03-29 16:17:03 +02:00
Harald Hoyer 85323dcbb9 40network/dhcp-root.sh: s#initqueue-finished#initqueue/finished#g 2011-03-29 15:46:53 +02:00
Harald Hoyer dc36969ae1 02caps: changed pre-pivot priority to 00
caps should be dropped before any actions with the mounted rootfs happen
2011-03-28 20:33:20 +02:00
Harald Hoyer ec88eb91d6 10rpmversion/version.sh: version file moved to /lib/dracut 2011-03-28 20:26:29 +02:00
Harald Hoyer 5b2cc025f4 99base/init: fall back to manual cdrom polling 2011-03-28 17:52:33 +02:00
Harald Hoyer 1489c9b1af 40network: make dhclient mandatory again 2011-03-28 17:23:06 +02:00
Amadeusz Żołnowski 86d404513f 40network: install dhclient, brctl and ifenslave optionally
Warning given by check() function in case if any of those binaries
doesn't exist was removed, because it's produces by "dracut_install -o"
later.
2011-03-25 16:28:28 +01:00
Amadeusz Żołnowski d1ef3951f3 modules.d: logging functions adjusted to dracut-logger 2011-03-25 16:22:05 +01: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
Harald Hoyer c9f1e3d1f4 check for getarg() function before sourcing dracut-lib.sh
make use of "type getarg" to check, if we really need to source
dracut-lib.sh
2011-03-25 16:10:46 +01:00
Harald Hoyer e86a6d390d network: install brctl optionally 2011-03-25 15:44:00 +01:00
Harald Hoyer 4af5e99124 move dracut version file to /lib/dracut/dracut-$version 2011-03-25 15:44:00 +01:00
Harald Hoyer e43df9e342 base/init: fixed /dev/.initramfs creation, for no "/run" 2011-03-25 15:43:54 +01:00
Harald Hoyer 19f3a804e7 s#/dev/.run#/run#g
Move things where they really belong to.
2011-03-18 18:23:44 +01:00
Harald Hoyer 0afae1c7ce base/init: for udev > 166 we will create and use /dev/.run/udev/rules.d
See:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=e68b4c2857942257268134cf7028b80f5a6a8103;hp=98ab6a377285d5943563cfa397e8b350e43878ec
2011-03-16 21:24:57 +01:00
Harald Hoyer 29cfd6c80b syslog: fixed warn() and dwarning() calls 2011-03-15 19:51:07 +01:00
Will Woods fe17f4e86b dmsquash-live: use 'rootfs.img' for rootfs image name
Every image gets handled the same way regardless of filesystem, so
let's use a filesystem-neutral name (rather than adding new
lines for every fstype anyone might want to use).
2011-03-14 16:30:39 +01:00
Andrey Borzenkov 6927f09e1c cryptoroot-ask: limit number of plymouth password requests
Set number ot retries to 5 to align with non-plymouth case.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
2011-03-11 11:44:02 +01:00
Andrey Borzenkov 96d1d01572 cryptroot-ask: check that plymouth is running before use
Otherwise there is no way to skip pasword prompt. --has-active-vt
seems to correctly catch also the case when plymouthd is started
but splash is disabled.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
2011-03-11 09:43:44 +01:00
Harald Hoyer 77e607a3a7 prepare for future udev rules.d location
future udev will have rules.d in /dev/.run/udev/rules.d

Also remove compat symlinks, because we want to get rid of these files
anyway.
2011-03-10 19:19:09 +01:00
Harald Hoyer 1e2a167fe6 rootfs-block/mount-root.sh: rename flag file for fsck
/dev/.run/initramfs/fsck -> /dev/.run/initramfs/root-fsck
2011-03-10 19:17:23 +01:00
Harald Hoyer 2d7fe72bbb base/init: copy /init.log with rd.copystate=1 2011-03-10 19:16:29 +01:00
Harald Hoyer 529349c66d add caps module, to drop capabilities
This adds the following parameters:
rd.caps=1
	turn the caps module on/off
rd.caps.initdrop=cap_sys_module,cap_sys_rawio
	drop the specified comma seperated capabilities
rd.caps.disablemodules=1
	turn off module loading
rd.caps.disablekexec=1
	turn off the kexec functionality

If module loading is turned off, all modules have to be loaded in the
initramfs, which are used later on. This can be done with
"rd.driver.pre="
rd.driver.pre=autofs4,sunrpc,ipt_REJECT,nf_conntrack_ipv4,....

Because the kernel command line would get huge with all those drivers, I
recommend to make use of $initramfs/etc/cmdline.

So, all rd.caps.* and rd.driver.pre arguments are in caps.conf can be
copied to $initramfs/etc/cmdline with "-i caps.conf /etc/cmdline".

Also all modules have to be loaded in the initramfs via "--add-drivers".

The resulting initramfs creation would look like this:

  --add-drivers "autofs4 sunrpc ipt_REJECT nf_conntrack_ipv4 \
  nf_defrag_ipv4 iptable_filter ip_tables
  ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack
  ip6table_filter ip6_tables dm_mirror dm_region_hash dm_log uinput ppdev
  parport_pc parport ipv6 sg 8139too 8139cp mii i2c_piix4 i2c_core ext3
  jbd mbcache sd_mod crc_t10dif sr_mod cdrom ata_generic pata_acpi ata_piix
  dm_mod" \
  /boot/initramfs-caps.img
2011-03-10 17:22:56 +01:00
Harald Hoyer 7838ab5010 kernel-modules/module-setup.sh: fix instmods $filesystems
especially in host_only mode, $filesystems was not honored
2011-03-10 17:22:55 +01:00
Harald Hoyer 5078c98abe move insmodpost and blacklisting to 90kernel-modules
also correctly parse rd.driver.{blacklist,pre,post}
2011-03-10 17:22:25 +01:00
Harald Hoyer 4c4c8b7239 rd.driver.*: accept comma separated list
accept a comma seperated list of kernel drivers for
rd.driver.blacklist
rd.driver.pre
rd.driver.post
2011-03-10 14:11:42 +01:00
Harald Hoyer b177e9133e move all /dev/.initramfs to /dev/.run/initramfs
We want all "/var/run" information to live in /dev/.run, until the real
root is mounted.
Therefore we mount a tmpfs on /dev/.run, which can/will be bind/move mounted
on /var/run later on.
2011-03-10 12:40:47 +01:00
Amadeusz Żołnowski 9fe4f5ff25 crypt: installing all crypto kernel modules instead of few selected 2011-03-09 18:09:23 +01:00
Will Woods 0ddd68f7e6 Add support for in-initramfs live images with "root=live:/path/name.img"
This allows creation of initramfs images which contain a Live system.
The primary use for this is keeping very large initramfs-based systems
(e.g. anaconda, the Fedora installer) compressed in-memory, by using a
compressed filesystem image like squashfs or btrfs.

dmsquash-live-genrules.sh will initqueue dmsquash-live-root itself
(rather than making udev rules) if the given live "device" is actually
an existing, plain file.

parse-dmsquash-live.sh will only accept paths that end in ".img".
dmsquash-live-root will only handle images named "*squashfs.img",
"*ext3fs.img", or "*btrfs.img".
2011-03-09 12:10:22 +01:00
Will Woods 533318113b Look for btrfs.img in dmsquash-live-root
Btrfs is an excellent option for the root fs image for live systems,
especially since it does its own transparent compression.
2011-03-09 12:09:34 +01:00
Will Woods a5e33c7d6f Use 'btrfs' command rather than 'btrfsctl', and install btrfs driver
btrfsctl is being replaced by the btrfs command in the upstream
tools, so change accordingly. Also, if we're using the btrfs module
we should probably make sure the btrfs driver gets installed.
2011-03-09 12:09:29 +01:00
Will Woods dfec8467b9 Change EXT3FS to FSIMG
Change the EXT3FS variable to FSIMG, since we might want to use other
filesystems as our live root. Change comments to reflect this fact.
2011-03-09 12:09:24 +01:00
Will Woods 44159d0598 Make dmsquash-live install the squashfs driver
dmsquash-live uses squashfs, so let's make sure the driver is installed
2011-03-09 12:09:20 +01:00
Will Woods 3d88d27810 Fix bash logic typo/buglet ([ condition ] & expression) 2011-03-09 12:08:59 +01:00
Amadeusz Żołnowski b20ff981c4 crypt-lib.sh: moved IFS=: from before 'read' to before 'while'
Some versions of dash don't behave as expected with code like this:

while IFS=: read a b c; do
    blah
done

Thanks to Eric Mertens who identified the issue.
2011-03-07 13:56:41 +01:00
Harald Hoyer 535ad9d1fb dracut-lib: improve die() logging 2011-03-07 13:37:22 +01:00
Harald Hoyer a382492bf3 init: improve emergency logging 2011-03-07 13:37:22 +01:00
Harald Hoyer 8be12be16a biosdevname: be verbose about biosdevname activation 2011-03-07 13:37:22 +01:00
Harald Hoyer 6fecffaab5 fcoe: add EDD parsing
[backport of 70dfe537]
2011-03-07 13:37:21 +01:00
Harald Hoyer 6767fdaaed lvm: move emergency script from 00 to 90
[forward port of cfb4747e]
2011-03-07 13:37:21 +01:00
Harald Hoyer fcbcc89bb2 crypt: fix emergency script generation
[ forward port of e45a2dba]
2011-03-07 13:37:20 +01:00
Harald Hoyer 38ba0d7a62 network: add iBFT interface configuration
[forward port of 0828d4c3574693ae80c217229e1bba6948dc9509]
2011-03-07 13:37:20 +01:00
Harald Hoyer 10b5dca0f7 fips/fips.sh: do not load tcrypt with "noexit" parameter
"noexit=1" is the default mode for the tcrypt module now.

[forward ported 7e7308158c9149c33309c0d36a6e1126e690fb58]
2011-03-07 13:37:20 +01:00
Harald Hoyer b60d5e90a5 fips/fips.sh: die(), if boot=<device> is not present or has wrong format 2011-03-07 13:37:19 +01:00
Harald Hoyer 674bdee804 fips/fips.sh: only trigger udev, if device node of boot is not present 2011-03-07 13:37:19 +01:00
Amadeusz Żołnowski 5d72984a01 Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install rules:
10-dm.rules
  11-dm-lvm.rules
  13-dm-disk.rules
  95-dm-notify.rules

but provides only 64-device-mapper.rules combining more or less the
above rules files.
2011-03-04 13:07:28 +01:00
Harald Hoyer 9d49507f80 kernel-modules: add hid-cherry hid-logitech hid-microsoft kbd drivers 2011-02-23 16:34:23 +01:00
Harald Hoyer 7d4f1101bc add missing editor format commands 2011-02-23 09:41:08 +01:00
Harald Hoyer 8ce58f1f42 add missing shebang 2011-02-23 09:38:25 +01:00
Harald Hoyer 2826a877af 90lvm/lvm_scan.sh: removed garbage line 2011-02-22 18:40:40 +01:00
Harald Hoyer 53570e16c3 90lvm/lvm_scan.sh: fixed lvm version parsing 2011-02-22 17:45:11 +01:00
Harald Hoyer 94cce410aa vconsole.font.unicode -> vconsole.unicode 2011-02-21 09:23:27 +01:00
Andrey Borzenkov 06e07df001 fix c0a82e271e
Let inst_key_val usage agree with above patch :)

Also UNICODE is rather global console property, not font specific
(and if anything, is rather keyboard specific). Let it be just
vconsole.unicode

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
Cc: initramfs@vger.kernel.org
2011-02-21 09:21:22 +01:00
Harald Hoyer 9edf1b206b init: set cdrom polling in kernel
and reset to -1 after we are done.
2011-02-18 13:27:31 +01:00
Harald Hoyer b282107fa9 lvm: use --sysinit, if lvm version >= v2.02.65 2011-02-18 10:58:39 +01:00
Harald Hoyer 0ce274f02b selinux: turn off selinux by default
In Fedora selinux is now handled by systemd. If you want to enable
selinux by default, just add it to your /etc/dracut.conf.d/01-dist.conf
with:
add_dracutmodules+=" selinux "
2011-02-18 09:44:47 +01:00
Harald Hoyer c0a82e271e i18n: default to vconsole.font.unicode=1 2011-02-18 09:37:11 +01:00
Harald Hoyer ebaed7d51f i18n: fixed config file parsing in hostonly mode
I accidently removed some parenthesis.
2011-02-18 09:33:06 +01:00
Harald Hoyer 1cedde0681 plymouth: touch /dev/.systemd/plymouth
until plymouth does it itsself, touch /dev/.systemd/plymouth
https://bugzilla.redhat.com/show_bug.cgi?id=676302
2011-02-09 13:22:49 +01:00
Harald Hoyer 71df3c4329 renamed module-info.sh to module-setup.sh 2011-02-02 16:35:18 +01:00
Harald Hoyer b9d7fda0e1 selinux: call emergency_shell for failures 2011-02-02 15:10:42 +01:00
Harald Hoyer e6752f1a6c fips: add aes-xts module 2011-02-02 14:48:37 +01:00
Harald Hoyer 76c4613abc multipath: use new "-B" parameter 2011-02-02 13:56:04 +01:00
Harald Hoyer 7238aa0cf0 base/init: do not poll cdrom, if kernel supports polling 2011-02-02 13:56:03 +01:00
Harald Hoyer 95d2dabc25 replaced check,install,installkernel with module-info.sh 2011-02-02 13:56:03 +01:00
Harald Hoyer 07caee2662 add 97biosdevname dracut module 2011-01-26 13:01:10 +01:00
Harald Hoyer b43f4df540 iscsi: changed parameters to new rd.iscsi style 2011-01-25 11:53:52 +01:00
Harald Hoyer 444061de67 base/init: drop "noexec" from /dev/shm 2011-01-25 10:35:20 +01:00
Harald Hoyer ee1fa07f3d base/install: create emergency subdir 2011-01-24 13:41:24 +01:00
Harald Hoyer 2ca68bb82b base/install: make install of "less" optional 2011-01-07 12:05:42 +01:00
Harald Hoyer e2d86d001a fips: s/==/= 2011-01-03 09:48:37 +01:00
Harald Hoyer 8082a0946e multipath/install: install the complete /etc/multipath directory
Resolves: rhbz#630911
2010-12-06 16:20:43 +01:00
Harald Hoyer 1b434f1ba9 mdraid/parse-md.sh: create new rules, then mv to old one
If udevd is already running, then we should assemble the new rules files
in a seperate file first, before calling it *.rules

Resolves: rhbz#595096
2010-12-06 16:12:54 +01:00
Harald Hoyer 3003cfdf9e kernel-modules/installkernel: add hid_sunplus to keyboard drivers 2010-12-02 17:13:15 +01:00
Christian Heinz ab9b7eee0a fix installation of `modules.builtin.bin'
`modules.builtin.bin' is installed like a regular file, thereby ending
up in the wrong place when `--kmoddir' is in effect. Fix this by
specifying the installation destination.
2010-11-26 09:36:18 +01:00
Tomasz Torcz 3f003263d2 - move btrfs rules order from 40 to 80 for ID_FS_TYPE to work (which is populated by 60-persistent-storage.rules) 2010-11-24 19:02:13 +01:00
Lubomir Rintel ae202ef02e Search in for KMS-capable drivers in extra/ as well
User can have an out-of-tree video driver supporting KMS installed;
Intel GMA500 drivers from RPM Fusion are one example of such module.
2010-11-19 19:08:03 +01:00
Harald Hoyer 7f7a91b75f base/init: fix init executable check 2010-11-19 13:40:34 +01:00
Harald Hoyer 770b796e52 base/init: honor old "real_init=" 2010-11-19 13:37:17 +01:00
Harald Hoyer b2415f4414 base: use systemd-timestamp for RD_TIMESTAMP, if possible 2010-11-18 12:28:21 +01:00
Harald Hoyer 2eea164db7 base/init: do not set umask
somehow /dev/dri gets created with the wrong permissions
https://bugzilla.redhat.com/show_bug.cgi?id=626559
2010-11-17 17:37:22 +01:00
Amadeusz Żołnowski 7a8a33b6cd dracut-lib.sh: splitsep fix 2010-11-16 10:30:33 +01:00
Harald Hoyer 91f4d45f93 crypt: change /tmp/luks.keys seperator from "|" to ":"
Do it like on the kernel command line, so we only have one forbidden
character.
2010-11-12 14:11:33 +01:00
Amadeusz Żołnowski 8844cd6b6c 90crypt: probe for keydev asynchronously; changed kernel arg
New kernel argument syntax for LUKS-keydev is introduced:

  rd.luks.key=<key_path>[:<key_dev>[:<luks_dev>]]

Unfolding <key_dev> in BNF:

  <key_dev> ::= "UUID=" <uuid> | "LABEL=" <label> | <kname>

Where <kname> matches following regular expression:

  ^/dev/.*

<kname> need to be a character device and not a symlink for now.

For every rd.luks.key argument udev rule is created.  That rule runs
test to check whether matching device contains <key_path>.  If it does
it's applied to matching <luks_dev>.
2010-11-12 14:08:08 +01:00
Amadeusz Żołnowski ccb0ab7348 99base/dracut-lib.sh: 5 new functions & 1 modified
New:
  str_starts, str_replace
  funiq - print new unique file name
  mkuniqdir - create and print new unique dir
  splitsep - splits given string 'str' with separator 'sep' into vars
  udevmatch - create udev rule match for a device

Modified:
  foreach_uuid_until - use $___ as a place holder
2010-11-12 14:08:08 +01:00
Harald Hoyer 5023964844 move initlog.pipe to /dev/.initramfs 2010-11-11 11:08:40 +01:00
Harald Hoyer 4af673c3f8 base/init: merge mkdir and add more mount options 2010-11-11 11:08:40 +01:00
Harald Hoyer 5dc6f24085 base/loginit: s/==/=
stupid bug!
2010-11-10 22:50:20 +01:00
Harald Hoyer e53fdd1c35 rootfs-block/mount-root.sh: remove $NEWROOT/.autofsck if possible 2010-11-10 22:10:54 +01:00
Harald Hoyer 040f3d2ffc base/init: re-add initqueue-finished 2010-11-10 21:27:33 +01:00
Harald Hoyer d884af8077 rootfs-block/mount-root.sh: remove $NEWROOT/{.autofsck,forcefsck} if possible 2010-11-10 20:47:15 +01:00
Harald Hoyer a4f88b8a49 rootfs-block/mount-root.sh: set prompt in emergency shell 2010-11-10 20:45:02 +01:00
Harald Hoyer 3d7c58ca1e rootfs-block/mount-root.sh: echo fsck return code to
/dev/.initramfs/fsck
2010-11-10 20:43:22 +01:00
Harald Hoyer ce51f3be11 rootfs-block/mount-root.sh: fixed filesystem type udev parsing 2010-11-10 20:12:05 +01:00
Harald Hoyer 4cba811f6c rootfs-block/mount-root.sh: correctly printf to fstab 2010-11-10 20:11:31 +01:00
Harald Hoyer 85de3d281a rootfs-block/mount-root.sh: only warn if fsck returned != 0 2010-11-10 20:06:34 +01:00
Harald Hoyer 3817c2f138 rootfs-block/mount-root.sh: default rootfs to auto, even without fstab 2010-11-10 20:01:30 +01:00
Harald Hoyer 13af399f65 rootfs-block/mount-root.sh: clear fsckoptions 2010-11-10 19:58:15 +01:00
Peter Rajnoha c2c3108882 *.rules: honor DM_UDEV_DISABLE_OTHER_RULES_FLAG
honour the DM_UDEV_DISABLE_OTHER_RULES_FLAG which is set by
libdevmapper/LVM directly for devices that should be skipped.
2010-11-10 18:14:59 +01:00
Harald Hoyer cd7ee4913d busybox/check: disable module by default and check for busybox binary 2010-11-10 16:38:40 +01:00
Andrey Borzenkov 856285aa90 resume: merge uswsusp module into resume
uswsusp almost completely duplicates resume; merge them.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
2010-11-10 16:07:01 +01:00
Andrey Borzenkov 0e08f1de8d 95rootfs-block: fix missing root when label contains slash
It is not clearly documented, but apparently fsck
(or, probably, getmntent) is using backslash as
escape character.

Label containing slash is converted to \x2f but '\'
is eaten by fsck later. Escape '\' before writing
into fstab.

v2:
- fix sed expression
- use printf instead of echo because echo eats '\' as well

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
2010-11-10 16:03:14 +01:00
Andrey Borzenkov 161da365e2 i18n: do not use systemd-vconsole-setup
systemd-vconsole-setup was not designed to be run from udevd.
It checks locale environment to decide, whether UNICODE should
be enabled or disabled. Normally environment is setup by
systemd; but the only environment available in udev rules is
those from device properties. It means systemd-vconsole-setup
always assumes default C locale and disables UNICODE.

Revert to using built-in console_init which explicitly
imports locale settings from /etc/vconsole.conf. Alternative
is to revert 6545b9d7 and call console_init directly :)

Additionally patch fixes console_init to use new namespace as
well as ensures that default font is always installed.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
2010-11-10 15:53:04 +01:00
Daniel Drake dbcc4e94c5 Add busybox shell replacements module
On the OLPC XO-1, there is a noticable delay during boot while the
initramfs is loaded from disk and uncompressed, so we have an interest
in making it small. We are also pushed for disk space.

Using busybox instead of all the regular tools saves a lot of space.
I have not tried every module but the basics are working with busybox's
replacements. Our initramfs is now down to 1.9mb.
2010-11-10 15:49:48 +01:00