inst* functions and dracut-install now accept the "-H" flag, which
logs all installed files to /lib/dracut/hostonly-files. This is used
to remove those files, if rd.hostonly is given on the kernel command line.
This patch adds option "-m|--mod" to lsinitrd to list dracut
modules in the image because sometimes having an option to
only list the dracut modules in the image could be handy.
Sample output:
--------------
[hbathini@localhost dracut]$ sudo ./lsinitrd.sh initramfs-3.11.10-100.fc18.x86_64.img -m
Image: initramfs-3.11.10-100.fc18.x86_64.img: 33M
========================================================================
Version: dracut-029-1.fc18.2
dracut modules:
i18n
network
ifcfg
drm
plymouth
btrfs
crypt
dm
dmraid
kernel-modules
lvm
mdraid
cifs
iscsi
nfs
resume
rootfs-block
terminfo
udev-rules
biosdevname
systemd
usrmount
base
fs-lib
shutdown
========================================================================
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
lsinitrd (and hence dracut) currently fail to list the contents of any
LZO-compressed image, and merely spit out misleading xzcat errors.
I guess no-one actually uses them.
rd.iscsi.ibft[=1] should be used instead.
Thing is, 'ip=ibft' is not really an ip setting, but rather a marker
that iBFT should be evaluated.
Also removed the trigger of the warning:
"Warning: Please supply bootdev argument for multiple ip= lines"
When a bonded interface is brought up, any slaves included in the bond
have their hardware address set to that of the bond master. Although
this allows an interface to be brought up on start up, when the
configuration file is imported into the booted system it prevents
the bonded interface being successfully restarted.
The fix involves obtaining the hardware address of the slaves before
they are added to the bond and then using this value in the
configuration file.
Currently the block driver detection for generic initrd doesn't include
the SD/MMC drivers so we fail to boot generic images on any device using
those platforms as boot devices when using a generic initrd. Add logic
to detect those modules. This primarily fixes embedded ARM devices but
also likely intel tablets/dev boards and enterprise hypervisors that
have the ability to boot from SD.
Also the ahci_init_controller misses a number of drivers that use the
libahci_platform module for the init so this fixes some missing achi
moduless too.
Finally it cleans up the ARM storage module hacks that the above now
deals with in a more generic manner.
Signed-off-by: <pbrobinson@gmail.com>
The info message written by require_binaries() was a bit frighten to
users. So just be a little bit more verbose.
If you have ideas on how to improve the message for these "soft"
dependency modules, please submit patches.
It turns out that commit f30b74e (dracut-initqueue service runs before
remote-fs-pre.target) is partial fix for remote fs mounts. Because no
one pulls in remote-fs.target, we can never start remote fs mounts.
Now pull in remote-fs.target in dracut-pre-pivot.
Signed-off-by: WANG Chao <chaowang@redhat.com>
cmdline() prints empty "resume=" options for non-persistent swap
devices, for example zram. Add a check for that.
This patch also fixes printf formatting and removes unused variables.
Without the 59-scsi-sg3_utils.rules udev-rule a couple of devices are missing
in /dev/disk/by-id.
If the luks device is specified by-id in /etc/crypttab and rd.luks.uuid not
passed as a commandline parameter during boot, systemd tries to start its
crypto services which depend on those missing devices until it times out and
exits to dracut rescue shell.
Signed-off-by: Julian Wolf <juwolf@suse.com>
The rootfs-generator was installed in the wrong path
in the initrd, cause it never to be run.
References: bnc#878714
Signed-off-by: Hannes Reinecke <hare@suse.de>
for a variable with spaces, e.g.:
EXT_KEYMAPS='backspace keypad euro2'
The following would occur:
print_vars: eval printf -v _value %s '$EXT_KEYMAPS'
print_vars: printf -v _value %s backspace keypad euro2
print_vars: [[ -n backspacekeypadeuro2 ]]
print_vars: printf '%s=\"%s\"\n' EXT_KEYMAPS backspacekeypadeuro2
Thanks to Sebastian Köln for the fix!
By convention, strstr should be a literal string match. Previously, it
would match as a glob pattern. Some code used that, so add new
functions strglob and strglobin to do what that code expects, and
specify them tightly too. strglob tests whether the glob pattern
matches the entire string (the name strglob is also used in the yorick
language, and that's what it does there), while strglobin tests whether
the glob pattern matches anywhere in the string.
Also tightens str_starts, str_ends, and str_replace to deal with
literal strings only. In a quick grep I did not find code that depended
on these functions matching globs.
Changes the call sites where strstr was used with glob patterns to use
strglobin or strglob as the intention seemed to be (or, in one case,
strstr with the * removed as it did not affect the result anyway).
With the following commit, dracut doesn't mount anything from /etc/fstab
commit e920bfb
Author: WANG Chao <chaowang@redhat.com>
Date: Tue Apr 1 15:20:49 2014 +0800
fstab: do not mount and fsck from fstab if using systemd
But systemd doesn't mount nfs at all, because no unit is pulling in
remote-fs.target.
dracut must pull in these remote fs mount and all these remote mounts
should start only after network is up (ie. after dracut-initqueue).
Signed-off-by: WANG Chao <chaowang@redhat.com>