4 weeks comment out travis CI master
Harald Hoyer [Mon, 22 Jul 2019 12:39:42 +0000 (14:39 +0200)] comment out travis CI

4 weeks agoMakefile: fix VERSION
Harald Hoyer [Mon, 22 Jul 2019 12:27:51 +0000 (14:27 +0200)] 
Makefile: fix VERSION

4 weeks agodracut.spec: add 06rngd
Harald Hoyer [Mon, 22 Jul 2019 12:07:26 +0000 (14:07 +0200)] 
dracut.spec: add 06rngd

4 weeks agoInclude systemd volatile root service and binary
Paul Robins [Sun, 12 May 2019 17:00:37 +0000 (18:00 +0100)] 
Include systemd volatile root service and binary

4 weeks agoConsollidate the qemu virtualization detection
Daniel Molkentin [Tue, 14 May 2019 12:17:14 +0000 (14:17 +0200)] 
Consollidate the qemu virtualization detection

Eventually, we could add a full virt detection routine.
This would be useful e.g. to determine inclusion of
ucode for hostonly setups.

4 weeks agofips: split loading the crypto modules and checking the kernel
Lukas Nykryn [Tue, 14 May 2019 07:23:55 +0000 (09:23 +0200)] 
fips: split loading the crypto modules and checking the kernel

In e54ab383 we moved the fips script to a later pahse of boot, since
the /boot might not be available early on.

The problem is that systemd-cryptsetup* services could be run now
started before the do_fips is executed and need the crypto modules
to decrypted the devices.

So let's split the do_fips and load the module before udev does the

4 weeks agonet-lib: strstr is not for globs
Lukas Nykryn [Tue, 21 May 2019 15:58:38 +0000 (17:58 +0200)] 
net-lib: strstr is not for globs

4 weeks agoReplace $(arch) by $(uname -m)
Jonas Witschel [Wed, 22 May 2019 12:39:46 +0000 (14:39 +0200)] 
Replace $(arch) by $(uname -m)

4 weeks ago99base: Don't let vinfo return 1
Arnaud Rebillout [Tue, 28 May 2019 03:46:03 +0000 (10:46 +0700)] 
99base: Don't let vinfo return 1

When DRACUT_SYSTEMD is set and DRACUT_QUIET=yes, vinfo returns 1. This
is a problem for hooks which end with vinfo, as then the hook returns 1.
Especially problematic if this is a shutdown hook, as it will be
restarted again and again.

This commit fixes that.

Signed-off-by: Arnaud Rebillout <>
4 weeks agomove setting the "systemdutildir" variable before it's used
Дамјан Георгиевски [Mon, 27 May 2019 16:22:14 +0000 (18:22 +0200)] 
move setting the "systemdutildir" variable before it's used

on line 1086 it's used to check for the uefi_stub:

so it needs to be defined before that

4 weeks fix EFI directory if ESP is mounted to /efi
Jonas Witschel [Wed, 22 May 2019 13:09:28 +0000 (15:09 +0200)] fix EFI directory if ESP is mounted to /efi

The EFI executables produced by dracut --uefi must be placed in the
subdirectory /EFI/Linux of the EFI system partition (ESP) according to
the Boot Loader Specification, see

This is done correctly for the mount points /boot and /boot/efi, but for
the mount point /efi, the files are placed in /efi/Linux instead of the
correct /efi/EFI/Linux. This commit fixes the directory so that the EFI
executables are picked up correctly by conforming boot loaders.

Apart from complying to the specification, the change is also in line
with the commit message of 5c57209ba5ef36f8856b4ea1694de8e1da508b71
(" add default path for --uefi") which introduced this feature
as well as the documentation in dracut.8.asc.

4 weeks agotest/MULTINIC: correctly note activated devices when using network-manager
Lubomir Rintel [Mon, 10 Jun 2019 14:05:49 +0000 (16:05 +0200)] 
test/MULTINIC: correctly note activated devices when using network-manager

The .did-setup files are not there. What is there is the NetworkManager
connection files.

4 weeks agotest/BONDBRIDGETEAMVLAN: don't assert against ifcfg files
Lubomir Rintel [Mon, 10 Jun 2019 14:05:23 +0000 (16:05 +0200)] 
test/BONDBRIDGETEAMVLAN: don't assert against ifcfg files

The network-manager module writes keyfiles instead of ifcfg files. Just
check whether the configuration got actually applied correctly.

4 weeks agotest/IFCFG: make sure the network-legacy plugin is being used
Lubomir Rintel [Mon, 10 Jun 2019 14:04:33 +0000 (16:04 +0200)] 
test/IFCFG: make sure the network-legacy plugin is being used

If the network-manager plugin is used instead, it wouldn't write out
ifcfg files and we wouldn't have anything to check.

While at that, also enable the test.

4 weeks agotest: copy BONDBRIDGETEAMVLAN to IFCFG
Lubomir Rintel [Mon, 10 Jun 2019 14:04:18 +0000 (16:04 +0200)] 

The IFCFG test will make sure the network-legacy plugin keeps writing
out correct ifcfg files.

This is a separate commit so that actual changes are visible in the
following one.

4 weeks agonetwork: parse root=dhcp also with network-manager module
Lubomir Rintel [Mon, 27 May 2019 09:12:22 +0000 (11:12 +0200)] 
network: parse root=dhcp also with network-manager module

Move the logic from network-legacy to common network code.

4 weeks agonetwork-manager: generate configuration with netroot=
Lubomir Rintel [Mon, 27 May 2019 10:43:59 +0000 (12:43 +0200)] 
network-manager: generate configuration with netroot=

If the root is on network, let nm-initrd-generator create configuration
even if none was explicitly specified on the command line.

Also do the same if /tmp/net.ifaces exists, because the anaconda plugin
creates an empty file in that location in hopes that will make us
configure the network.

4 weeks agonetwork-manager: also read out next-server from NM state
Lubomir Rintel [Mon, 27 May 2019 10:44:17 +0000 (12:44 +0200)] 
network-manager: also read out next-server from NM state

4 weeks agonetwork-manager: remove useless use of basename
Lubomir Rintel [Mon, 17 Jun 2019 08:07:38 +0000 (10:07 +0200)] 
network-manager: remove useless use of basename

4 weeks agotest/{10,12,13,14,17,30,31}: increase the disk sizes
Lubomir Rintel [Tue, 11 Jun 2019 07:56:13 +0000 (09:56 +0200)] 
test/{10,12,13,14,17,30,31}: increase the disk sizes

On Fedora 30 the paritition sizes turn out to be too small again:

  + mkdir -p /sysroot
  + mount /dev/dracut/root /sysroot
  + cp -a -t /sysroot /source/bin /source/dev /source/etc /source/lib /source/lib64 /source/proc /source/root /source/sbin /source/sys /source/tmp /source/usr /source/var
  cp: error writing '/sysroot/usr/lib64/': No space left on device
  cp: error writing '/sysroot/usr/lib64/': No space left on device

It turns out that there has been quite some size increase in some libraries,
notably glibc, though not all -- some even shrunk, ruling out a toolchain
problem. Here's are files over 1M we install on Fedora 30:

   f29    f30
  2.7M => 6.4M /usr/lib64/{ =>}
  3.1M => 6.0M /usr/lib64/
  2.0M => 3.5M /usr/lib64/{ =>}
  2.9M => 2.8M /usr/lib/systemd/{ =>}
  1.7M => 2.5M /usr/lib64/
  2.3M => 2.4M /usr/lib64/bind9-export/
  1.2M => 2.1M /usr/bin/bash
  1.1M => 1.4M /usr/lib64/
  1.2M => 1.4M /usr/lib64/
  612K => 1.1M /usr/lib64/

This increases the image sizes to accomodate for this. There's probably
little else we can do.

4 weeks ago95fcoe: load 'libfcoe' module as a fallback
Kairui Song [Wed, 12 Jun 2019 06:27:44 +0000 (14:27 +0800)] 
95fcoe: load 'libfcoe' module as a fallback

The kernel may only enable 'libfcoe' module. Some modules like bnx2fc
provides FCoE but only depend on 'libfcoe'. Loading 'fcoe' module may
fail but the kernel do support FCoE.

'libfcoe' will be installed as a dependency when installing block device
drivers if it's required. So no need to install it in installkernel.

Signed-off-by: Kairui Song <>
4 weeks agodracut-install: Add support for compressed kernel modules
Takashi Iwai [Wed, 22 May 2019 12:47:14 +0000 (14:47 +0200)] 
dracut-install: Add support for compressed kernel modules

When a module is compressed, uncompress it before packing into initrd.
Since initrd is already compressed, it makes no sense to put the
compressed module files.

The patch contains a slight refactoring and adds a helper function to
get the command for uncompressing a file per extension.

4 weeks ago35network-legacy: fix classless static route parsing
Frank Deng [Sat, 15 Jun 2019 20:35:42 +0000 (13:35 -0700)] 
35network-legacy: fix classless static route parsing

4 weeks agoTEST-70-BONDBRIDGETEAMVLAN: get rid of duplicate makefile
Lubomir Rintel [Fri, 21 Jun 2019 11:41:51 +0000 (13:41 +0200)] 
TEST-70-BONDBRIDGETEAMVLAN: get rid of duplicate makefile

4 weeks agofs-lib: drop a bashism
Lubomir Rintel [Fri, 21 Jun 2019 16:39:48 +0000 (18:39 +0200)] 
fs-lib: drop a bashism

Bash 5 apparently longer propagates variable assignments to local variables
in front of function calls when in POSIX mode:

  [lkundrak@demiurge ~]$ cat
  print_VAR () {
          echo "$VAR";

  testfunc () {
          local VAR="OLD"
          VAR=NEW print_VAR

  [lkundrak@demiurge ~]$ bash4 --posix
  [lkundrak@demiurge ~]$ bash5 --posix
  [lkundrak@demiurge ~]$ bash5
  [lkundrak@demiurge ~]$

It works the way it did in Bash 4 in non-POSIX mode, for external programs,
or for non-local variables. Don't ask me why -- it's probably some
compatibility thing for some sad old people.

However, this precisely happens when fsck_single() is calling into the
fsck_drv_com(), assigned to _drv by fsck_able(). That ruins the
TEST-70-BONDBRIDGETEAMVLAN test's server and probably more.

Let's pass the fsck driver binary via the function argument instead. It's
less messy anyway.

4 weeks ago95iscsi: Fix network setup code for iscsi
Kairui Song [Sun, 23 Jun 2019 12:22:34 +0000 (20:22 +0800)] 
95iscsi: Fix network setup code for iscsi

- The network script and config could be in
  "/etc/sysconfig/network-scripts", so try look for network config in
  all possible path.

- The regex used for sed is not working, so fix it too.

- Make bootproto a local variable

Signed-off-by: Kairui Song <>
4 weeks agotest: tell systemd to reboot on fatal errors
Lubomir Rintel [Wed, 26 Jun 2019 09:47:21 +0000 (11:47 +0200)] 
test: tell systemd to reboot on fatal errors

Otherwise systemd would freeze execution, causing the test to time out
instead of failing fast.

4 weeks agotest/TEST-14-IMSM: detect failure to compose the test setup root
Lubomir Rintel [Tue, 25 Jun 2019 15:39:57 +0000 (17:39 +0200)] 
test/TEST-14-IMSM: detect failure to compose the test setup root

The dracut-root-block-created line should not be created if we fail to copy
in the required files to sysroot. Let's turn on -e to trap failures and
poweroff on them, like some other tests do.

Also remove the &&. Not only it is unnecessary with -e, but defeats it.
From bash(1):

  The shell does not exit if the command that fails is [...] part of any
  command executed in a && or || list except the command following the
  final && or || [...]

4 weeks agoadd support for creating secureboot signed UEFI images
Max Resch [Sun, 30 Jun 2019 10:16:22 +0000 (12:16 +0200)] 
add support for creating secureboot signed UEFI images

4 weeks agoask for a password on readkey failure
Max Resch [Tue, 2 Jul 2019 23:22:24 +0000 (01:22 +0200)] 
ask for a password on readkey failure

continue asking for a password if readkey for cryptsetup input failed,
e.g. wrong password in the password file

4 weeks agolsinitrd handle UEFI created with dracut --uefi
Max Resch [Wed, 3 Jul 2019 18:53:41 +0000 (20:53 +0200)] 
lsinitrd handle UEFI created with dracut --uefi

4 weeks agorngd: new module running early during boot to help generating entropy
Renaud Métrich [Thu, 11 Jul 2019 08:50:40 +0000 (10:50 +0200)] 
rngd: new module running early during boot to help generating entropy
when system's default entropy sources are poor (e.g. use of SSD disks or
UEFI RNG not available)

On systems with low entropy at boot, the boot can take up to several
hours, specially when NBDE is used (e.g. clevis) which makes use of
the random number generator.

Enabling rngd service at boot early, because dracut-initqueue runs,
enables to initialize the random number generator in a couple of seconds
instead of minutes or hours.

Signed-off-by: Renaud Métrich <>
4 weeks agodebug: Add dd into debug module
Michal Koutný [Fri, 12 Jul 2019 13:46:15 +0000 (15:46 +0200)] 
debug: Add dd into debug module

When at it also deduplicate the list of installed utilities.

4 weeks agotest/TEST-17-LVM-THIN: fail setup if we run out of space in the thin pool
Lubomir Rintel [Wed, 26 Jun 2019 14:42:04 +0000 (16:42 +0200)] 
test/TEST-17-LVM-THIN: fail setup if we run out of space in the thin pool

This condition is rather difficult to detect -- the writes will just remain
queued and get lost on shutdown, resulting in a corrupt filesystem.

4 weeks remove trailing "|"
Harald Hoyer [Fri, 19 Jul 2019 13:56:42 +0000 (15:56 +0200)] remove trailing "|"

caused by commit d10f6f836

4 weeks ago99base: enable the initqueue in both 'dracut --add-device' and 'dracut --mount' cases.
Lianbo Jiang [Mon, 13 May 2019 08:09:25 +0000 (16:09 +0800)] 
99base: enable the initqueue in both 'dracut --add-device' and 'dracut --mount' cases.

The commit 9f3c31cd8d68 ("99base: enable initqueue if extra devices are added")
only covers 'dracut --add-device' case, but it did not cover 'dracut --mount'
case, which causes the kdump failure in the Amazon virtual machine.

Lets make sure that the initqueue is enabled in both cases in order to wake up
the device in time.

Reported-by: Xiao Liang <>
Signed-off-by: Lianbo Jiang <>
4 weeks agoMerge branch 'ryncsn-optimization'
Harald Hoyer [Fri, 19 Jul 2019 13:48:37 +0000 (15:48 +0200)] 
Merge branch 'ryncsn-optimization'

4 weeks agoMerge branch 'optimization' of into ryncsn-optimization
Harald Hoyer [Fri, 19 Jul 2019 13:48:22 +0000 (15:48 +0200)] 
Merge branch 'optimization' of into ryncsn-optimization

4 weeks agosquash: also squash systemctl if switch-root is not needed
Kairui Song [Wed, 13 Mar 2019 09:36:53 +0000 (17:36 +0800)] 
squash: also squash systemctl if switch-root is not needed

systemctl need to be accessible on switch-root, but we unmount the
squash image on switch-root, so it will fail. systemctl depends on a lot
of libraries, squash them can save more RAM. So allow modules
(eg. kdump) to tell dracut that switch-root will be intercepted,
then we don't need to take care of that.

Signed-off-by: Kairui Song <>
4 weeks agosquash: fix and simplify required_in_root
Kairui Song [Mon, 11 Mar 2019 11:46:19 +0000 (19:46 +0800)] 
squash: fix and simplify required_in_root

If required target is a symbol link, create the link then following the
link. If it's a directory, create new directory, else just move it.

Signed-off-by: Kairui Song <>
4 weeks agosquash: squash systemd binary and udevadm
Kairui Song [Mon, 11 Mar 2019 10:44:02 +0000 (18:44 +0800)] 
squash: squash systemd binary and udevadm

systemd binary and udevadm are not needed to be outside the squash
image. Some binaries are kept outside because they are required before
mounting the image, or after umounting the image (when switching root),
or they may block umounting the image. But we are using lazy umounting,
so actually nothing will block the umount.

Keep more binaries outside the squash image won't hurt but cost extra
memories, the idea of squash image is to save memory usage.

So, there is no reason to keep udevadm outside, that should be a debug
left over. For systemd binary, it's running when switch root happens,
But we have lazy umounted the image and overlay, once systemd process
exec the new systemd in new root, everything will be cleared by kernel.

Also tidy up the comment make it less confussing.

Signed-off-by: Kairui Song <>
4 weeks record the actual hostonly modules for hostonly mode
Kairui Song [Tue, 7 May 2019 11:15:42 +0000 (19:15 +0800)] record the actual hostonly modules for hostonly mode

Previous in commit 7047294, dracut will include the loaded kernel module
list in initramfs, so other tools could check if the loaded kernel
module is changed and rebuild the host only initramfs in case some
module required to boot the machine is missing due to host only install.

It's better to use modalias list generated by dracut-install, that
list includes the device modalias list combined with current loaded
kernel module list. In this way, if any kernel module is yet to be
loaded when the initramfs is built, or got unloaded by accident the
module list will not change. This make the list more stable over
initramfs builds.

Signed-off-by: Kairui Song <>
4 weeks ago99squash: fail early if can't install require modules in initramfs
Kairui Song [Tue, 25 Dec 2018 09:53:24 +0000 (17:53 +0800)] 
99squash: fail early if can't install require modules in initramfs

insmods will consider all arguments as optional modules by default, but
for squash module, all listed modules are required, if any of them is
missing the initramfs won't boot. So pass the '-c' argument to let instmos
know all those modules are mandatory, it will fail and give an error if
it failed to install any of those modules.

4 weeks Fix udevdir detection
Hongxu Jia [Wed, 3 Apr 2019 07:24:47 +0000 (15:24 +0800)] Fix udevdir detection

In commit [9d1b81c improve udevdir and systemdutildir
fallback logic] , it checked a common binary `collect' to location

But upstream systemd drop binary `collect' since systemd v240

So check binary `ata_id' to instead.

Signed-off-by: Hongxu Jia <>
5 weeks simplify get_kernel_version
Daniel Molkentin [Thu, 18 Jul 2019 08:14:37 +0000 (10:14 +0200)] simplify get_kernel_version

This generalizes the naming and provides a workaround for compressed
kernels on s390.

Reference: bsc#1139939

5 weeks agotests: Ignore .testdir
Daniel Molkentin [Thu, 18 Jul 2019 09:16:18 +0000 (11:16 +0200)] 
tests: Ignore .testdir

5 weeks ago95fcoe: Fix startup when fcoe module is included
Daniel Molkentin [Thu, 18 Jul 2019 09:29:29 +0000 (11:29 +0200)] 
95fcoe: Fix startup when fcoe module is included

The hook is sourced, and hence must not contain
exit 0 calls. Otherwise, the cmdline sequence will be interupted,
and no error will be reported to systemd. Use return instead.

Reference: boo#1136977

5 weeks agocall netroot on wicked dhcp setup
Thomas Blume [Thu, 4 Jul 2019 07:10:30 +0000 (09:10 +0200)] 
call netroot on wicked dhcp setup

5 weeks agonfsroot follow ifcfg settings for boot protocol
Thomas Blume [Wed, 19 Jun 2019 13:15:57 +0000 (15:15 +0200)] 
nfsroot follow ifcfg settings for boot protocol

5 weeks agodracut-install: Add support for compressed firmware files
Takashi Iwai [Wed, 8 May 2019 05:12:06 +0000 (07:12 +0200)] 
dracut-install: Add support for compressed firmware files

The upcoming kernel will have a support for loading compressed
firmware files, and this patch corresponds to that kernel change.
When a firmware file with the extra .xz extension is found, dracut
copies to initrd as fallback.  Since initrd itself is compressed, the
file is uncompressed in initrd beforehand.

5 weeks ago01fips: add cfb cipher
Lukas Nykryn [Tue, 16 Jul 2019 07:27:01 +0000 (08:27 +0100)] 
01fips: add cfb cipher

Required by FIPS standard

5 weeks agoAdd support for riscv64
Andreas Schwab [Mon, 8 Jul 2019 08:24:58 +0000 (10:24 +0200)] 
Add support for riscv64

6 weeks agotravis: run TEST-13-ENC-RAID-LVM on Fedora 29
Lubomir Rintel [Thu, 27 Jun 2019 14:22:04 +0000 (16:22 +0200)] 
travis: run TEST-13-ENC-RAID-LVM on Fedora 29

Systemd in Fedora 30 is broken at the moment.

6 weeks agotravis: run TEST-14-IMSM on Fedora 29
Lubomir Rintel [Thu, 27 Jun 2019 14:20:32 +0000 (16:20 +0200)] 
travis: run TEST-14-IMSM on Fedora 29

Systemd in Fedora 30 is broken at the moment.

5 months agofips: ensure fs module for /boot is installed
Kairui Song [Thu, 14 Mar 2019 10:54:10 +0000 (18:54 +0800)] 
fips: ensure fs module for /boot is installed

When using dracut with  --hostonly and --no-hostonly-default-device,
/boot will be inaccessible as dracut will most fs modules unless
specified. But FIPS require /boot to be accessible, and it will try
to mount it on boot. It will fail if corresponding fs module is missing.

For most case /boot will be a simple partition, include the fs module
will be enough for FIPS to mount it. For other cases users have to pass
extra parameters by themselves.

Suggested-by: Kenneth Dsouza <>
Signed-off-by: Kairui Song <>
5 months agoiscsi: always popd, even if there is no iscsi device
Renaud Métrich [Fri, 1 Mar 2019 10:46:43 +0000 (11:46 +0100)] 
iscsi: always popd, even if there is no iscsi device

5 months agodracut: let module handling function accept optional path option
Kairui Song [Thu, 21 Feb 2019 05:18:37 +0000 (13:18 +0800)] 
dracut: let module handling function accept optional path option

Let the caller pass in the module path instead of try to find the module
path everytime. This helps optimize the overall runtime.

Test results (3 rounds) on Fedora 30 in KVM VM with 8 CPUs, 2G memory, HDD:

    $ time ./ --local --quiet --hostonly --hostonly-cmdline --hostonly-i18n --hostonly-mode 'strict' -o 'plymouth dash resume ifcfg' --mount '/dev/mapper/fedora-root /sysroot xfs defaults' --no-hostonly-default-device -f initramfs.img
    Before the commit:
    real    0m11.782s  |  real    0m11.505s  |  real    0m11.958s
    user    0m9.169s   |  user    0m9.218s   |  user    0m9.327s
    sys     0m10.839s  |  sys     0m10.829s  |  sys     0m10.925s

    After this commit:
    real    0m9.866s  |  real    0m9.580s  |  real    0m9.638s
    user    0m9.048s  |  user    0m9.142s  |  user    0m9.120s
    sys     0m7.411s  |  sys     0m7.775s  |  sys     0m7.745s

Test result of building a ordinary image:

    $ time ./ --local --quiet -f initramfs.img
    Before the commit:
    real    0m34.697s  |  real    0m34.371s  |  real    0m35.122s
    user    0m27.608s  |  user    0m27.524s  |  user    0m27.705s
    sys     0m22.341s  |  sys     0m22.032s  |  sys     0m22.246s

    After the commit:
    real    0m31.914s  |  real    0m31.006  |  real    0m31.289ss
    user    0m27.315s  |  user    0m27.324  |  user    0m27.290ss
    sys     0m19.051s  |  sys     0m18.916  |  sys     0m19.022ss

This will have an ~2s speed up.

Signed-off-by: Kairui Song <>
6 months agoinstall: string_hash_func should not be fed with NULL
Lukas Nykryn [Thu, 14 Feb 2019 19:18:04 +0000 (20:18 +0100)] 
install: string_hash_func should not be fed with NULL

If kmod_module_get_path returns NULL, we should skip that entry,
the hash function does not like NULL pointers.

6 months agoFix 98dracut-systemd/
Böszörményi Zoltán [Tue, 12 Feb 2019 11:55:32 +0000 (12:55 +0100)] 
Fix 98dracut-systemd/

/dev/consoles does not exist. It's /proc/consoles.

Signed-off-by: Böszörményi Zoltán <>
6 months ago95iscsi: /sys/devices/platform/*/flashnode_sess-*/is_boot_target sometimes does not...
Lukas Nykryn [Thu, 7 Feb 2019 15:09:43 +0000 (16:09 +0100)] 
95iscsi: /sys/devices/platform/*/flashnode_sess-*/is_boot_target sometimes does not exist

cat: '/sys/devices/platform/host2/flashnode_sess-*/is_boot_target': No such file or directory
/usr/lib/dracut/modules.d/95iscsi/ line 90: [: -eq: unary operator expected

6 months ago95iscsi: fix a typo in a name of iscsiuio
Lukas Nykryn [Tue, 15 Jan 2019 15:42:38 +0000 (16:42 +0100)] 
95iscsi: fix a typo in a name of iscsiuio

6 months ago91zipl: Don't use contents of commented lines
Thomas Abraham [Wed, 19 Dec 2018 23:24:41 +0000 (18:24 -0500)] 
91zipl: Don't use contents of commented lines

Comment lines should be ignored. They should not be used for determining
the /boot/zipl device

6 months ago00systemd: check if systemd version is a number
Frantisek Sumsal [Fri, 4 Jan 2019 15:51:15 +0000 (16:51 +0100)] 
00systemd: check if systemd version is a number

The recent systemd upstream introduced a slightly modified version
string which included information about a git commit, which however
broke the version check in dracut. Unfortunately, the (( )) bash syntax
went along with it in certain cases and introduced a pretty nasty issue,
when the systemd would boot up but with slightly changed environment.

To prevent this from happening in the future, let's at least check if
the version parsed from the `systemd --version` output is a comparable

6 months ago10i18n: Fix keymaps not getting included sometimes
Jens Heise [Mon, 7 Jan 2019 15:47:23 +0000 (16:47 +0100)] 
10i18n: Fix keymaps not getting included sometimes

Eliminate erroneous substring matches when looking up already processed keymaps to prevent necessary keymaps not getting added to the initramfs sometimes e.g. if there are the files 'compose.latin1' and 'compose.latin1.add' the unfixed version would skip processing 'compose.latin1' if find returned 'compose.latin1.add' first due to the directory listing not being in sorted order.

7 months agoFix a missing space in example configs
Daniel Molkentin [Sun, 20 Jan 2019 20:56:05 +0000 (21:56 +0100)] 
Fix a missing space in example configs

It has

omit_drivers+=" i2o_scsi"

which would break the next omit_drivers+="foo " if it's
missing a space at the beginning.

Reference: boo#1121251

7 months ago95fcoe: Add the rd.nofcoe option to disable the FCoE module from the command line
Patrick Talbert [Fri, 30 Nov 2018 08:28:09 +0000 (09:28 +0100)] 
95fcoe: Add the rd.nofcoe option to disable the FCoE module from the command line

Images built with the fcoe module will always run the lldpad
service as part of their pre-trigger scripts if the network
is active. This prevents network installations in
environments where, for security reasons, LLDPDU frames
cause a switchport shutdown.

Add a new rd.nofcoe option to cause dracut to skip the script and the entire 95-fcoe module.

Signed-off-by: Patrick Talbert <>
7 months ago95iscsi: decouple iscsi from
Lukas Nykryn [Thu, 10 Jan 2019 17:08:32 +0000 (18:08 +0100)] 
95iscsi: decouple iscsi from

7 months agoRevert "95iscsi: drop systemd dracut service dependencies for iscsid"
Lukas Nykryn [Thu, 10 Jan 2019 16:44:54 +0000 (17:44 +0100)] 
Revert "95iscsi: drop systemd dracut service dependencies for iscsid"

This reverts commit 765b20333d9589e09b29dbe0d8304a56745623c6.

7 months agolsinitrd: list squash content as well
Kairui Song [Wed, 26 Dec 2018 09:38:02 +0000 (17:38 +0800)] 
lsinitrd: list squash content as well

When the initramfs is built with squash module enabled, the content
inside squash image will be invisible from the lsinitrd tool. This
commit make lsinitrd detect and list the content of the squash image as
well to avoid possible confusion.

Signed-off-by: Kairui Song <>
7 months agoemergency mode: use sulogin
Daniel Molkentin [Wed, 5 Dec 2018 15:52:45 +0000 (16:52 +0100)] 
emergency mode: use sulogin

- allow emergency login on every console
  specified in the kernel cmdline
- require password for hostonly images
- emergency mode: Manually multiplex emergency infos

This will bring all vital information to all ttys specified
as console devices, regardless of wether they hold the C flag.

Reference: FATE#325386
Reference: #449

7 months ago95iscsi: rd.iscsi.initiator should have priority over stored configuration
Lukas Nykryn [Tue, 8 Jan 2019 16:16:07 +0000 (17:16 +0100)] 
95iscsi: rd.iscsi.initiator should have priority over stored configuration

7 months agoremove bashism in various boot scripts
Đoàn Trần Công Danh [Sun, 6 Jan 2019 04:48:02 +0000 (11:48 +0700)] 
remove bashism in various boot scripts

When using dash as initramfs shell, the boot process is broken.

Signed-off-by: Đoàn Trần Công Danh <>
8 months agothe strip command should avoid changing the file modification time
Attila Bruncsak [Fri, 14 Dec 2018 14:57:33 +0000 (15:57 +0100)] 
the strip command should avoid changing the file modification time

8 months agoremove superfluous quotes in parameter expansion
Norbert Lange [Wed, 12 Dec 2018 16:21:12 +0000 (17:21 +0100)] 
remove superfluous quotes in parameter expansion

as this breaks busybox hush shell.
offending functions can be found with
grep -r '${[^}]*"[^}]*}'

8 months ago95iscsi/ do not require 'hostname' anymore
Harald Hoyer [Tue, 4 Dec 2018 09:27:17 +0000 (10:27 +0100)] 
95iscsi/ do not require 'hostname' anymore

8 months install tcpdump
Harald Hoyer [Tue, 4 Dec 2018 09:22:28 +0000 (10:22 +0100)] install tcpdump

8 months agotest/test-functions: correctly move server.log
Harald Hoyer [Tue, 4 Dec 2018 09:06:12 +0000 (10:06 +0100)] 
test/test-functions: correctly move server.log

8 months agoinstall/dracut-install.c: install module dependencies of dependencies
Harald Hoyer [Tue, 4 Dec 2018 09:02:45 +0000 (10:02 +0100)] 
install/dracut-install.c: install module dependencies of dependencies

8 months agonetwork: skip already enslaved interfaces
Harald Hoyer [Tue, 21 Aug 2018 11:14:44 +0000 (13:14 +0200)] 
network: skip already enslaved interfaces

8 months agodracut.modules.7.asc: typo correction
Bruno E. O. Meneguele [Fri, 30 Nov 2018 15:01:21 +0000 (13:01 -0200)] 
dracut.modules.7.asc: typo correction

Correct simple typo in .7 manpage for dracut.

Signed-off-by: Bruno E. O. Meneguele <>
8 months agokill bogus comment
Thierry Vignaud [Fri, 30 Nov 2018 14:41:05 +0000 (15:41 +0100)] 
kill bogus comment

should have been killed in commit 4a855e6bebed956c108865823bcc131ebea2841a

8 months agonetwork-manager: call the online hook for connected devices
Lubomir Rintel [Tue, 27 Nov 2018 14:30:48 +0000 (15:30 +0100)] 
network-manager: call the online hook for connected devices

Look for "connection-uuid" instead of "managed" to determine the devices
that are actually activated with a connection and call the online hook.

This fixes the anaconda-net root mount, which utilizes the online hook.

8 months agodracut-initramfs-restore: set selinux labels
Lukas Nykryn [Tue, 27 Nov 2018 14:27:53 +0000 (15:27 +0100)] 
dracut-initramfs-restore: set selinux labels

9 months agofips: removed false-positive 'FATAL: Module xxx not found' error message when kernel...
Renaud Métrich [Wed, 14 Nov 2018 12:19:27 +0000 (13:19 +0100)] 
fips: removed false-positive 'FATAL: Module xxx not found' error message when kernel provides a generic algo for module

Signed-off-by: Renaud Métrich <>
9 months agoDelay argument "-d" requires number
masem [Tue, 13 Nov 2018 23:48:39 +0000 (00:48 +0100)] 
Delay argument "-d" requires number

Arguments "-f -d -n" fails with "invalid number -n", because -d delay expects number of seconds.

9 months agosquash: unsquash the root image instead of mounting it on shutdown
Kairui Song [Fri, 9 Nov 2018 02:48:28 +0000 (10:48 +0800)] 
squash: unsquash the root image instead of mounting it on shutdown

When building squash image, squash module forgot to install the new, and the shutdown hooks are always skipped on ordinary
shutdown if squash module is enabled.

The new will remount the squash image and then everything
will just work, but currently re-mounting the squash image on shutdown
may have selinux problem and make the system hang, and there is no
easy way to fix it.

So skip fixing the not being install problem, instead
just drop the new, and unsquash the image on ordinary
shutdown, which is safer and should always work.

Signed-off-by: Kairui Song <>
9 months agoFixed some SUSE specific typos and outputs
Pedro Monreal [Thu, 8 Nov 2018 13:15:38 +0000 (14:15 +0100)] 
Fixed some SUSE specific typos and outputs

9 months agodracut.install: call dracut with --force
Lukas Nykryn [Thu, 25 Oct 2018 13:30:36 +0000 (15:30 +0200)] 
dracut.install: call dracut with --force

The kernel-install is called even if you run make install.
Since we don't call dracut with -f a second make install will fail
because initrd with same version is already there.
This makes kernel developers feel miserable.

9 months agoMakefile: add srpm target
Harald Hoyer [Wed, 24 Oct 2018 13:14:03 +0000 (15:14 +0200)] 
Makefile: add srpm target

9 months ago95iscsi: drop systemd dracut service dependencies for iscsid
Dusty Mabe [Mon, 22 Oct 2018 17:25:29 +0000 (13:25 -0400)] 
95iscsi: drop systemd dracut service dependencies for iscsid

These dependencies cause an odd issue where swap devices specified
by resume= on the kernel command line will cause systemd device
timeouts to occur on boot. According to @haraldh these lines aren't
needed because the socket activiation will take care of it for us.
Removing these lines now as it fixes the resume= device timeout issue.

Fixes #480

10 months ago95dasd_rules: mark dasd rules host_only
Daniel Molkentin [Fri, 19 Oct 2018 12:39:30 +0000 (14:39 +0200)] 
95dasd_rules: mark dasd rules host_only

Reference: bsc#1090884

10 months ago99base: Allow files with backslashes in hostonly files
Daniel Molkentin [Fri, 19 Oct 2018 12:30:36 +0000 (14:30 +0200)] 
99base: Allow files with backslashes in hostonly files

Files with blackslashes are routinely by systemd.

Reference: bsc#1090884

10 months agofips: check fips integrity just before mounting local filesystems in /sysroot
Renaud Métrich [Fri, 19 Oct 2018 11:21:37 +0000 (13:21 +0200)] 
fips: check fips integrity just before mounting local filesystems in /sysroot

Signed-off-by: Renaud Métrich <>
10 months ago99squash: Don't clean up squahfs on isolate
Kairui Song [Thu, 18 Oct 2018 09:05:22 +0000 (17:05 +0800)] 
99squash: Don't clean up squahfs on isolate

The only time we need to cleanup squahfs manually is on switch root, to
release resource and memory. We've covered that by setting
"" for squash cleanup service.
On shutdown systemd will take care of squahfs mounts. But for other
isolate, files in initramfs are most likely still required, so don't
clean up squahfs. For example, kdump's emergency handler will isolate
into its own target, if squahfs is cleaned up it will fail.

Signed-off-by: Kairui Song <>
10 months ago40network: Don't include 40network by default
Kairui Song [Fri, 12 Oct 2018 05:07:13 +0000 (13:07 +0800)] 
40network: Don't include 40network by default

commit 7347391 ('network-legacy: split off from network module')
splitted network function to network-legacy and removed check() function
of 40network. This caused 40network to be included even if network is
not needed.

Signed-off-by: Kairui Song <>
10 months agoAdded space in Resolving executable dependencies done as in the rest of the messages
Pedro Monreal [Mon, 8 Oct 2018 09:09:11 +0000 (11:09 +0200)] 
Added space in Resolving executable dependencies done as in the rest of the messages

10 months agodracut.spec: Fix error introduced by 70291ed
Kairui Song [Sat, 29 Sep 2018 09:14:31 +0000 (17:14 +0800)] 
dracut.spec: Fix error introduced by 70291ed

70291e0 ('dracut.spec: Add dracut-squash package') introduced a new
dracut-squash package, but by accident it overrided some other package
spec and the dependency name is wrong. This patch will fix it.

10 months agodracut-install: simplify ldd parsing logic
Mike Gilbert [Thu, 4 Oct 2018 20:45:47 +0000 (16:45 -0400)] 
dracut-install: simplify ldd parsing logic

The previous logic would not handle absolute paths on the left side of
the "=>" properly. For example, on Gentoo ARM64, ldd outputs this:

/lib/ => /lib64/

At runtime, the kernel tries to load the file from /lib, and fails if we
only provide it in /lib64.

Instead of looking for the first slash after the "=>", just look for the
first slash, period. This would fail if we somehow had a relative path
on the left side (foo/, but I'm not aware of any binaries that
would contain such an entry in DT_NEEDED.

Signed-off-by: Mike Gilbert <>
10 months agoFix tests with network-legacy 049
Harald Hoyer [Mon, 8 Oct 2018 13:38:33 +0000 (15:38 +0200)] 
Fix tests with network-legacy

10 months agoAUTHORS: update
Harald Hoyer [Mon, 8 Oct 2018 13:31:49 +0000 (15:31 +0200)] 
AUTHORS: update