]> git.ipfire.org Git - thirdparty/dracut.git/log
thirdparty/dracut.git
4 years agoAdding a bug report template
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 16:02:20 +0000 (16:02 +0000)] 
Adding a bug report template

4 years agoDo not start inside container
Tomasz Paweł Gajc [Wed, 26 Aug 2020 09:19:24 +0000 (11:19 +0200)] 
Do not start inside container

Host should take care of good entropy pool
#791

4 years agoAdding a pull request template
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 11:47:06 +0000 (11:47 +0000)] 
Adding a pull request template

4 years agoAdding code of conduct
Jóhann B. Guðmundsson [Fri, 28 Aug 2020 10:33:50 +0000 (10:33 +0000)] 
Adding code of conduct

4 years agodracut.sh: fix some indentation.
Érico Rolim [Sun, 23 Aug 2020 21:31:11 +0000 (18:31 -0300)] 
dracut.sh: fix some indentation.

Command level inside conditional and tab/space usage.

4 years agodracut.sh: fix errors pointed out by shellcheck.
Érico Rolim [Sun, 23 Aug 2020 21:15:32 +0000 (18:15 -0300)] 
dracut.sh: fix errors pointed out by shellcheck.

- use [ ] instead of calling test manually, as most of the script is
doing.

- use quotes in hostonly_cmdline blocks, specially when dealing with the
conf files, whose names are set by users/system administrators

- uefi_splash_image was being assigned set to `${dracutsysroot}...`, which
is a variable that doesn't exist.

- we don't want the conditional to run the output of fsfreeze as
commands. Instead, we just need to know if any of the fsfreeze commands
failed.

4 years agoDocument initqueue/online hook
Daniel Molkentin [Tue, 26 Nov 2019 11:29:47 +0000 (12:29 +0100)] 
Document initqueue/online hook

4 years ago01fips: turn info calls into fips_info calls
Daniel Molkentin [Mon, 6 Jul 2020 14:36:42 +0000 (16:36 +0200)] 
01fips: turn info calls into fips_info calls

systemd lets stdout go to journal only. Usually, this is desired
behavior to ensure that plymouth does not get disrupted.

However in the 01fips case, the system has to halt when the integrity
check fails to satisfy FIPS requirements. So the user will not be able
to inspect the journal.

As this is special to the fips module, we introduce a fips_info() which
works like info(), but deviates the output to stderr when running with
systemd.

Reference: bsc#1164076

4 years ago01fips: modprobe failures during manual module loading is not fatal
Daniel Molkentin [Mon, 6 Jul 2020 12:47:28 +0000 (14:47 +0200)] 
01fips: modprobe failures during manual module loading is not fatal

Users might see

"modprobe: FATAL: Module xyz not found in directory"

The output from modprobe is semantically wrong in this case and
confuses users. Keep the warning for debugging purposes, but reduce
the severeness.

It now reads "Module xyz not found in directory"

Reference: bsc#1169997

4 years ago95cifs: pass rootflags to mount
наб [Thu, 20 Aug 2020 15:36:30 +0000 (17:36 +0200)] 
95cifs: pass rootflags to mount

4 years ago95cifs: install new softdeps (sha512, gcm, ccm, aead2)
наб [Wed, 19 Aug 2020 19:24:17 +0000 (21:24 +0200)] 
95cifs: install new softdeps (sha512, gcm, ccm, aead2)

4 years agoRemove stratis module
mulhern [Wed, 19 Aug 2020 15:11:14 +0000 (11:11 -0400)] 
Remove stratis module

It is obsolete. An approach which does not start the daemon is being worked
on.

Signed-off-by: mulhern <amulhern@redhat.com>
5 years agodmsquash-live-root: Remove obsolete osmin.img processing.
Frederick Grose [Sun, 9 Aug 2020 04:23:54 +0000 (00:23 -0400)] 
dmsquash-live-root: Remove obsolete osmin.img processing.

osmin.img is no longer used by anaconda or generated by
livemedia-creator.  livecd-creator will soon drop it as well.
Removing this code will allow OverlayFS boots to proceed  when
osmin.img is present in the .iso image.

5 years ago95nvmf: fix typo in the example documentation
Daniel Molkentin [Tue, 11 Aug 2020 17:55:35 +0000 (19:55 +0200)] 
95nvmf: fix typo in the example documentation

5 years agoRemoving dracut entry not compat with new plugin
Jóhann B. Guðmundsson [Fri, 7 Aug 2020 19:16:46 +0000 (19:16 +0000)] 
Removing dracut entry not compat with new plugin

5 years agoNew label trigger file
Jóhann B. Guðmundsson [Fri, 7 Aug 2020 18:40:11 +0000 (18:40 +0000)] 
New label trigger file

5 years agoNew labels file
Jóhann B. Guðmundsson [Fri, 7 Aug 2020 18:39:46 +0000 (18:39 +0000)] 
New labels file

5 years ago.github: fix path to label workflow mapping file
Daniel Molkentin [Fri, 7 Aug 2020 16:54:43 +0000 (18:54 +0200)] 
.github: fix path to label workflow mapping file

5 years agoUpdate master-labels.yml
Jóhann B. Guðmundsson [Fri, 7 Aug 2020 16:17:45 +0000 (16:17 +0000)] 
Update master-labels.yml

Removing branches not sure if they work with the cron scheduler in workflow actions

5 years agoUpdate master-labels.yml
Jóhann B. Guðmundsson [Fri, 7 Aug 2020 15:57:07 +0000 (15:57 +0000)] 
Update master-labels.yml

Fixing bad intentation

5 years agoSwitching label triggers from pull requests to cron
Jóhann B. Guðmundsson [Fri, 7 Aug 2020 15:40:40 +0000 (15:40 +0000)] 
Switching label triggers from pull requests to cron

5 years agoAdding the labels trigger file for the RHEL-8 branch
Jóhann B. Guðmundsson [Thu, 6 Aug 2020 19:15:45 +0000 (19:15 +0000)] 
Adding the labels trigger file for the RHEL-8 branch

5 years agoAdding the labels trigger file for the RHEL-7 branch
Jóhann B. Guðmundsson [Thu, 6 Aug 2020 19:15:07 +0000 (19:15 +0000)] 
Adding the labels trigger file for the RHEL-7 branch

5 years agoAdding the labels trigger file for the RHEL-6 branch
Jóhann B. Guðmundsson [Thu, 6 Aug 2020 19:14:48 +0000 (19:14 +0000)] 
Adding the labels trigger file for the RHEL-6 branch

5 years agoAdding the labels trigger file for the Master branch
Jóhann B. Guðmundsson [Thu, 6 Aug 2020 19:13:33 +0000 (19:13 +0000)] 
Adding the labels trigger file for the Master branch

5 years agoAdding the labels file for the RHEL-8 branch
Jóhann B. Guðmundsson [Thu, 6 Aug 2020 19:11:58 +0000 (19:11 +0000)] 
Adding the labels file for the RHEL-8 branch

5 years agoAdding the labels file for the RHEL-7 branch
Jóhann B. Guðmundsson [Thu, 6 Aug 2020 19:10:51 +0000 (19:10 +0000)] 
Adding the labels file for the RHEL-7 branch

5 years agoAdding the labels file for the RHEL-6 branch
Jóhann B. Guðmundsson [Thu, 6 Aug 2020 19:10:26 +0000 (19:10 +0000)] 
Adding the labels file for the RHEL-6 branch

5 years agoAdding the labels file for master
Jóhann B. Guðmundsson [Thu, 6 Aug 2020 19:07:17 +0000 (19:07 +0000)] 
Adding the labels file for master

5 years agonet-lib.sh: support infiniband network mac addresses
Thomas Blume [Fri, 7 Aug 2020 06:39:26 +0000 (08:39 +0200)] 
net-lib.sh: support infiniband network mac addresses

Infiniband MAC addresses have 20 octets.

Reference: bsc#996146

5 years ago90lvm: do not add newline to cmdline
Daniel Molkentin [Wed, 5 Aug 2020 17:32:35 +0000 (19:32 +0200)] 
90lvm: do not add newline to cmdline

Fixes #862

5 years agoUEFI Mode: only write kernel cmdline to UEFI binary
mwberry [Sun, 31 May 2020 00:55:35 +0000 (17:55 -0700)] 
UEFI Mode: only write kernel cmdline to UEFI binary

The kernel command line was being written both into
/etc/cmdline.d/01-default.conf and the UEFI executable.
During boot, getcmdline would concatenate these two
resulting in all arguments being duplicated. Some
args, such as ip=, are sensitive to the number of
times they are specified.

5 years agoAllow $DRACUT_INSTALL to be not an absolute path
Mikhail Novosyolov [Fri, 27 Mar 2020 13:16:07 +0000 (16:16 +0300)] 
Allow $DRACUT_INSTALL to be not an absolute path

/usr/sbin/dracut-install is a symlink:
$ file /usr/sbin/dracut-install
/usr/sbin/dracut-install: symbolic link to ../lib/dracut/dracut-install

It resulted to "dracut-install not found" error:

+++ for p in $DRACUT_PATH
+++ [[ -L /sbin/dracut-install ]]
+++ [[ -x /sbin/dracut-install ]]
+++ for p in $DRACUT_PATH
+++ [[ -L /bin/dracut-install ]]
+++ [[ -x /bin/dracut-install ]]
+++ for p in $DRACUT_PATH
+++ [[ -L /usr/sbin/dracut-install ]]
+++ printf '%s\n' dracut-install
+++ return 0
++ DRACUT_INSTALL=dracut-install
++ [[ -n dracut-install ]]
++ [[ -n dracut-install ]]
++ DRINSTALLPARTS=0
++ for i in $DRACUT_INSTALL
++ DRINSTALLPARTS=1
++ [[ 1 = 1 ]]
++ [[ -x dracut-install ]]
++ dfatal 'dracut-install not found!'
++ set +x
dracut: dracut-install not found!

[ -x <not a path to file> ] is not correct and will always be false.
But actually it is available. Let's just allow it to be not an absolute path.
Maybe some other places can be improved to avoid DRACUT_INSTALL being not an absolute path.

Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
5 years ago35network-legacy: simplify fallback dhcp setup
Thomas Blume [Wed, 22 Jul 2020 07:34:42 +0000 (09:34 +0200)] 
35network-legacy: simplify fallback dhcp setup

suppress redundant calls to network setup

combine code for "no ip option directed at our interface" and
"No ip lines default to dhcp"
correct evaluation of return code for creating did-setup files
fix application of "load_ipv6" call to ipv6 setup only

Reference: bsc#1173402

5 years agoChange the order of NFS servers during the boot
Denis Volkov [Tue, 4 Aug 2020 14:51:27 +0000 (19:51 +0500)] 
Change the order of NFS servers during the boot
NFS server provided by DHCP in next-server option has higher priority than DHCP-server itself

5 years agomatch simplified rd.zfcp format too
David Tardon [Tue, 4 Aug 2020 12:18:54 +0000 (14:18 +0200)] 
match simplified rd.zfcp format too

The simplified format was introduced by commit
c8aa1d949aecaf146b0a0e1ce269f69e6048dc5a .

5 years agomatch the whole string
David Tardon [Tue, 4 Aug 2020 12:16:19 +0000 (14:16 +0200)] 
match the whole string

5 years ago99squash: simplify the code
Kairui Song [Mon, 8 Jun 2020 16:41:24 +0000 (00:41 +0800)] 
99squash: simplify the code

The new dracutsysrootdir could be used to replace the shell function
required_in_root, so drop it and also simplify the code.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years ago99squash: improve pre-requirements check
Kairui Song [Mon, 8 Jun 2020 09:00:00 +0000 (17:00 +0800)] 
99squash: improve pre-requirements check

Check for systemd-initrd and squashfs-tools in check() to fail early if
it won't work.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years ago99squash: Don't hardcode the squash sub directories
Kairui Song [Mon, 8 Jun 2020 07:31:56 +0000 (15:31 +0800)] 
99squash: Don't hardcode the squash sub directories

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years agodracut-initqueue: Print more useful info in case of timeout
Kairui Song [Fri, 2 Aug 2019 09:11:19 +0000 (17:11 +0800)] 
dracut-initqueue: Print more useful info in case of timeout

Currently when initqueue timeout, it span the console with
"dracut-initqueue timeout - starting timeout scripts", which isn't very
helpful as we still don't know what actually happened. Try to improve
this by print what is actually being waited.

Besides, only print "starting timeout scripts" when there are
actual timeout scripts to use.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years agomount-root.sh: fix writing fstab file with missing fsck flag
Norbert Lange [Mon, 6 Jul 2020 16:16:13 +0000 (18:16 +0200)] 
mount-root.sh: fix writing fstab file with missing fsck flag

if the kernel argument rootflags is set, then dracut will
not parse the rootfs fstab and rootfsck wil not be set.

if the filesystem can be fsck'ed then its unmounted,
and an entry to the local fstab is written, omitting the last
field.

mounting /sysroot using fstab will then fail.

This change makes sure that the filed is always written.

Signed-off-by: Norbert Lange <norbert.lange@andritz.com>
5 years ago99memstrack: Only start tracking service when rd.memdebug=4|5
Kairui Song [Wed, 10 Jun 2020 10:28:27 +0000 (18:28 +0800)] 
99memstrack: Only start tracking service when rd.memdebug=4|5

Currently systemd will always start the tracking service, it will
exit early if rd.memdebug<=3 so there is no issue here, but it
leave a message of: "Started Memstrack Anylazing Service.".
Better to avoid such message if it's not used.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years agolvm: fix removal of pvscan from udev rules
Alexander Tsoy [Sat, 23 May 2020 15:03:47 +0000 (18:03 +0300)] 
lvm: fix removal of pvscan from udev rules

udev rules provided by lvm 2.02.128 and newer uses '+=' instead of '='.

5 years agodracut.modules.7.asc: fix reference to insmodpost module
Gaël PORTAY [Wed, 25 Sep 2019 03:00:35 +0000 (23:00 -0400)] 
dracut.modules.7.asc: fix reference to insmodpost module

The module 96insmodpost was renamed to 90kernel-modules since commit
5078c98a (move insmodpost and blacklisting to 90kernel-modules)

5 years agodracut.modules.7.asc: fix another typo
Gaël PORTAY [Wed, 25 Sep 2019 02:39:43 +0000 (22:39 -0400)] 
dracut.modules.7.asc: fix another typo

5 years ago95resume: Do not resume on iSCSI, FCoE or NBD
Daniel Molkentin [Tue, 4 Aug 2020 08:20:51 +0000 (10:20 +0200)] 
95resume: Do not resume on iSCSI, FCoE or NBD

The iSCSI configuration is started after dracut checks for resume,
so we run into a timeout here. Additionally it's questionable if
resume on iSCSI makes sense (or is even supported on the platform).

Same holds true for Network Block Devices and FcOE, cover those as well

References: bsc#999663

Original-patch-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Daniel Molkentin <daniel.molkentin@suse.com>
5 years agolvm: remove unnecessary ${initdir} from lvm_scan.sh
Alexander Tsoy [Sat, 23 May 2020 18:42:18 +0000 (21:42 +0300)] 
lvm: remove unnecessary ${initdir} from lvm_scan.sh

lvm_scan.sh runs in the initramfs, so paths should not be prefixed with
${initdir}.

5 years ago95nfs: use ip_params_for_remote_addr()
Martin Wilck [Fri, 10 Jul 2020 22:19:09 +0000 (00:19 +0200)] 
95nfs: use ip_params_for_remote_addr()

Use the new helper function.

5 years ago95iscsi: use ip_params_for_remote_addr()
Martin Wilck [Fri, 10 Jul 2020 16:09:05 +0000 (18:09 +0200)] 
95iscsi: use ip_params_for_remote_addr()

Use the new helper function.

5 years agodracut-functions: add ip_params_for_remote_addr() helper
Martin Wilck [Fri, 10 Jul 2020 22:15:34 +0000 (00:15 +0200)] 
dracut-functions: add ip_params_for_remote_addr() helper

This helper function takes a remote IP address, and tries to
determine the dracut command line arguments ip= and ifname= that
will make this remote address reachable during boot.

Functionality was taken from the module-setup.sh scripts of 95iscsi and 95nfs,
cleaned up and fixed some issues in particular with statically configured
networks, where the old code would print the unsupported string
"$ifname:static".

5 years ago95nvmf: add NVMe over TCP support
Enzo Matsumiya [Mon, 3 Aug 2020 14:21:36 +0000 (11:21 -0300)] 
95nvmf: add NVMe over TCP support

Add support to boot from an NVMe over TCP device.

Example of supported command line formats:

nvme.discover=tcp:192.168.1.3::4420
nvme.discover=tcp:192.168.1.3 # will use 4420 as default svcid

- Create is_nvmf() function to handle all fabrics types
- Fix parse_nvmf_discover() to correctly use the default values
- Auxiliary function to validate an IP connection
- Fix inverted result for getargbool when reading "rd.nonvmf" command line parameter

Requires rd.neednet=1
Requires adding/replacing STARTMODE in /etc/sysconfig/network/ifcfg-ethX to "nfsroot"
to avoid shutdown hanging in initiator

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
5 years agodracut.sh: fix ia32 detection for uefi executables
q66 [Sat, 25 Jul 2020 15:20:40 +0000 (17:20 +0200)] 
dracut.sh: fix ia32 detection for uefi executables

5 years agomkinitrd-dracut.sh: use vmlinux regex for ppc*, vmlinuz for i686
q66 [Sat, 25 Jul 2020 15:29:23 +0000 (17:29 +0200)] 
mkinitrd-dracut.sh: use vmlinux regex for ppc*, vmlinuz for i686

Previously this would not catch ppc64le, now it does; same with
i686.

5 years ago90ppcmac: respect DRACUT_ARCH, don't exclude ppcle
q66 [Sat, 25 Jul 2020 15:47:00 +0000 (17:47 +0200)] 
90ppcmac: respect DRACUT_ARCH, don't exclude ppcle

5 years ago90kernel-modules: add pci_hyperv
Kairui Song [Mon, 3 Aug 2020 08:51:54 +0000 (16:51 +0800)] 
90kernel-modules: add pci_hyperv

Install pci_hyperv for SR-IOV devices on hyperv machines.

5 years agoAs of v246 of systemd "syslog" and "syslog-console" switches have been deprecated
Jóhann B. Guðmundsson [Wed, 15 Jul 2020 14:36:20 +0000 (14:36 +0000)] 
As of v246 of systemd "syslog" and "syslog-console" switches have been deprecated

5 years agoAs of v246 of systemd "syslog" and "syslog-console" switches have been deprecated
Jóhann B. Guðmundsson [Wed, 15 Jul 2020 14:35:38 +0000 (14:35 +0000)] 
As of v246 of systemd "syslog" and "syslog-console" switches have been deprecated

5 years agoAs of v246 of systemd "syslog" and "syslog-console" switches have been deprecated
Jóhann B. Guðmundsson [Wed, 15 Jul 2020 14:35:02 +0000 (14:35 +0000)] 
As of v246 of systemd "syslog" and "syslog-console" switches have been deprecated

5 years agoAs of v246 of systemd "syslog" and "syslog-console" switches have been deprecated
Jóhann B. Guðmundsson [Wed, 15 Jul 2020 14:34:17 +0000 (14:34 +0000)] 
As of v246 of systemd "syslog" and "syslog-console" switches have been deprecated

5 years agoAs of v246 of systemd "syslog" and "syslog-console" switches have been deprecated
Jóhann B. Guðmundsson [Wed, 15 Jul 2020 14:33:33 +0000 (14:33 +0000)] 
As of v246 of systemd "syslog" and "syslog-console" switches have been deprecated

5 years agoAs of v246 of systemd "syslog" and "syslog-console" switches have been deprecated
Jóhann B. Guðmundsson [Wed, 15 Jul 2020 14:32:44 +0000 (14:32 +0000)] 
As of v246 of systemd "syslog" and "syslog-console" switches have been deprecated

5 years agoAs of v246 of systemd "syslog" and "syslog-console" switches have been deprecated
Jóhann B. Guðmundsson [Wed, 15 Jul 2020 14:31:59 +0000 (14:31 +0000)] 
As of v246 of systemd "syslog" and "syslog-console" switches have been deprecated

5 years agoAs of v246 of systemd "syslog" and "syslog-console" switches have been deprecated
Jóhann B. Guðmundsson [Wed, 15 Jul 2020 14:31:17 +0000 (14:31 +0000)] 
As of v246 of systemd "syslog" and "syslog-console" switches have been deprecated

5 years agoAs of v246 of systemd "syslog" and "syslog-console" switches have been deprecated
Jóhann B. Guðmundsson [Wed, 15 Jul 2020 14:29:34 +0000 (14:29 +0000)] 
As of v246 of systemd "syslog" and "syslog-console" switches have been deprecated

5 years agoAs of v246 of systemd "syslog" and "syslog-console" switches have been deprecated
Jóhann B. Guðmundsson [Wed, 15 Jul 2020 14:26:00 +0000 (14:26 +0000)] 
As of v246 of systemd "syslog" and "syslog-console" switches have been deprecated

5 years agodracut.sh: fix early microcode detection logic
q66 [Sat, 25 Jul 2020 15:28:16 +0000 (17:28 +0200)] 
dracut.sh: fix early microcode detection logic

This fixes two issues:

1) on non-x86 systems in non-hostonly config this would cause
   an annoying warning on every initramfs generation
2) on non-x86 systems in hostonly config this would result in
   early microcode not getting disabled

5 years ago95iscsi: fix ipv6 target discovery
Thomas Blume [Mon, 6 Jul 2020 13:16:35 +0000 (15:16 +0200)] 
95iscsi: fix ipv6 target discovery

ipv6 addresses need square brackets, otherwise the iscsi discovery and log-in,
which adds the iscsi port after another colon will get confused and fail.

5 years ago91zipl: parse-zipl.sh: honor SYSTEMD_READY
Martin Wilck [Fri, 26 Jun 2020 16:50:47 +0000 (18:50 +0200)] 
91zipl: parse-zipl.sh: honor SYSTEMD_READY

The zipl partition should not be mounted if SYSTEMD_READY=0 is set.
Otherwise booting issues with multipath will result.

5 years agodracut.sh: FIPS workaround for openssl-libs on Fedora/RHEL
Kairui Song [Wed, 10 Jun 2020 07:57:20 +0000 (15:57 +0800)] 
dracut.sh: FIPS workaround for openssl-libs on Fedora/RHEL

On Fedora/RHEL, libcryto will verify both itself and libssl on start, if
libssl is missing, FIPS self test will fail. However libssl is not a
dependency of libcryto so dracut will not install it, unless some other
binary or library pulls it in. Systemd requires libssl, so in most cases
it just worked, but could fail in some corner cases where systemd is not
used.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years agodracut.sh: Move the library workaround after squash
Kairui Song [Mon, 8 Jun 2020 19:03:18 +0000 (03:03 +0800)] 
dracut.sh: Move the library workaround after squash

Ensure the workaround is also valid when dracut-squash module is used

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years agoinstall: also install post weak dependencies of kernel modules
Lukas Nykryn [Thu, 2 Jul 2020 07:08:03 +0000 (09:08 +0200)] 
install: also install post weak dependencies of kernel modules

5 years agocms: regenerate NetworkManager connections
Beniamino Galvani [Wed, 24 Jun 2020 11:09:04 +0000 (13:09 +0200)] 
cms: regenerate NetworkManager connections

After changing the kernel command line, the cmsifup script calls ifup
to activate the interface. However, ifup is only available in the
network-legacy module; when using the network-manager module, we
should regenerate connections according to the command line; then
later NM will be run and will activate the device.

5 years agonetwork-manager: move connection generation to a lib file
Beniamino Galvani [Wed, 24 Jun 2020 11:06:05 +0000 (13:06 +0200)] 
network-manager: move connection generation to a lib file

Move the connection generation code to a library file so that it can
be reused from other places.

5 years ago95iscsi: fix missing space when compiling cmdline args
Daniel Molkentin [Wed, 10 Jun 2020 20:36:56 +0000 (22:36 +0200)] 
95iscsi: fix missing space when compiling cmdline args

Reference: bsc#1172816

5 years ago95nvmf: add module for NVMe-oF
Hannes Reinecke [Mon, 25 Nov 2019 10:33:42 +0000 (11:33 +0100)] 
95nvmf: add module for NVMe-oF

Add a module for booting from NVMe-oF devices.

Signed-off-by: Hannes Reinecke <hare@suse.de>
5 years ago95nfs: only install rpc services for NFS < 4 when hostonly is strict
Kairui Song [Fri, 10 Apr 2020 12:50:49 +0000 (20:50 +0800)] 
95nfs: only install rpc services for NFS < 4 when hostonly is strict

Most rpc services are not needed for NFSv4, so skip these components
to save space. rpc.idmapd is still needed in case of
nfs4_disable_idmapping is set to 0.

5 years agoFix CI badges in README.md and fix dracut description
Harald Hoyer [Fri, 29 May 2020 12:43:57 +0000 (14:43 +0200)] 
Fix CI badges in README.md and fix dracut description

While fixing the CI badges, I removed some old crufty README text.

5 years agonetwork-manager: set kernel hostname from the command line
Beniamino Galvani [Thu, 7 May 2020 05:48:12 +0000 (07:48 +0200)] 
network-manager: set kernel hostname from the command line

Since commit ff70adf873ef ("initrd: save hostname to a file in /run"),
the initrd generator of NetworkManager parses the hostname from 'ip='
options of the kernel command line and writes it to
/run/NetworkManager/initrd/hostname.

When that file exists, set the kernel hostname.

In presence of multiple hostnames in the command line, the last one
wins. Hostnames from command line always have precedence over ones
received through DHCP. This is a bit different from the legacy network
module that gives higher precedence to the hostname (from DHCP or
command line) of the last interface that is brought up, which depends
on the udev order.

5 years agodracut.conf.5.asc: document how to config --no-compress in the config
Harald Hoyer [Fri, 29 May 2020 09:03:19 +0000 (11:03 +0200)] 
dracut.conf.5.asc: document how to config --no-compress in the config

Fixes: https://github.com/dracutdevs/dracut/issues/824
5 years agodracut.cmdline.7.asc: clarify usage of `rd.lvm.vg` and `rd.lvm.lv`
Harald Hoyer [Fri, 29 May 2020 08:49:47 +0000 (10:49 +0200)] 
dracut.cmdline.7.asc: clarify usage of `rd.lvm.vg` and `rd.lvm.lv`

Fixes: https://github.com/dracutdevs/dracut/issues/816
5 years agoCI: remove Fedora 30, add Fedora 32
Harald Hoyer [Fri, 29 May 2020 08:30:26 +0000 (10:30 +0200)] 
CI: remove Fedora 30, add Fedora 32

5 years agobusybox: simplify listing of supported utilities
Alexander Tsoy [Mon, 25 May 2020 14:49:20 +0000 (17:49 +0300)] 
busybox: simplify listing of supported utilities

'--list' option is supported since busybox-1.20.0, which was released
in 2010.

5 years agodracut-functions: fix find_binary() to return full path
Alexander Tsoy [Mon, 25 May 2020 16:02:05 +0000 (19:02 +0300)] 
dracut-functions: fix find_binary() to return full path

Fixes: a01204202b30 (Allow running on a cross-compiled rootfs)
5 years agoRemove cleanup_trace_mem calls
Kairui Song [Wed, 27 May 2020 13:59:55 +0000 (21:59 +0800)] 
Remove cleanup_trace_mem calls

In commit 49c4172 all shell based memory tracing functions are removed,
there are some left over. Remove them as well.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years ago99memstrack: hook script should not call exit
Kairui Song [Wed, 27 May 2020 14:07:37 +0000 (22:07 +0800)] 
99memstrack: hook script should not call exit

With memstrack module, rd.break may not work because the hook scripts
are sourced, not executed, so the exit call will make pre-pivot queue
exit early. See 98dracut-systemd/dracut-pre-pivot.sh, everything after
"source_hook cleanup" will be ignored.

Replace with return instead.

Credits go to Lukas Nykryn <lnykryn@redhat.com> who helped discover and
debug this issue.

Signed-off-by: Kairui Song <kasong@redhat.com>
5 years agoinstall dependant libs too
Tomasz Paweł Gajc [Mon, 11 May 2020 12:49:06 +0000 (14:49 +0200)] 
install dependant libs too

By default rng-tools are compiled with pkcs11 support.
Make sure opensc-pkcs11.so library is installed inside initramfs to prevent error on boot

5 years ago51-dracut-rescue.install: Don't use BLS fragment shipped by kernel package
Javier Martinez Canillas [Tue, 5 May 2020 17:11:18 +0000 (19:11 +0200)] 
51-dracut-rescue.install: Don't use BLS fragment shipped by kernel package

For the GRUB and zipl bootloaders the BLS fragment that is shipped by the
kernel package is used, so the same fragment is used for the rescue entry.

But there are cases where this BLS fragment is not suitable. For example,
if the boot directory is on a btrfs subvolume the path in the linux and
initrd fiels need to be adjusted with the real path. Otherwise GRUB won't
be able to read them.

The GRUB and zipl kernel-install plugins already take care of this before
installing the BLS fragments, so just copy the installed fragment that has
the updated paths instead of using the BLS shipped by the kernel package.

Resolves: rhbz#1827882

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
5 years agoFix test in lsinitrd
Fabian Vogt [Mon, 4 May 2020 08:09:07 +0000 (10:09 +0200)] 
Fix test in lsinitrd

If $uefi is empty, this evaluated to true previously,
resulting in "initrd in UEFI: : 13M".

5 years ago90crypt/module-setup.sh: fix force on multiple lines
Derek Hageman [Fri, 1 May 2020 00:40:13 +0000 (18:40 -0600)] 
90crypt/module-setup.sh: fix force on multiple lines

The first line in crypttab with a "force" option causes all subsequent
lines to be included as if they also had it set because the variable
used to track it is not reset between loop iterations.  So fix that by
just setting it to empty before the check for the force option.

5 years ago90kernel-modules/module-setup.sh: add sg kernel module
Harald Hoyer [Thu, 30 Apr 2020 18:42:27 +0000 (20:42 +0200)] 
90kernel-modules/module-setup.sh: add sg kernel module

Fixes udevd messages about failure of `modprobe -bv sg`.

5 years ago90crypt/module-setup.sh: try to catch kernel config changes
Harald Hoyer [Tue, 7 Apr 2020 20:26:25 +0000 (22:26 +0200)] 
90crypt/module-setup.sh: try to catch kernel config changes

If a crypto kernel module changes from compiled in to module, the
encrypted disk might fail to open, because the kernel module was
not included in the initramfs.

This patch tries heuristically to catch such modules.

Fixes https://github.com/dracutdevs/dracut/issues/706

5 years agoInstall crypto modules in 90kernel-modules
Harald Hoyer [Fri, 24 Apr 2020 09:05:49 +0000 (11:05 +0200)] 
Install crypto modules in 90kernel-modules

We don't want to play catch up with hash and encryption algorithms.
To be safe, just use the hammer and include all crypto.

Fixes https://github.com/dracutdevs/dracut/issues/802

5 years agoAlways pull in machinery to read ifcfg files
Peter Georg [Tue, 21 Apr 2020 19:34:38 +0000 (21:34 +0200)] 
Always pull in machinery to read ifcfg files

So far machinery is only pulled in if the user has not yet included any
ifcfg files.

5 years agoAdd 99memstrack module
Kairui Song [Wed, 8 Apr 2020 12:09:38 +0000 (20:09 +0800)] 
Add 99memstrack module

memstrack is a new tool to track the overall memory usage and
allocation, which can help off load the improve the builtin module
memory tracing function in dracut.

With this change, the rd.memdebug=4 behavior is similiar with before,
but the report is defered to pre-pivot, so the memory usage info
during the whole initramfs run is traced. And the ourput format is
changed a bit:

  dracut-pre-pivot[519]: ======== Report format module_summary: ========
  dracut-pre-pivot[519]: Module squashfs using 10.4MB (2658 pages), peak allocation 10.4MB (2671 pages)
  dracut-pre-pivot[519]: Module qxl using 3.4MB (865 pages), peak allocation 3.4MB (880 pages)
  dracut-pre-pivot[519]: Module crc32c_intel using 2.0MB (519 pages), peak allocation 3.0MB (769 pages)
  dracut-pre-pivot[519]: Module serio_raw using 2.0MB (505 pages), peak allocation 3.6MB (918 pages)
  dracut-pre-pivot[519]: Module virtio_console using 1.6MB (416 pages), peak allocation 1.6MB (419 pages)
  ... snip ...
  dracut-pre-pivot[519]: ======== Report format module_summary END ========

It now contains more detail and also includes the peak usage which could
be more helpful.

And now it have a rd.memdebug=5, which will print more detail about
the stack trace of the top memory user, also printed on pri-pivot:

  dracut-pre-pivot[519]: ======== Report format module_top: ========
  dracut-pre-pivot[519]: Top stack usage of module squashfs:
  dracut-pre-pivot[519]:   (null) Pages: 2658 (peak: 2671)
  dracut-pre-pivot[519]:     (null) Pages: 2658 (peak: 2671)
  dracut-pre-pivot[519]:       async_page_fault (0xffffffff81a01149) Pages: 1448 (peak: 1461)
  dracut-pre-pivot[519]:         do_async_page_fault (0xffffffff8105c509) Pages: 1448 (peak: 1461)
  dracut-pre-pivot[519]:           do_page_fault (0xffffffff8106296a) Pages: 1448 (peak: 1461)
  dracut-pre-pivot[519]:             do_user_addr_fault (0xffffffff810626bd) Pages: 1448 (peak: 1461)
  dracut-pre-pivot[519]:               handle_mm_fault (0xffffffff812940c4) Pages: 1448 (peak: 1461)
  dracut-pre-pivot[519]:                 __handle_mm_fault (0xffffffff81293627) Pages: 1195 (peak: 1208)
  dracut-pre-pivot[519]:                   __do_fault (0xffffffff8128b07e) Pages: 1195 (peak: 1208)
  dracut-pre-pivot[519]:                     filemap_fault (0xffffffff8124c0b9) Pages: 1195 (peak: 1208)
  dracut-pre-pivot[519]:                       __do_page_cache_readahead (0xffffffff812585da) Pages: 1063 (peak: 1076)
  dracut-pre-pivot[519]:                         read_pages (0xffffffff812583c2) Pages: 1063 (peak: 1076)
  dracut-pre-pivot[519]:                           squashfs_readpage squashfs (0xffffffffc0022073) Pages: 1039 (peak: 1052)
  dracut-pre-pivot[519]:                             squashfs_readpage_block squashfs (0xffffffffc0024334) Pages: 744 (peak: 744)
  dracut-pre-pivot[519]:                               squashfs_copy_cache squashfs (0xffffffffc0021a3f) Pages: 744 (peak: 744)
  dracut-pre-pivot[519]:                                 pagecache_get_page (0xffffffff8124abf7) Pages: 744 (peak: 744)
  dracut-pre-pivot[519]:                                   __page_cache_alloc (0xffffffff81247df6) Pages: 744 (peak: 744)
  dracut-pre-pivot[519]:                                     alloc_pages_current (0xffffffff812cdca7) Pages: 744 (peak: 744)
  dracut-pre-pivot[519]:                                       __alloc_pages_nodemask (0xffffffff812b3107) Pages: 744 (peak: 744)
  dracut-pre-pivot[519]:                                         __alloc_pages_nodemask (0xffffffff812b3107) Pages: 1488 (peak: 1488)
  dracut-pre-pivot[519]: Top stack usage of module qxl:
  dracut-pre-pivot[519]:   (null) Pages: 865 (peak: 880)
  dracut-pre-pivot[519]:     entry_SYSCALL_64_after_hwframe (0xffffffff81a0008c) Pages: 855 (peak: 858)
  dracut-pre-pivot[519]:       do_syscall_64 (0xffffffff81002a5a) Pages: 855 (peak: 858)
  dracut-pre-pivot[519]:         __x64_sys_finit_module (0xffffffff8117ccea) Pages: 811 (peak: 811)
  dracut-pre-pivot[519]:           __do_sys_finit_module (0xffffffff8117cc6e) Pages: 811 (peak: 811)
  dracut-pre-pivot[519]:             load_module (0xffffffff8117c6be) Pages: 802 (peak: 802)
  dracut-pre-pivot[519]:               do_init_module (0xffffffff81179e72) Pages: 802 (peak: 802)
  dracut-pre-pivot[519]:                 do_one_initcall (0xffffffff81000d5a) Pages: 802 (peak: 802)
  dracut-pre-pivot[519]:                   serio_raw_poll serio_raw (0xffffffffc0200054) Pages: 802 (peak: 802)
  dracut-pre-pivot[519]:                     __pci_register_driver (0xffffffff81557804) Pages: 802 (peak: 802)
  dracut-pre-pivot[519]:                       driver_register (0xffffffff8167ed24) Pages: 802 (peak: 802)
  dracut-pre-pivot[519]:                         bus_add_driver (0xffffffff8167cbb2) Pages: 801 (peak: 801)
  dracut-pre-pivot[519]:                           driver_attach (0xffffffff8167d28e) Pages: 801 (peak: 801)
  dracut-pre-pivot[519]:                             bus_for_each_dev (0xffffffff8167b62c) Pages: 801 (peak: 801)
  dracut-pre-pivot[519]:                               __driver_attach (0xffffffff8167e18f) Pages: 801 (peak: 801)
  dracut-pre-pivot[519]:                                 device_driver_attach (0xffffffff8167e0ed) Pages: 801 (peak: 801)
  dracut-pre-pivot[519]:                                   driver_probe_device (0xffffffff8167de6c) Pages: 801 (peak: 801)
  dracut-pre-pivot[519]:                                     really_probe (0xffffffff8167d9c9) Pages: 801 (peak: 801)
  dracut-pre-pivot[519]:                                       pci_device_probe (0xffffffff81559627) Pages: 801 (peak: 801)
  dracut-pre-pivot[519]:                                         local_pci_probe (0xffffffff81557f98) Pages: 801 (peak: 801)
  dracut-pre-pivot[519]:                                           qxl_pci_probe qxl (0xffffffffc01f0387) Pages: 773 (peak: 773)
  dracut-pre-pivot[519]:                                             drm_fbdev_generic_setup drm_kms_helper (0xffffffffc01b30c5) Pages: 773 (peak: 773)
  dracut-pre-pivot[519]:                                               drm_fbdev_client_hotplug drm_kms_helper (0xffffffffc01b2656) Pages: 773 (peak: 773)
  dracut-pre-pivot[519]:                                                 __drm_fb_helper_initial_config_and_unlock drm_kms_helper (0xffffffffc01b1a28) Pages: 770 (peak: 770)
  dracut-pre-pivot[519]:                                                   drm_fb_helper_generic_probe drm_kms_helper (0xffffffffc01b2fa5) Pages: 770 (peak: 770)
  dracut-pre-pivot[519]:                                                     vzalloc (0xffffffff812aa39c) Pages: 770 (peak: 770)
  dracut-pre-pivot[519]:                                                       __vmalloc_node_range (0xffffffff812aa200) Pages: 768 (peak: 768)
  ... snip ...
  ======== Report format module_top END ========

This could be very helpful for debuging memory usage issues.

5 years agoRemove memtrace-ko and rd.memdebug=4 support in dracut
Kairui Song [Wed, 8 Apr 2020 08:39:52 +0000 (16:39 +0800)] 
Remove memtrace-ko and rd.memdebug=4 support in dracut

This feature could be off loaded to memstrack, which have better
accurecy, better performance, and have more detailed tracing features.

Also simplify make_trace_mem a bit.

And currently rd.memdebug=4 is unstable, fails from time to time.

5 years agonetwork-manager: install libnss DNS and mDNS plugins
Beniamino Galvani [Mon, 23 Mar 2020 21:57:35 +0000 (22:57 +0100)] 
network-manager: install libnss DNS and mDNS plugins

Install libnss_dns.so and libnss_mdns4_minimal.so plugins for the Name
Service Switch (NSS) functionality of glibc so that name resolution
through /etc/resolv.conf and mDNS works in the initrd.

Fixes: #772
5 years agosystemd: skip dependency add for non-existent units
Harald Hoyer [Mon, 20 Apr 2020 13:07:02 +0000 (15:07 +0200)] 
systemd: skip dependency add for non-existent units

Fixes: https://github.com/dracutdevs/dracut/issues/795
5 years agoi18n: Always install /etc/vconsole.conf
Mikhail Novosyolov [Sun, 19 Apr 2020 13:32:41 +0000 (16:32 +0300)] 
i18n: Always install /etc/vconsole.conf

/etc/vconsole.conf must be installed always, even in generic initrds, not only host-only ones.
systemd-vconsole-setup is run at initrd stage and expects either /etc/vconsole.conf or kernel cmdline options to exist.

I have also proposed a change in systemd-vconsole-setup that makes it behave better if /etc/vconsole.conf does not exist:
https://github.com/systemd/systemd/pull/15479
But it is just a fallback. If /etc/vconsole.conf does not exist in initrd and if that patch is applied on systemd,
then the default consoel font is set despite the one being set in /etc/vconsole.conf and this setting is inherited
when new TTYs are opened. This leads to full ignorance of settings in /etc/vconsole.conf.
It is incorrect, and that is why this file must be copied to initrds always, but not only on host-only initrds.

Fixes: https://github.com/dracutdevs/dracut/issues/796
Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
5 years agodracut-lib.sh: quote variables in parameter expansion patterns
Jonas Witschel [Sat, 18 Apr 2020 12:55:41 +0000 (14:55 +0200)] 
dracut-lib.sh: quote variables in parameter expansion patterns

According to POSIX.1-2017, 2.6.2 Parameter Expansion:

${parameter%[word]} [...] The word shall be expanded to produce a
pattern.

This means if word contains variables that itself contain special
characters like asterisks or backslashes, these are treated as pattern
characters unless the variable is quoted. Try e.g. the following example
in bash, dash or (busybox) ash:

i='a\c'; j='\'; echo "${i%$j*}"

This prints "a\c" because "$j*" is expanded to "\*", escaping the
asterisk. In contrast,

i='a\c'; j='\'; echo "${i%"$j"*}"

produces the expected result "a" because the backslash is not specially
treated any more after quoting.

The quotes that this commit adds have been previously removed in commit
f9c96cf56fed390841eac05c43826e62014c9188, citing issues with busybox
hush without further specifying the actual error. I tested a recent
busybox build (upstream commit 9aa751b08ab03d6396f86c3df77937a19687981b)
and couldn't find any problems. Note that the above example always
produces "a\c" in hush regardless of quoting $j, making hush unsuitable
for use with dracut, but using quotes in parameter expansions generally
works.

The unquoted variables break the "rd.luks.uuid/name" kernel command line
options in dracut 050 because

str_replace "$luksname" '\' '\\'

in modules.d/90crypt/parse-crypt.sh is not able to escape the
backslashes any more, see GH-723, GH-727: backslashes in the
systemd-cryptsetup@.service unit name stay unescaped for use in udev
(cf. commit 0f6d93eb9d63695a64002ec8b0421fbc9fc8a7a3), leading to
failures in starting the unit.

This partially reverts commit f9c96cf56fed390841eac05c43826e62014c9188.