Compare commits

...

642 Commits

Author SHA1 Message Date
21c9afce43 dmsquash-live: add union join overlay opt 2023-07-08 00:05:03 +02:00
Thomas Blume
52351cfa04 feat(livenet): add memory size check depending on live image size
For writeable live images, the memory must hold the complete image.
That means it must be at least the size of the image plus some RAM
necessary to run processes.
With too small RAM, the OOM Killer steps in and makes the boot hang.
This patch lets the system go into the emergency shell instead.

The default minimum RAM after subtracting the live image size is set to 1G.
The parameter rd.minmem is added to modify this.
2023-07-07 14:24:10 +02:00
Henrik Gombos
15d4f60eb1 chore(gentoo.conf): remove examples to avoid confusion
These examples are not used and not maintained and changing them
would not have an impact on Gentoo.
2023-06-29 08:25:57 +02:00
Michał Zegan
b7ef130271 fix(modsign): load keys to correct keyring
Until now, 03modsign module was loading keys from /lib/modules/keys/* into the
current session keyring.
This change makes it add keys to the secondary trusted keyring. This works
only as long as added certificate is signed by key from the same keyring.
2023-06-28 07:53:14 -04:00
Laszlo Gombos
179e1a992f fix(dmsquash-live-autooverlay): specify filesystemtype when it is already known 2023-06-26 09:56:15 -04:00
Laszlo Gombos
a71b905ef3 chore: remove git2spec.pl, it is no longer used 2023-06-26 09:54:04 -04:00
Laszlo Gombos
9aa332cad7 fix(fs-lib): remove quoting form the first argument of the e2fsck call
Fix regression.
2023-06-26 09:39:48 -04:00
Laszlo Gombos
f5cc202e99 fix(Makefile): remove leftover rpm build rules 2023-06-26 09:24:02 -04:00
Laszlo Gombos
ffc766d23d fix(Makefile): no longer upload to kernel.org 2023-06-26 09:16:12 -04:00
Martin Wilck
b490f6f7d7 feat(nvmf): add code for parsing the NBFT
Add code to parse the Nvme-oF Boot Firmware Table (NBFT) according
to the NVM Express Boot Specification 1.0 [1]. The implementation in
dracut follows a similar general approach as iBFT support in the
iscsi module.

NBFT support requires two steps:

(1) Setting up the network and routing according to the
    HFI ("Host Fabric Interface") records in the NBFT,
(2) Establishing the actual NVMe-oF connection.

(1) is accomplished by reading the NBFT using JSON output from
the "nvme nbft show" command, and transforming it into command
line options ("ip=", "rd.neednet", etc.) understood by dracut's
network module and its backends. The resulting network setup code
is backend-agnostic. It has been tested with the "network-legacy"
and "network-manager" network backend modules. The network setup
code supports IPv4 and IPv6 with static, RA, or DHCP configurations,
802.1q VLANs, and simple routing / gateway setup.

(2) is done using the "nvme connect-all" command [2] in the netroot handler,
which is invoked by networking backends when an interface gets fully
configured. This patch adds support for "netboot=nbft". The "nbftroot"
handler calls nvmf-autoconnect.sh, which contains the actual connect
logic. nvmf-autoconnect.sh itself is preserved, because there are
other NVMe-oF setups like NVMe over FC which don't depend on the
network.

The various ways to configure NVMe-oF are prioritized like this:

 1 FC autoconnect from kernel commandline (rd.nvmf.discover=fc,auto)
 2 NBFT, if present
 3 discovery.conf or config.json, if present, and cmdline.d parameters,
   if present (rd.nvmf.discovery=...)
 4 FC autoconnect (without kernel command line)

The reason for this priorization is that in the initial RAM fs, we try
to activate only those connections that are necessary to mount the root
file system. This avoids confusion, possible contradicting or ambiguous
configuration, and timeouts from unavailable targets.

A retry logic is implemented for enabling the NVMe-oF connections,
using the "settled" initqueue, the netroot handler, and eventually, the
"timeout" initqueue. This is similar to the retry logic of the iscsi module.
In the "timeout" case, connection to all possible NVMe-oF subsystems
is attempted.

Two new command line parameters are introduced to make it possible to
change the priorities above:

 - "rd.nvmf.nonbft" causes the NBFT to be ignored,
 - "rd.nvmf.nostatic" causes any statically configured NVMe-oF targets
   (config.json, discovery.conf, and cmdline.d) to be ignored.

These parameters may be helpful to skip attempts to set up broken
configurations.

At initramfs build time, the nvmf module is now enabled if an NBFT
table is detected in the system.

[1] https://nvmexpress.org/wp-content/uploads/NVM-Express-Boot-Specification-2022.11.15-Ratified.pdf
[2] NBFT support in nvme-cli requires the latest upstream code (> v2.4).

Signed-off-by: Martin Wilck <mwilck@suse.com>
Co-authored-by: John Meneghini <jmeneghi@redhat.com>
Co-authored-by: Charles Rose <charles.rose@dell.com>
2023-06-26 09:45:42 +02:00
Martin Wilck
f07117d68d fix(nvmf): support /etc/nvme/config.json
Since nvme-cli 2.0, configuration of subsystems to connect to is
stored under `/etc/nvme` in either `discovery.conf` or `config.json`.
Attempt discovery also if the latter exists, but not the former.
Also, install "config.json" if it's present on the root FS.

As before, "rd.nvmf.discover=fc,auto" will force either file to be ignored,
and NBFT-defined targets take precedence if found.
2023-06-26 09:45:42 +02:00
Martin Wilck
902f3a8f84 fix(nvmf): install 8021q module unconditionally
In NBFT setups, VLAN can be configured in the firmware.
Add the 8021q module in hostonly mode even if VLAN is currently
not used to be prepared for such configuration change.
2023-06-26 09:45:42 +02:00
Andrew Ammerlaan
17b8649eb9 fix(install.d): respect even more kernel-install vars, plus style fixes
- More verbose with KERNEL_INSTALL_VERBOSE=1

- Use KERNEL_INSTALL_CONF_ROOT if defined

- Fallback to /usr/lib/os-release if /etc/os-release does not exist

- Fallback to "Linux $KERNEL_VERSION" if no PRETTY_NAME found

- Styling fixes

Co-authored-by: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
2023-06-26 09:39:24 +02:00
Andrew Ammerlaan
a037634ad7 fix(install.d): respect more kernel-install env variables
- If kernel-install has defined a staging area for us
(KERNEL_INSTALL_STAGING_AREA) install generated initrd/uki.efi there.
The actual install is then handled by 90-loaderentry.install or
90-uki-copy-install.

- Also skip regeneration if an uki.efi already exists.

- Pass --kernel-image to dracut, this is required to generate an uki (uefi=yes)

- Add --no-uefi argument to dracut rescue image generation, this ensures that
it at least installs correctly. TODO: Rework 51-dracut-rescue.install to also
work with uki's.

This fixes installing a kernel with uefi=yes in dracut config and layout=uki
in kernel/install.conf.

Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
2023-06-26 09:39:24 +02:00
Andrew Ammerlaan
09d3ec1648 fix(dracut.sh): also prevent fsfreeze for tmpfs
KERNEL_INSTALL_STAGING_AREA is often on tmpfs, it cannot be frozen

Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
2023-06-26 09:39:24 +02:00
Laszlo Gombos
4000a1ecff fix(dmsquash-live): allow other fstypes
Use det_fs to determine fstype and provide fallback instead of
just calling blkid.

Many other dracut modules (e.g. fs-lib, btrfs, mdraid) are already
using det_fs to determine fstype.
2023-06-26 09:37:19 +02:00
Laszlo Gombos
995ac6f887 test(DMSQUASH): add test for NTFS
Add a test case for mounting the root filesystem from
a squashfs image file that is store on an NTFS drive.

The test case is using ntfs3 module to mount the NTFS drive.
2023-06-26 09:37:19 +02:00
Laszlo Gombos
d96754eaa5 test(16): check for failure after each sub-test run
The test case had a bug where it only checked for
at least one of the passing instead of all the subtests passing.
2023-06-26 09:37:19 +02:00
Laszlo Gombos
dfa408c9de fix(bluetooth): make bluetooth rules more strict
Only warn if bluetooth kernel module is loaded
at the time of initrd generation in hostonly mode.
2023-06-26 09:32:39 +02:00
Antonio Alvarez Feijoo
e84d65c5b0 fix(bluetooth): add missing files
- org.bluez.service dbus system service
- bluetooth.service override conf
2023-06-26 09:32:39 +02:00
Antonio Alvarez Feijoo
8079ceafca fix(bluetooth): include it if Appearance matches the value assigned for keyboard
Following the Bluetooth spec [1], Assigned Numbers Document, Rev. 2023-05-04,
Section 2.6.3, Appearance Sub-category, the Appearance value defined for
keyboards is 0x03C1.

This value must be checked to include the bluetooth module in hostonly mode,
because some Bluetooth keyboards do not set the Class attribute.

[1] https://www.bluetooth.com/specifications/assigned-numbers/
2023-06-26 09:32:39 +02:00
Henrik Gombos
0ecb038832 fix(bluetooth): warn user instead of including it by default
Bluetooth module can result in a known race condition at boot.
Discourage its usage by default.
2023-06-22 10:31:01 -07:00
Antonio Alvarez Feijoo
765e69ce4d fix(systemd-timedated): correct typo in override path 2023-06-22 17:08:15 +02:00
Antonio Alvarez Feijoo
2d08302191 fix(systemd-resolved): correct typo in override path 2023-06-22 17:08:15 +02:00
Antonio Alvarez Feijoo
f0dc7ec96b fix(systemd-networkd): correct typos in override paths 2023-06-22 17:08:15 +02:00
Antonio Alvarez Feijoo
3e2f685ecb fix(dracut-init.sh): correct check in is_qemu_virtualized function
Do not redirect `systemd-detect-virt` to /dev/null, otherwise, the `vm` variable
is always empty. This function was working only thanks to the following /sys
check.

Reported-by: Raymund Will <rw@suse.com>
2023-06-22 17:08:06 +02:00
Michal Koutný
7ed765dd23 fix(btrfs): do not require module via cmdline when --no-kernel
initrd built without modules would fail when it attempts to load a
kernel module. (Use case scenario: kernel with built-in module.)

synthesize an the cmdline only when modules are truly installed.
2023-06-20 07:52:02 -07:00
Antonio Alvarez Feijoo
2b47a2efe9 fix(btrfs): add missing cmdline function
Otherwise `dracut --print-cmdline` does not print the command line option added
by the btrfs module.
2023-06-20 07:52:02 -07:00
Laszlo Gombos
2ff7b4702c ci: conditionally add tgt to Gentoo container
This commit allows to run test 30 and test 35 on a Gentoo.

Use the newly introduced conditional for nfs4 support as well.
2023-06-19 10:15:22 +02:00
Laszlo Gombos
d06153f896 ci: re-enable lvm on Gentoo container
Gentoo changed it's policy and now lvm needs to be enabled explicitly.

See https://www.gentoo.org/support/news-items/2022-11-19-lvm2-default-USE-flags.html

No need to install thin-provisioning-tools explicitelly, it is
pulled in as a dependency of the lvm2 package.
2023-06-19 10:15:22 +02:00
Laszlo Gombos
a9ecb5e325 ci: disable initramfs generation inside Gentoo container
Disabling initramfs generation saves installing 4 additional packages.
2023-06-19 10:15:22 +02:00
Laszlo Gombos
5803ece5c2 ci: add extra packages for tests to Gentoo container
Add cryptsetup, multipath-tools and open-iscsi
to the Gentoo container for tests 10, 14, 30, 35.
2023-06-19 10:15:22 +02:00
Henrik Gombos
6fd6b36d5e ci: switching the musl test to 18 (uefi) 2023-06-19 09:31:55 +02:00
Henrik Gombos
af31df4b36 test(ISCSI): make test-30 use the test dracut modules
Introduce test_dracut that is meant to be shared between tests
in test-functions.
2023-06-16 19:48:14 -04:00
Henrik Gombos
dcf4665bfc ci: add dependencies to Debian container
- add systemd-boot-efi for test 18
- tgt is needed for test 30 and 35
- nbd-server is needed for test 40
- gawk dependency has been introduced by f32e95bcad
- install dracut instead of initramfs-tools to match actual usage
- remove workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=962300
as it is now fixed on Debian 12.
2023-06-15 08:56:44 +02:00
Laszlo Gombos
ec2c7e1aa4 test(UEFI): add test case for UEFI boot
Include OVMF in containers if it is not already present.
2023-06-14 10:52:30 -04:00
Henrik Gombos
c1b3f88d50 docs: remove rd.lvm.snapsize and rd.lvm.snapshot 2023-06-12 07:58:19 -04:00
Henrik Gombos
4235c035ff fix(Makefile): execute command -v instead of which 2023-06-12 07:52:41 -04:00
lilinjie
e2f961a2bd fix(network-legacy): typo
Signed-off-by: lilinjie <lilinjie@uniontech.com>
2023-06-12 08:04:54 +02:00
Laszlo Gombos
3f8f115a27 fix(network,dbus): improve dependency checking
Decouple implementation details of the backend
dependencies from the meta module.

Call check_module for each submodule instead
of reimplementing sub-package dependencies
inside the meta module itself.

Add missing NetworkManager binary to the
network-manager dracut module check.
2023-06-09 08:55:48 -04:00
Antonio Alvarez Feijoo
cd6f683d63 fix(systemd-pcrphase): only include systemd-pcrphase-initrd.service
The only systemd-pcrphase related unit configured to run in the initrd is
systemd-pcrphase-initrd.service.
Both systemd-pcrphase.service and systemd-pcrphase-sysinit.service contain
`ConditionPathExists=!/etc/initrd-release`.
2023-06-08 15:54:38 +02:00
Antonio Alvarez Feijoo
1ef00735ae fix(systemd-tmpfiles): do not include systemd-tmpfiles-clean.timer
The systemd-tmpfiles-clean.timer unit is configured not to run in the initrd
since https://github.com/systemd/systemd/commit/fe7f113c
2023-06-08 15:54:38 +02:00
Antonio Alvarez Feijoo
eff2a93981 fix(systemd-journald): do not include systemd-journal-flush.service
The systemd-journal-flush.service unit is configured not to run in the initrd
since https://github.com/systemd/systemd/commit/fe7f113c
2023-06-08 15:54:38 +02:00
Antonio Alvarez Feijoo
925febf89d fix(systemd): do not include systemd-random-seed.service
The systemd-random-seed.service unit is configured not to run in the initrd
since https://github.com/systemd/systemd/commit/fe7f113c

Also, the systemd-random-seed-load.service does not exist since
https://github.com/systemd/systemd/commit/c35b956d
2023-06-08 15:54:38 +02:00
Mike Gilbert
c1588995ae fix(dracut.sh): correct path for UEFI stub on split-usr systems
systemd always installs the UEFI stub in ${prefix}/lib/systemd/boot/efi.

On split-usr systems, systemdutildir is ${rootprefix}/lib/systemd, which
makes dracut look in the wrong place.

Instead, grab 'prefix' from systemd.pc and store it in 'systemd_prefix'.

Bug: https://bugs.gentoo.org/765208
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
2023-06-08 08:21:54 +02:00
Henrik Gombos
aa20bbb5b1 feat(dracut-init.sh): do not print by default if an udev rule is skipped 2023-06-07 12:15:36 -04:00
Henrik Gombos
c5e036b157 test: move more makeroot dependencies into test-makeroot dracut module 2023-06-07 16:32:30 +02:00
Andrew Halaney
afb5717e67 fix(kernel-modules): add interconnect drivers
Many devicetree based systems require interconnect drivers to function
properly. Include those in the initramfs.

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
2023-06-06 16:33:02 +02:00
Henrik Gombos
d244b316f2 test(LVM-THIN): avoid thin pool size warning
Avoid the following warning by reducing thin pool size

> "Sum of all thin volume sizes exceeds the size of thin pool
> and the size of whole volume group.
2023-06-06 15:40:41 +02:00
Henrik Gombos
739b9e1b38 ci: cleanup containers
Remove /etc/profile.d/dracut-test.sh from test containers
No use to override default command
Remove references to docker. These files work just fine
with podman as well.
2023-06-06 15:36:59 +02:00
Henrik Gombos
ae7cd94b34 test: add empty default test_cleanup implementation 2023-06-06 15:00:32 +02:00
Henrik Gombos
f1346763ab test: move more common test code to test-functions
Move KVERSION and USE_NETWORK definition to test-functions.
Add option for qemu_add_drive_args to initialize drive with size.
2023-06-06 15:00:32 +02:00
Frederick Grose
5ac581ef66 fix(resolve-deps): check the existing file—not the source
Check for dependencies on the file actually installed, otherwise,
such as when the shebang is a link not equal to the initramfs link,
the wrong file may be tested.
2023-06-06 08:51:58 +02:00
Martin Wilck
07af8d5874 fix(dracut-lib.sh): remove successful finished initqueue scripts
If some "finished" initscripts keep failing, dracut will start
printing warnings after a while. But it will warn about all scripts
in the finished initqueue, not only those that have failed. That
makes it difficult to identify the script that has actually
caused the failure.

To avoid this, delete finished initqueue scripts when they succeed.
Also, instead of returning as soon as one of the scripts fails, try
all scripts, deleting those that succeed, and return failure if at
least one script failed.

If a previously deleted script is recreated by some other part of
the code, it will be re-run the next time the check_finished() function
is called, and will be re-deleted if it still succeeds.

The only case where I see that this might cause issues is if some
condition needs to be tested over and over again, because it succeeds
and then fails later (for example, a device showing up and then being
removed again). But I think that this is not the intended logic.
In general, when a device shows up or another "finished" condition
is met, we assume that this condition will hold at least until the
initramfs switches root and exits. If all conditions are met, the
current code will also exit the initqueue without retrying any of
the conditions again.
2023-06-05 17:27:27 +02:00
Henrik Gombos
7310a641e2 fix(udev-rules): remove firmware.rules 2023-06-05 10:24:58 -04:00
Henrik Gombos
fc182ed8cf docs: change ext3 to ext4
Promote ext4 instead of ext3 in the manual.
2023-06-05 15:53:09 +02:00
Henrik Gombos
2a26eec5cc fix(dracut.sh): silence the output of hardlinking files by default 2023-06-05 15:49:15 +02:00
Henrik Gombos
c8a703aaa7 fix(github): exempt issues in a milestone 2023-06-05 14:31:21 +02:00
Sergio E. Nemirowski
07b49a3ed7 fix(virtiofs): add virtio_pci kernel module to virtiofs
fix #2357

Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
2023-06-05 14:23:27 +02:00
Henrik Gombos
c08ae406bc ci: install multipath-tools into openSuse container 2023-05-25 13:37:03 +02:00
Henrik Gombos
d118754333 test: remove references of dhcpd3 from tests
dhcp3-server is no longer supported by Debian
and it is replaced by isc-dhcp-server.
2023-05-19 09:34:04 -04:00
Henrik Gombos
1843c16caf test: move test condition to test_check
This enables skipping the test instead of failing it.
2023-05-18 10:57:23 +02:00
Henrik Gombos
006890a2c3 test: upgrade to ext4
Most users use ext4 instead of ext3 or ext2. Upgrade tests to ext4.
2023-05-13 19:34:22 -04:00
Antonio Alvarez Feijoo
86c8a5a7c2 fix(dracut-systemd): rootfs-generator cannot write outside of generator dir
Although it was already documented in systemd.generator(7) that generators must
not write to locations other than those passed as arguments, since
https://github.com/systemd/systemd/commit/ca6ce62d systemd executes generators
in a mount namespace "sandbox", so now the hooks created by the rootfs-generator
are lost.

These hooks are created using the root= cmdline argument, so this patch moves
the creation of these hooks to a cmdline hook.

Fixes issue #2211
Fixes issue #2225
2023-05-10 08:10:01 -04:00
Antonio Alvarez Feijoo
acfa793b5c fix(dracut-systemd): check and create generator dir outside of inner function 2023-05-10 08:10:01 -04:00
Antonio Alvarez Feijoo
a7c04716a5 fix(dracut-systemd): do not hardcode the systemd generator directory
The normal directory is the first argument passed to the systemd generator,
so use it instead of hardcoding /run/systemd/generator.
2023-05-10 08:10:01 -04:00
Laszlo Gombos
6cd41ab517 ci: add more packages to allow testing more dracut containers 2023-05-10 08:04:08 -04:00
Laszlo Gombos
19c5439510 ci: simplify and sort 2023-05-10 08:04:08 -04:00
keentux
6178a9d83f fix(dracut.sh): handle imagebase for uefi
* UEFI creation didn't handle the ImageBase data for the PE file
  generation. Create an UKI thanks a stub file with a non zero BaseImage
  logs some warning ans generate a bad file offset management. The efi
  becomes unloadable.
* This commit parse the PE file header, get the data and apply the
  ImageBase on the objcopy command.

Fixes dracutdevs#2284

Signed-off-by: Valentin Lefebvre <valentin.lefebvre@suse.com>
2023-05-08 22:04:09 -04:00
Daniel McIlvaney
67591e8855 fix(dracut-functions): avoid calling grep with PCRE (-P)
Invoking grep in Perl mode requires JIT'ing the Perl regex.
This can run into issues with SELinix policy which will generally try to
limit use of execmem in general purpose scripts. This occurs since the
JIT'd code will live in executable  memory.

The PCRE only '\K' command in the Perl REGEX can be replaced by a call
to awk instead.
2023-05-08 00:58:09 -04:00
Antonio Alvarez Feijoo
260883d96f fix(dracut-initramfs-restore.sh): handle /etc/machine-id empty or uninitialized
Handle the case where the user tries to debug the shutdown after explicitly
resetting the /etc/machine-id file.
2023-04-26 12:18:44 +00:00
Antonio Alvarez Feijoo
971b302d70 fix(lsinitrd.sh): handle /etc/machine-id empty or uninitialized
Handle the case where the user tries to query the initrd content after
explicitly resetting the /etc/machine-id file.
2023-04-26 12:18:44 +00:00
Antonio Alvarez Feijoo
97fe09769d fix(dracut.sh): handle /etc/machine-id empty or uninitialized
Handle the case where the user tries to generate the initrd after explicitly
resetting the /etc/machine-id file.

Fixes issue #2267
2023-04-26 12:18:44 +00:00
Antonio Alvarez Feijoo
48c2cb457b feat(systemd-creds): introducing the systemd-creds module
Introducing the systemd-creds module.
2023-04-26 12:15:24 +00:00
Antonio Alvarez Feijoo
71e391ebdc fix(systemd-networkd): add missing conf files and services 2023-04-26 12:11:00 +00:00
Tao Liu
a62e895db9 fix(dracut-functions.sh): convert mmcblk to the real kernel module name
In some x86_64 platforms such as Intel Elkhartlake, an issue of missing
necessary modules due to udevadm drivers field unmatch the real kernel module
name is found:

  $ udevadm info -a /dev/block/179:1

  looking at parent device '/devices/pci0000:00/0000:00:1a.0/mmc_host/mmc0/mmc0:0001':
    KERNELS=="mmc0:0001"
    SUBSYSTEMS=="mmc"
    DRIVERS=="mmcblk"
    ....

The DRIVERS field, aka mmcblk will be given to instmods to install the
corresponding mmc_block.ko kernel module. However mmc_block.ko cannot be
selected by string mmcblk, as a result, mmc_block.ko cannot be installed
in hostonly-mode strict, which will fail to bootup the machine such as in
kdump cases:

  $ /usr/lib/dracut/dracut-install -D /var/tmp --kerneldir /lib/modules/$(uname -r)/ -m mmcblk
  dracut-install: Failed to find module 'mmcblk'

In this patch, we will convert the string mmcblk to mmc_block, so the
kernel module can be successfully loaded.

Signed-off-by: Tao Liu <ltao@redhat.com>
2023-04-14 04:40:04 +00:00
Tianhao Chai
297525c5c0 fix(multipath): remove dependency on multipathd.socket
This reverts commit e39ff407eca1d783ab44093c44db5ee401ff5b1d, removes
an incorrect `Also=` directive from multipathd.service.

`Also=multipathd.socket` is not the correct behavior for a
socket-activated service. This directive has been removed upstream
and dracut should do the same.

This fixes #2289, #2175 where in the cleanup hook running multipath
binary triggers activation of multipathd.service after it is stopped
as dracut prepares to switch root in initrd-cleanup.service.
2023-04-11 08:02:40 +02:00
Frederick Grose
1300a930e7 feat(lsinitrd): notify user on missing compressor
Provide a notice to user if the required compressor package is
missing.  This rather than failing silently.
2023-03-30 11:56:53 -04:00
Frederick Grose
a0d14d3bc6 fix(99base): adjust to allow mksh as initrd shell
Use printf instead of echo in str_replace() to preserve escapes.
Find command paths while PATH includes /usr/sbin. (switch_root was
  not found after the original environment is restored on Fedora.)
2023-03-29 08:11:36 +02:00
Dmitry Klochkov
8b951d20d4 fix(base): do not quote $CLINE in the set command
This is needed to correctly parse init arguments.

Fixes: 2fabaaa62d
2023-03-28 07:33:37 -04:00
Antonio Alvarez Feijoo
df2458a6b8 fix(systemd-ac-power): correct systemd-ac-power binary path
`systemd-ac-power` has been moved from `/usr/lib/systemd` to `/usr/bin/` since
https://github.com/systemd/systemd/commit/251dc2f1
2023-03-22 08:13:14 +01:00
Valentin Lefebvre
f32e95bcad fix(dracut.sh): use dynamically uefi's sections offset
* Uefi section are creating by `objcopy` with hardcoded sections
offset. This commit allow to have the correct offset between
each part of the efi file, needed to create an UKI. Offsets
are simply calculated so no sections overlap, as recommended
in  https://wiki.archlinux.org/title/Unified_kernel_image#Manually
Moreover, efi stub file's header is parsed to apply the correct
offsets according the section alignment factor.
* Remove EFI_SECTION_VMA_INITRD, no need anymore as initrd
section offset dynamically calculated

Fixes dracutdevs#2275

Signed-off-by: Valentin Lefebvre <valentin.lefebvre@suse.com>
2023-03-20 11:56:24 +00:00
Tao Liu
e9b4774239 fix(lvmthinpool-monitor): activate lvm thin pool before extend its size
The state of lvm thin pool may change into inactived state when kdump into
2nd kernel. As a result, lvextend will fail to extend its size. For example:

In 1st kernel:

  $ lvs
  LV       VG         Attr       LSize   Pool     Origin Data%  Meta%
  vol      vg00       Vwi-a-tz-- 300.00m thinpool        70.54
  thinpool vg00       twi-aotz-- 236.00m                 89.67  12.50
  ...

In 2nd kernel:

  LV       VG         Attr       LSize   Pool     Origin Data%  Meta%
  vol      vg00       Vwi-aotz-- 300.00m thinpool        70.54
  thinpool vg00       twi---tz-- 236.00m                 89.67  12.50
  ...

And the lvextend failing log:
[  8.483878] start-thinpool-monitor[590]: lvextend using policy requires the thin pool to be active.

In this patch, we will first activate lvm thin pool before calling lvextend
during kdump.

Signed-off-by: Tao Liu <ltao@redhat.com>
2023-03-06 11:45:47 +01:00
dependabot[bot]
aca5120360 chore(deps): bump luizm/action-sh-checker from 0.5.0 to 0.6.0
Bumps [luizm/action-sh-checker](https://github.com/luizm/action-sh-checker) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/luizm/action-sh-checker/releases)
- [Commits](https://github.com/luizm/action-sh-checker/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: luizm/action-sh-checker
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-01 09:16:33 +01:00
Laszlo Gombos
0e780720ef fix(dmsquash-live): restore compatibility with earlier releases
Follow-up to 40dd5c90e0 .
2023-02-28 08:34:40 +01:00
Pavel Valena
1ddcb137ea fix(dracut.sh): kmoddir does not handle trailing /
Fixes https://github.com/dracutdevs/dracut/issues/2236

+(/) only works in bash interactive mode. Using any non-interactive
bash run simply doesn't remove anything.

The solution is copied from dracut-lib.sh, trim().
2023-02-27 08:26:40 -05:00
Laszlo Gombos
6d554d9b98 fix(udev-rules): remove old eudev specific rule
Revert 64fb0900cb, no longer
needed.
2023-02-27 11:24:52 +01:00
Laszlo Gombos
d648bf805a fix(udev-rules): remove old redhat specific rule
The 40-redhat.rules rule has been removed upstream in 2010.
2023-02-27 11:24:52 +01:00
Laszlo Gombos
6a33e677ac fix(udev-rules): remove old edd_id extra rules
The 61-persistent-storage-edd.rules rule has been removed upstream
in 2012.
2023-02-27 11:24:52 +01:00
Laszlo Gombos
1edc41af97 fix(udev-rules): remove old debian specific rules
The last Debian release that carried 91-permissions.rules is wheezy.
2023-02-27 11:24:52 +01:00
“Masahiro
8f9ad06873 feat(test): nfs_fetch_url test into nfs test
This is to check the behavior of nfs_fetch_url() in nfs-lib.sh.
nfs_fetch_url() calls nfs_already_mounted() internally.
A file /nfs/client/root/fetchfile is on NFS server, which is fetched
from clients for testing with nfs_fetch_url().
2023-02-24 10:06:05 -05:00
“Masahiro
966b6cec1b fix(url-lib.sh): nfs_already_mounted() with trailing slash in nfs path
nfs_already_mounted() doesn't work when the installation ISO and kickstart file on a same NFS share are specified with inst.repo and inst.ks boot parameter as below.

   inst.repo=nfs:192.168.1.1:/home/data/rhel9.iso inst.ks=nfs:192.168.1.1:/home/data/ks.cfg

   NOTE: /home/data is configured for nfs share on 192.168.1.1

One problem is a file (not a directory) was passed into nfs_already_mounted().
nfs_already_mounted() is the function to judge if the given directory is already mounted.
So, filepath should be passed in nfs_fetch_url().

The other problem is about the trailing slash in the nfs path in /proc/mounts.

The /proc/mounts has an entry after nfs mount of inst.repo.

   192.168.1.1:/data/   /run/install/isodir  nfs  ro,relatime,<snip>

In this case, nfs_already_mounted() returns "/run/install/isodir//home/data/ks.cfg" wrongly. The following is from the log.

[   14.556279] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@156(nfs_fetch_url): nfs_already_mounted 192.168.122.1 /home/data/ks.cfg
[   14.556279] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@137(nfs_already_mounted): local server=192.168.122.1 path=/home/data/ks.cfg s= p=
...
[   14.654966] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@140(nfs_already_mounted): '[' 192.168.122.1 = 192.168.122.1 ']'
[   14.654966] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@141(nfs_already_mounted): '[' /home/data/ks.cfg = /home/data/ ']'
[   14.654966] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@143(nfs_already_mounted): str_starts /home/data/ks.cfg /home/data/
[   14.654966] localhost.localdomain dracut-initqueue[1282]: ///lib/dracut-lib.sh@51(str_starts): '[' ks.cfg '!=' /home/data/ks.cfg ']'
[   14.654966] localhost.localdomain dracut-initqueue[1282]: ///lib/url-lib.sh@144(nfs_already_mounted): echo /run/install/isodir//home/data/ks.cfg
...
[   14.658069] localhost.localdomain dracut-initqueue[934]: //lib/url-lib.sh@156(nfs_fetch_url): mntdir=/run/install/isodir//home/data/ks.cfg

This function doesn't expect the trailiing slash of the nfs path in /proc/mounts, so it should be removed before processing it.
2023-02-24 10:06:05 -05:00
Frantisek Sumsal
f9bcd4d2c8 ci: use CodeQL instead of LGTM
As LGTM is going to be shut down by EOY[0], let's move the code scanning to
CodeQL as recommended. Thanks to GH integration the results from such
scans will be shown both in the respective PR and in the Security ->
Code Scanning tab[1].

[0] https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/
[1] https://github.com/dracutdevs/dracut/security/code-scanning
2023-02-22 15:49:56 -05:00
Antonio Alvarez Feijoo
ae88e029c6 feat(dracut): use log level indicator in console output
Also, use the same format in messages printed to console before dracut-logger
is sourced.

Fixes issue #1065
2023-02-22 15:20:52 -05:00
Pavel Valena
df381b7e0c feat(kernel-modules): driver support for macbook keyboards
Discussed in: https://bugzilla.redhat.com/show_bug.cgi?id=2166209
2023-02-21 15:34:49 -05:00
Adrien Thierry
131822e26d fix(dracut-install): prevent possible infinite recursion with suppliers
During search for fw_devlink suppliers, it's possible to encounter a
situation where supplier A depends on supplier B, and supplier B has a
parent node that depends on supplier A. This leads to an infinite
recursion.

To fix this, make sure suppliers are only processed once.

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-02-21 20:05:44 +00:00
John Meneghini
f3a7172db5 build: remove rpm spec file and build rules
As discussed in issue #2204 this patch removes the dracut.spec file from
the repository.  The advantage of this patch is that it creates a
dracut-version.tar.xv file that can be more easily consumed by the
downstream distributions because there's no rpm spec file included in
the distribution.

Tested with a downstream rpm spec fiie:

```
cd dracut
VERSION=`git describe --abbrev=0 --tags --always`
make clean
make dist
cp dracut-${VERSION}.tar.xz ../
cd ..

xz -d -v dracut-${VERSION}.tar.xz
tar rf dracut-${VERSION}.tar dracut.spec
xz -9 dracut-${VERSION}.tar

rm -rf rmpbuild
mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
rpmbuild -ta --define "_topdir `pwd`/rpmbuild" -v dracut-${VERSION}.tar.xz
```

Fixes issue #2204
2023-02-16 20:15:37 +00:00
Adrien Thierry
89269d239f fix(kernel-modules): add UFS drivers
Add ufs to the list of block drivers as it is used in modern embedded
systems.

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-02-15 12:59:13 +01:00
Adrien Thierry
87a76dbb57 fix(kernel-modules): use modalias info in get_dev_module()
When calling dracut with '--hostonly-mode=strict', get_dev_module() gets
called on the system's block devices to find the required drivers. The
driver name is retrieved using udevadm. However, the driver name
returned by udevadm is not necessarily the same as the module name.
This is the case for the Qualcomm UFS driver: udevadm returns
'ufshcd-qcom' while the module name is 'ufs-qcom', so dracut-install is
not able to find the module afterwards.

To solve this, make get_dev_module() also return the module alias info
from the modalias files contained in the sysfs directories parsed by
udevadm.

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-02-15 12:59:13 +01:00
Jóhann B. Guðmundsson
c5dca3d689 fix(crypt): add missing libraries
Add missing libraries, closes #2137
2023-02-14 18:14:27 -08:00
Lubomir Rintel
61ceb35f40 revert(network-manager): avoid restarting NetworkManager
This reverts commit 77630365ae.

Its commit message states:

  On EL8.3 the NetworkManager keep restarting even if it exits successfully
  while waiting for Clevis to unlock. This patch ensures NetworkManager runs
  only once in initrd.

Yes; NetworkManager is run multiple times, so that it's able to
configure interfaces that haven't been seen previously (because bus was
slow to scan or device took time to initialize).

It's not clear what problem was the original commit trying to fix.
I suspect there was no problem, just a misunderstanding.
2023-02-14 16:56:34 +01:00
Antonio Alvarez Feijoo
a6dd5bfb9a fix(dracut.sh): handle sbsign errors for UEFI builds
`sbsign` does not issue any error if there is not enough disk space to create
the signed file using its `--output` option. So, verify the signed image after
its creation using `sbverify`.

Fixes issue #2197
2023-02-13 18:45:51 +00:00
Antonio Alvarez Feijoo
8602df7058 fix(dracut.sh): handle out of space error for UEFI builds
If `cp` fails, do not continue, print an error and exit, like it's already
being done for non-UEFI builds.
2023-02-13 18:45:51 +00:00
Martin Wilck
726d56ca0a fix(network): IPv6: don't wait for RA for static IPv6 assignments
This patch reverts commit
c603419 ("wait for IPv6 RA if using none/static IPv6 assignment").
It's not generally correct wait for a default route to be established
for an interface, or to wait for "proto ra" routes in general.
For example, if the system is a router itself, it will receive no
RAs. In isolated networks, no gateway may be advertized, either.
This is similar in spirit to 76f6566 ("Revert "wait for IPv6 RA
if using none/static IPv6 assignment"")

Whatever c603419 ("wait for IPv6 RA if using none/static IPv6 assignment")
was supposed to achieve, it should be done differently.
2023-02-13 16:17:45 +01:00
Martin Wilck
b074216be9 fix(network-legacy): always include af_packet
For static IPv4 configurations, we use arping to check for duplicate
IP addresses. arping requires the af_packet module to work, and if arping
fails, the IP address will not be set and booting will fail.
af_packet may not be loaded / required in the running system, for example if
the system had been booted in an IPv6 configuration, or if it had been
manually unloaded. Make sure it's included in initramfs in hostonly mode, too.
2023-02-13 16:17:45 +01:00
Martin Wilck
7ff255a448 fix(network): don't assume prefix length 64 by default
Assuming a default prefix length of 64 by default if no explicit
prefix length is given is wrong and known to cause connectivity
problems in some networks. A prefix length of 128 should be assumed
in this case.

See https://www.rfc-editor.org/rfc/rfc5942 (specifically section 5)
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684009
2023-02-13 16:17:45 +01:00
Martin Wilck
c3b65a493a fix(iscsi): prefix syntax for static iBFT IPv6 addresses
ibft_to_cmdline() formats a static IPv6 address like this
(without peer, gateway, hostname):

  ip="[fd09:9a46:b5c1:1fe:1::10/64]:::::ibft0:none"

This means that the "mask" field (4th) is left blank. When this is
parsed later by parse-ip-opts.sh, it bails out with the error
message "Sorry, automatic calculation of netmask is not yet supported".

parse-ip-opts.sh rather expects the prefix in the 4th field:

  ip="[fd09:9a46:b5c1:1fe:1::10]:::64::ibft0:none"

This syntax will be correctly transformed to the command

  ip addr add fd09:9a46:b5c1:1fe::10/64 dev ibft0

This patch fixes the formatting of the "ip=" line in ibft_to_cmdline().
2023-02-13 16:17:45 +01:00
Martin Wilck
aa5d9526ec fix(iscsi): install 8021q module unconditionally
In iBFT setups, VLAN can be configured in the firmware.
Add the 8021q module in hostonly mode even if VLAN is currently
not used to be prepared for such configuration change.
2023-02-13 16:17:45 +01:00
Adrien Thierry
3de4c73132 feat(dracut-install): add fw_devlink suppliers as module dependencies
Dracut currently finds kernel module dependencies using two methods:
depmod and softdeps. However, these are often insufficient on embedded
systems where a lot of driver dependencies are only described in the
device tree. This is often the case for low-level devices such as
clocks, regulators, pinctrls, etc.

This patch allows dracut to find those device tree dependencies, by
parsing the sysfs supplier nodes populated by fw_devlink.

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-02-13 13:29:12 +00:00
Adrien Thierry
f0c3b68327 refactor(dracut-install): add Hashmap cleanup function
This is prep work for adding support for fw_devlink suppliers
dependencies.

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-02-13 13:29:12 +00:00
Adrien Thierry
8ea8cf5f56 refactor(dracut-install): add function to install one dependent module
This is prep work for adding support for fw_devlink suppliers
dependencies.

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2023-02-13 13:29:12 +00:00
dependabot[bot]
88aeca2a38 chore(deps): bump luizm/action-sh-checker from 0.2.2 to 0.5.0
Bumps [luizm/action-sh-checker](https://github.com/luizm/action-sh-checker) from 0.2.2 to 0.5.0.
- [Release notes](https://github.com/luizm/action-sh-checker/releases)
- [Commits](https://github.com/luizm/action-sh-checker/compare/v0.2.2...v0.5.0)

---
updated-dependencies:
- dependency-name: luizm/action-sh-checker
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 12:12:21 +00:00
Laszlo Gombos
16931f5236 chore(shfmt): update to pass with shfmt v3.5.1 2023-02-13 12:08:36 +00:00
Antonio Alvarez Feijoo
d777dd3dab fix(fips): move fips-boot script to pre-pivot
This is needed in s390x to be able to use the same `boot=` command line
parameter in grub and zipl. Otherwise, `boot=` would need to be added only to
`grub.cfg` (not `/etc/default/grub` and thereby not to `/boot/zipl/config`).

Signed-off-by: Raymund Will <rw@suse.com>
2023-02-13 12:00:01 +00:00
Antonio Alvarez Feijoo
ab26ad2c2a fix(fips): only unmount /boot if it was mounted by the fips module
The `do_fips` method should only unmount /boot if it was mounted in the
`mount_boot` method.

In addition, now the `mount_boot` method checks if /boot is already mounted.

Signed-off-by: Raymund Will <rw@suse.com>
2023-02-13 12:00:01 +00:00
Antonio Alvarez Feijoo
68d0653e35 feat(fips): add progress messages
This allows to better understand at what point a FIPS integrity test failed.

Signed-off-by: Raymund Will <rw@suse.com>
2023-02-13 12:00:01 +00:00
Antonio Alvarez Feijoo
1fabbb6412 fix(fips): do not blindly remove /boot
The `mount_boot` method called from fips-noboot.sh in the pre-pivot hook blindly
executes `rm -rf /boot` if there is no `boot=` command line parameter, without
first checking that /boot is not already mounted by other means.
2023-02-13 12:00:01 +00:00
Laszlo Gombos
c95075e2c7 chore(base): remove support for <udev-176
This reverts 579238a3ac.

Keep the support for prepare_udev_rules for out-of-tree
dracut modules and issue a deprecation warning.
2023-02-13 11:58:52 +00:00
Laszlo Gombos
d6cef3f28e fix(plymouth): remove /etc/system-release dependency
/etc/*release files should not be managed in the plymouth module
and more importantly dracut assumes /etc/os-release not
/etc/system-release
2023-02-13 11:18:58 +00:00
наб
e3a7112bef feat(resume): also consider resume= in the cmdline as enabling hibernation
Don't consider noresume to disable, that's a single-boot flag

Closes #924
2023-02-13 10:57:11 +00:00
Beniamino Galvani
d8a9a73df9 fix(network-manager): add "After" dependency on dbus.service
During shutdown, there is no ordering dependency between the nm-initrd service
and the D-Bus daemon, and so the latter can be stopped before. This causes
issues to NetworkManager, especially when team interfaces are present because
NM will see teamd dropping from the bus and will try to reactivate the
connection.

Add a "After" dependency to make sure the D-Bus daemon is stopped after NM on
shutdown.
2023-02-13 10:54:41 +00:00
Laszlo Gombos
1597076887 fix(fido2): libfido2.so depends on libz.so
Co-authored-by: cs50guy2
2023-02-13 10:51:42 +00:00
Antonio Alvarez Feijoo
9a531ca044 fix(dracut-install): continue parsing if ldd prints "cannot execute binary file"
When the kernel is compiled without IA32_EMULATION and the glibc 32-bit library
is installed on the system, `ldd` prints the following output:

```
> ldd /usr/lib64/libfido2.so.1.12.0
/bin/ldd: line 162: /lib/ld-linux.so.2: cannot execute binary file: Exec format error
	linux-vdso.so.1 (0x00007ffd627fa000)
	libcbor.so.0.9 => /lib64/libcbor.so.0.9 (0x00007f18d799f000)
	libcrypto.so.3 => /lib64/libcrypto.so.3 (0x00007f18d7400000)
	libudev.so.1 => /lib64/libudev.so.1 (0x00007f18d7971000)
	libhidapi-hidraw.so.0 => /lib64/libhidapi-hidraw.so.0 (0x00007f18d7968000)
	libz.so.1 => /lib64/libz.so.1 (0x00007f18d794e000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f18d7205000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f18d79f9000)
> echo $?
0
```

The `ldd` script uses the following code to resolve dependencies:

```
RTLDLIST="/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2 /libx32/ld-linux-x32.so.2"
...
RTLD=
ret=1
for rtld in ${RTLDLIST}; do
  if test -x $rtld; then
    verify_out=`${rtld} --verify "$file"`
    ret=$?
    case $ret in
      [02]) RTLD=${rtld}; break;;
    esac
  fi
done
```

So, if the 32-bit library fails, the 64-bit library may work, so don't stop
parsing the `ldd` output unconditionally when the message "cannot execute binary
file" is printed.

Fixes issue #2190
2023-02-13 10:21:53 +00:00
0x5c
7b530f2636 fix: make iso-scan trigger udev events
Fixes #2183
2023-02-13 08:56:39 +01:00
Beniamino Galvani
ab07f6d1ee ci: enable test 60
It's hopefully stable now.
2023-02-13 08:53:39 +01:00
Beniamino Galvani
3d7c0ffbd6 fix(test): rename test 60
The test *also* checks the generation of ifcfg files, but it's primarily a test
for bonding, bridging and VLANs. Update the name to reflect this.
2023-02-13 08:53:39 +01:00
Beniamino Galvani
5e846cb132 fix(test): improve test 60
The test has the following issues:

 - it sets up a bridge on net1 and net2, however those interfaces
   are part of the same qemu hub and this causes switching loops;

 - the bonds are created on two interfaces but only one has a DHCP server, and
   this causes random failures;

 - the checks performed on the client are pretty limited.

Rework the test:

 - avoid the bridging loop;

 - update the topology to use a bond interface on the server side;

 - introduce additional checks on the client: start a ping and check that ports
   are properly attached to bonds and bridge;

 - make it possible to return module-specific information from the client; in
   the future this can be added for example to check that the NetworkManager or
   systemd-networkd configuration is correct.
2023-02-13 08:53:39 +01:00
Beniamino Galvani
8f44740f2c fix(test): remove leftover link file from server rootfs
01-client.link must be removed, otherwise it conflicts with 01-server.link that
sets a different naming policy.
2023-02-13 08:53:39 +01:00
Beniamino Galvani
9fb64d96ab fix(test): assign fixed address to bridge
Kernel uses the lowest MAC of all attached ports as MAC address of the
bridge. However, after the first port gets attached, DHCP can be started on the
bridge and it will use the MAC (and client-id) of the first port; so, the MAC
used for DHCP depends on the order of attachment of ports, which is not
guaranteed to be stable in general.

To make sure that the DHCP server always sees the request from the MAC of
enp0s1, assign that MAC to the bridge from the kernel command line.
2023-02-07 14:40:11 +01:00
Beniamino Galvani
462d9b9254 fix(test): bump DHCP timeout to 30 seconds
The current interval (3 seconds) is very low and causes sporadic failures
especially when DHCP is run on a bridge (TEST-50-MULTINIC); in that specific
case, interfaces take time to be attached to the bridge and before enp0s1 is
attached all DISCOVER packets are lost.

Bump the timeout to a more robust value of 30 seconds.
2023-02-07 14:40:11 +01:00
Beniamino Galvani
da95948333 fix(test): remove check on dhclient support for --timeout
The network-legacy dracut module already ignores the DHCP timeout option when
it's not supported by dhclient. Other network modules don't use dhclient for
DHCP.
2023-02-07 14:40:11 +01:00
Beniamino Galvani
d3993c7dab fix(test): adapt multinic test for new NetworkManager versions
Since version 1.42, NetworkManager creates a "external" connection for the
loopback interface. Ignore that connection in the multinic test.
2023-02-07 14:40:11 +01:00
Khem Raj
70aeb4c1a5 fix(install): do not undef _FILE_OFFSET_BITS
_FILE_OFFSET_BITS is a feature test macro to determine largefile
support. Usually its set to 64 on systems supporting LFS. Its also
needed to be set to 64 for supporting 64bit time_t on glibc on 32bit
systems. If its undefined explicitly, then 64bit time_t can not be
enabled.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-06 07:19:58 -05:00
dependabot[bot]
18c5fb6ae0 chore(deps): bump docker/build-push-action from 3 to 4
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 08:26:43 +01:00
Antonio Alvarez Feijoo
6f4a5c90ab fix(dracut.sh): --sysroot option broken if global variables not set in conf
When `$dracutsysrootdir` is set and references an existing directory, the
internal global variables are never set, unless their value is assigned via
configuration file.

The simple fix would be turn all:

```
[[ -d $dracutsysrootdir$var ]] || var=value
```
into:
```
[[ -z $var || ! -d $dracutsysrootdir$var ]] && var=value
```

But this patch also includes a refactoring, removing duplicate code using the
same `set_global_var` function to set and export global variables, and improving
readability.
2023-02-02 08:13:30 +01:00
Antonio Alvarez Feijoo
823de8fe53 refactor(dracut-init.sh): remove redundant "dracut" from "dracut module" prints
In a similar fashion than "Including module" prints.
2023-02-02 08:11:24 +01:00
Antonio Alvarez Feijoo
a10078a5c3 feat(dracut-init.sh): specify if a module cannot be found or cannot be installed
Do not print the same error message for both situations.
2023-02-02 08:11:24 +01:00
Antonio Alvarez Feijoo
1f84ff882f fix(lsinitrd.sh): handle filenames with special characters
Printing and unpacking of specific files passed as arguments does not work if
their filenames contain special characters with a hexadecimal character escape
(\x), which is often the case for systemd device units.
2023-01-31 08:44:57 +01:00
Antonio Alvarez Feijoo
eb75861c2a fix(dracut-systemd): remove unused argument
The `generator_wait_for_dev` function of the dracut rootfs systemd generator
only uses the first argument. Moreover, RDRETRY is unset at this point.
2023-01-27 16:55:03 +01:00
Antonio Alvarez Feijoo
a109c6123f feat(lvm): always include all drivers that LVM can use
This patch adds all the kernel modules that might be needed by LVM, to avoid
having to rebuild the initrd in hostonly mode after a dynamic change that
requires new drivers to boot.

For example, LVM allows to dynamically convert a linear logical volume to a
RAID-1 type (`lvconvert --type raid1 vg/lv`), which, in hostonly mode, will
require the user to manually rebuild the initrd again to include the new RAID
drivers in use, otherwise the system will fail to boot.
2023-01-27 16:16:35 +01:00
Antonio Alvarez Feijoo
1aafcab935 fix(dracut-init.sh): correct typo in comment 2023-01-27 08:03:54 +00:00
Antonio Alvarez Feijoo
cda6b00abc fix(dracut.sh): correct --help and --version exit codes
Both are valid options that cause regular program termination without errors, so
dracut should return 0.
2023-01-27 08:02:57 +00:00
Antonio Alvarez Feijoo
e971c788f0 refactor(virtiofs): remove exit after die
The `die` function already ends with `exit 1`.
2023-01-27 08:01:50 +00:00
Laszlo Gombos
3c16c76fb5 ci: fix Gentoo container used for testing 2023-01-19 14:22:22 +01:00
LinkTed
e3e8108eb7 fix(crypt-gpg): do not use always --card-status
If no GPG smart card is used then the card-status breaks the decryption
of the keyfile. Therefore, use the card-status only if a smart card is
used to decrypt the keyfie.

Fixes issue #2004
2023-01-06 15:07:49 -05:00
Jóhann B. Guðmundsson
f6bb4a36b7 docs(RELEASE.md): update release docs
- Remove the reference to Harald's git ci alias
- Added a missing push to master
- Added a warning not to add the Rendered View entry from the NEWS.md to
  the tags. ( Github adds that to the release with no way of removing it, see 058 )
- Added validation of the new tag ( Good practice )
- Clarify milestone handover.
2023-01-05 23:49:37 -05:00
Laszlo Gombos
b060945c45 ci: disable test 50
Test 50 (MULTINIC) seems to be the only test that prevents
the project from having an all passing continuous integration
test suite.
2023-01-04 10:18:08 +01:00
Antonio Alvarez Feijoo
88fe9205de fix: shellcheck 0.8.0 2023-01-04 05:38:58 +00:00
Laszlo Gombos
9333944436 fix(dmsquash-live): live:/dev/*
fix a bug introduced in 71cfa2e22

make sure root is set correctly for both of the following cases
 - "root=live:/dev/*"
 - "rd.live.image root=/dev/*"
2023-01-03 15:09:12 +01:00
Frederick Grose
10cf8e46f4 fix(load_fstype): avoid false positive searchs
Refactor to avoid substring matches
  and to speed processing.
Also avoid xtracing.
2022-12-30 09:13:00 -05:00
Laszlo Gombos
08b63a2529 fix: shellcheck 0.8.0 2022-12-30 09:10:00 -05:00
наб
94dcac7ccd refactor(dracut-install): strerror(errno) -> %m 2022-12-28 16:37:51 +01:00
наб
efd4ca271f perf(dracut-install): don't strdup() environment block 2022-12-28 16:37:51 +01:00
наб
77226cb412 perf(dracut-install): don't reallocate {src,dst}path in hmac_install() 2022-12-28 16:37:51 +01:00
наб
a20556f0e5 perf(dracut-install): don't strdup() excessively for dracut_install() 2022-12-28 16:37:51 +01:00
наб
e7ed8337bb perf(dracut-install): stat() w/unused buf -> access(F_OK) in dracut-install 2022-12-28 16:37:51 +01:00
наб
751a110f29 perf(dracut-install): multiple single-character strstr()s -> strpbrk() 2022-12-28 16:37:51 +01:00
наб
1e5237dd77 chore: remove src/install/hashmap.lo 2022-12-28 16:37:51 +01:00
Laszlo Gombos
9dbbebb133 feat(network-wicked): remove module
wicked is being phased out from openSUSE
https://news.opensuse.org/2022/01/28/bash-systemd-libvirt-update-in-tw/
2022-12-28 08:40:23 +01:00
Jóhann B. Guðmundsson
0aa08f0ebf docs: update NEWS.md and AUTHORS 2022-12-24 16:49:27 +00:00
Jóhann B. Guðmundsson
794ce5e3ee fix(NEWS.md): add missing entries
I somehow managed to screw the update of news when making a release fixing my
mistake.
2022-12-24 16:10:39 +00:00
Antonio Alvarez Feijoo
b3d219b475 fix(systemd-timedated): add missing dbus-org.freedesktop.timedate1.service
Without this service, timedatectl fails to run in the initrd.

```
sh-5.2# timedatectl
Failed to query server: Could not activate remote peer: activation request failed: unknown unit.
sh-5.2# systemctl status dbus | grep timedate
Dec 22 13:57:03 sd-net-test dbus-broker-launch[219]: Activation request for 'org.freedesktop.timedate1' failed: The systemd unit 'dbus-org.freedesktop.timedate1.service' could not be found.
```
2022-12-24 14:30:54 +00:00
Antonio Alvarez Feijoo
4fca292b95 fix(systemd-hostnamed): add missing dbus-org.freedesktop.hostname1.service
Without this service, hostnamectl fails to run in the initrd.

```
sh-5.2# hostnamectl
Failed to query system properties: Could not activate remote peer: activation request failed: unknown unit.
sh-5.2# systemctl status dbus | grep hostname
Dec 22 11:07:56 sd-net-test dbus-broker-launch[216]: Activation request for 'org.freedesktop.hostname1' failed: The systemd unit 'dbus-org.freedesktop.hostname1.service' could not be found.
```
2022-12-24 14:30:19 +00:00
Antonio Alvarez Feijoo
7ed0461810 fix(dbus-broker): add missing sockets.target.wants/dbus.socket
If dbus.socket is not started automatically in the initrd, all binaries that
require dbus to work fail.
2022-12-24 14:29:25 +00:00
Antonio Alvarez Feijoo
a540c95bbf fix(systemd-hostnamed): correct sysusers configuration
Lines of type 'g' don't take a GECOS field.
2022-12-24 14:28:28 +00:00
Laszlo Gombos
776075ea12 test(FULL SYSTEMD): make test 04 use the test dracut modules
Add test case for systemd.unit and  systemd.mask arguments
instead of extra test setup steps.
2022-12-22 09:09:03 +01:00
Laszlo Gombos
8f10cbe77f test(FULL SYSTEMD): remove unnecessary dependencies 2022-12-22 09:09:03 +01:00
Laszlo Gombos
b55563f635 feat(overlayfs): add new overlayfs module to dracut.spec 2022-12-22 08:15:35 +01:00
Antonio Alvarez Feijoo
b4de9ee107 fix(zipl): remove trailing spaces from zipl boot device name
Trailing spaces are misleading blkid input after fixes for shellcheck were
introduced in https://github.com/dracutdevs/dracut/commit/d75b029a

Test showing the wrong output:

```
localhost:~ # _boot_zipl=$(sed -n -e '/^[[:space:]]*#/d' -e 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
localhost:~ # echo "[${_boot_zipl}]"
[/dev/disk/by-path/ccw-0.0.0000-part1  ]
localhost:~ # blkid -s TYPE -o udev "${_boot_zipl}"
localhost:~ # blkid -s TYPE -o udev ${_boot_zipl}
ID_FS_TYPE=ext2
```

Also, remove duplicate code by creating a function to get the zipl boot device,
prepend $dracutsysrootdir to /etc/fstab and print cmdline properly: start
with a space and do not print a newline.
2022-12-21 17:16:47 +00:00
Kenneth D'souza
e877be69b4 fix(lsinitrd.sh): add a missing path to image
The initramfs file for Fedora/RedHat CoreOS can be found under
`/lib/modules/${KERNEL_VERSION}/initramfs.img', add this path
to image search logic.

Signed-off-by: Kenneth D'souza <kennethdsouza94@gmail.com>
2022-12-21 16:53:20 +00:00
Antonio Alvarez Feijoo
9cc7ceec1e fix(dracut): allow to set persistent policy based on /dev/mapper device names
Currently, dracut only allows to configure the persistent policy to address
disks and partitions using any directory name found in /dev/disk, but there is
no defined way to set the default policy based on /dev/mapper device names. So,
for example, if the persistent policy is set by the distribution in any
configuration file, the user cannot set the default if he wants to.

The current workaround is to set persistent_policy="" in a conf file or pass
--persistent-policy " " (white space) as an argument. This patch aims to
establish a specific value for this case.
2022-12-21 16:29:39 +00:00
Kairui Song
d460941b51 fix(dracut-init): make require_kernel_modules ignore no kernel build
If --no-kernel is specified, kernel module checking won't work, just
skip it.

Signed-off-by: Kairui Song <kasong@tencent.com>
2022-12-21 17:07:46 +01:00
Kairui Song
7917d7976d fix(iscsi): don't install the module if kernel doesn't support iscsi
The cmdline hook of iscsi module will force check if iscsi_tcp module
is available, and abort the boot progress is not. But actually iscsi
module shouldn't be allowed to be installed in the first place if the
corresponding kernel doesn't support it.

So print an warning and refuse to install the iscsi dracut module
in such case, instead of dying on reboot.

Signed-off-by: Kairui Song <kasong@tencent.com>
2022-12-21 17:07:46 +01:00
Kairui Song
d4a9d6b4c0 feat(squash): use require_kernel_modules for better module checking
require_kernel_modules prints more friendly erorr message and make the
code cleaner.

Signed-off-by: Kairui Song <kasong@tencent.com>
2022-12-21 17:07:46 +01:00
Kairui Song
d3a5e6312a feat(dracut-init.sh): introduce a new helper require_kernel_modules
Some dracut modules won't work without certain kernel modules,
this helper will be helpful for checking such kernel configs in
check() and error out early.

Signed-off-by: Kairui Song <kasong@tencent.com>
2022-12-21 17:07:46 +01:00
Kairui Song
6c42d378ab fix(dracut-functions.sh): check_kernel_module should follow dracutsysrootdir
check_kernel_module calls modprobe and tries to dry-run a module load to
check if a module is available. modprobe supports `-d` to specify a
rootdir, so just pass dracutsysrootdir to it to make it work as expected
when building initramfs for another rootfs.

Signed-off-by: Kairui Song <kasong@tencent.com>
2022-12-21 17:07:46 +01:00
Laszlo Gombos
f66a02e5a9 ci: there is no longer a need for special handling test 04 2022-12-21 16:17:46 +01:00
Laszlo Gombos
2bb1c4f7f3 ci: reduce the timeout for local tests to 30 min
The main motivation here is to do not allow each test to grow beyond
30 min. If a longer test is needed for some reason, it should be
split into two tests.

Currently each local test is passing at 20 min.

The longest running local test is test 12: encrypted LVM PV
on a degraded RAID-5.
2022-12-21 16:17:46 +01:00
Laszlo Gombos
58e2311589 ci: run all local tests on all containers 2022-12-21 16:17:46 +01:00
Laszlo Gombos
31938c5980 refactor(dmsquash-live): move ntfs-3g code to dmsquash-live-ntfs
Since the installation of ntfs-3g binary is in the
dmsquash-live-ntfs module, calling ntfs-3g from dmsquash-live fails
when dmsquash-live-ntfs module is not installed anyways.
2022-12-21 14:30:48 +00:00
Antonio Alvarez Feijoo
d32d221efd fix(dracut.sh): split drivers_dir check
The directory where to look for kernel modules can be set via the -k/--kmoddir
command line option or the drivers_dir configuration option. Its current check
should be split into two different ones to avoid misleading error messages (see
referenced issue):
- First check that its basename matches the kernel version set for the initramfs
(via --kver or automatically set by "uname -r").
- Second check that the parent directory of the last provided directory contains
"/lib/modules/". This check was also fixed to avoid accepting other directories
like "xxxlib/modules".

Fixes issue #1608
2022-12-21 14:28:30 +00:00
Antonio Alvarez Feijoo
8d46cc01a9 perf(dracut.sh): do not mkdir $initdir/lib/dracut within a loop
This directory is always needed to store files like modules.txt and
build-parameter.txt, so always create it, but only in one place.
2022-12-21 14:14:45 +00:00
Antonio Alvarez Feijoo
e3ec51e128 fix(systemd-timesyncd): typo in systemd-time-wait-sync.service local conf path 2022-12-21 13:34:04 +00:00
Scott Moser
7d3184e430 fix(lvm): drop dm-eventd binary and libs from initramfs
Per David Teigland:

 > dmeventd is not meant to be run in the initrd. When it's started
 > later, it will monitor LVs activated by the initrd if needed.

So, lets git rid of the dmeventd binary and the libraries that were
being added for it.
2022-12-21 12:44:50 +00:00
Laszlo Gombos
5b92eeba83 test: disable debug logging by default
This makes the the tests more consistent, run faster by default
and less likely to timeout on the CI.
2022-12-21 12:39:45 +00:00
Laszlo Gombos
1586621b19 test: do not omit dash module
It should not be necessary to explicitly omit dash module.
If this is needed, that would mean that bash is not marked
as an explicit dependency for some modules.
2022-12-21 12:12:04 +00:00
Antonio Alvarez Feijoo
097dd367bb fix(dracut): shellcheck regression in DRACUT_INSTALL calls
If the DRACUT_INSTALL environment variable contains arguments (e.g.:
DRACUT_INSTALL="/usr/lib/dracut/dracut-install --debug"), its call cannot
be enclosed in double quotes. E.g.:

```
> export DRACUT_INSTALL="/usr/lib/dracut/dracut-install"
> "$DRACUT_INSTALL" > /dev/null
dracut-install: No SOURCE argument given
> export DRACUT_INSTALL="/usr/lib/dracut/dracut-install --debug"
> "$DRACUT_INSTALL" > /dev/null
-bash: /usr/lib/dracut/dracut-install --debug: No such file or directory
> $DRACUT_INSTALL > /dev/null
dracut-install: No SOURCE argument given

```
2022-12-21 12:10:01 +00:00
Laszlo Gombos
e450085eb8 ci: introduce more networking options into test containers
Add systemd-networked to Fedora container.
Add connman to Arch container.

This change enables manual testing of various network configurations
and also allows the ci to ensure that having additional networking
packages installed does not break the network meta module.
2022-12-21 11:31:24 +00:00
Mikhail Novosyolov
e0d57a8f5b fix(90kernel-modules): MMC and NVMe on kernels 6.0+
Commit 6f8191fdf41 ("block: simplify disk shutdown") in Linux kernels 6.0 and above
renamed blk_cleanup_disk to blk_mq_destroy_queue. Adapt code to handle both cases.

Because of this the kernel module mmc_block.ko was not included into initrd on kernel 6.1:
dracut-install: No symbol or path match for '/lib/modules/6.1.0-generic-0.rc7.1rosa2021.1-x86_64//kernel/drivers/mmc/core/mmc_block.ko.zst
while on kernel 5.15 it was included:
dracut-install: Handling /lib/modules/5.15.79-generic-1rosa2021.1-x86_64//kernel/drivers/mmc/core/mmc_block.ko.zst
dracut-install: Module mmc_block: symbol blk_cleanup_queue matched inclusion filter

It made booting OS from root on /dev/mmcblk* impossible.

Just adding blk_mq_destroy_queue was not enough to make mmc_block.ko be included into initrd
(maybe because call of blk_cleanup_disk() was removed and call of blk_mq_destroy_queue() was not added).
So also adding blk_mq_alloc_request which is used from mmc_block.

Fixes: https://github.com/dracutdevs/dracut/issues/2102
2022-12-19 07:53:15 -05:00
keentux
28f3772444 refactor: use read -r instead of cat
Fixes #2093: Bad style `var=$(cat <file>)`. Replace by `read -r var < file`

Signed-off-by: keentux <valentin.lefebvre@suse.com>
2022-12-19 10:43:37 +01:00
Laszlo Gombos
376c2360b5 ci: document workaround for Gentoo 2022-12-19 10:00:52 +01:00
Laszlo Gombos
7299c14e0e test: rpc.idmapd is optional for NFS
See dracut NFS module (95nfs/module-setup.sh).
2022-12-19 10:00:52 +01:00
Laszlo Gombos
fa18c4133d ci: add networking to Gentoo test containers
nfs-utils and dhcp is needed to test nfs.
nbd is needed to test nbd.
2022-12-19 10:00:52 +01:00
Laszlo Gombos
52d14607d1 fix(network): check if ip command fails 2022-12-17 07:29:54 -05:00
tupper
1d6f42c8a4 fix(network): two bugs which cause minutes long boot times
Caused by unneeded arping to the default gateway.
2022-12-17 07:29:54 -05:00
Laszlo Gombos
037eda7ce4 ci: install shfmt with dnf into openSuse container
Remove the special handling for shfmt binary.

No need to grab a specific version of the shfm binary that
is not tested together with the distribution.
2022-12-15 15:23:24 +01:00
Laszlo Gombos
718e49e0f7 ci: make sure portage command working inside Gentoo container
Do not remove /var/db/repos/gentoo as it breaks portage.
2022-12-15 15:23:24 +01:00
Laszlo Gombos
55ddaef4ca ci: add mdadm to Gentoo container to run test 10 2022-12-15 15:23:24 +01:00
Laszlo Gombos
22d56ca0e4 ci: add tools for thin provisioning to Debian and Gentoo container for test 17 2022-12-15 15:23:24 +01:00
Laszlo Gombos
4797c5b9e9 ci: add dmraid to Debian and Gentoo container to run test 14 2022-12-15 15:23:24 +01:00
Laszlo Gombos
43c16bfac4 ci: seperate local and network tests
Configure network module outside of test.sh scripts
to allow for parallelizm and flexibility.

Remove NM test directory wrappers and set network
in Github action instead.

This is in preparation to test other dracut network modules
such as systemd-networkd dracut module.
2022-12-07 17:14:42 +01:00
Laszlo Gombos
8fc0dac4a4 test: do not omit dracut networking modules
The main motivation of this change is to prepare to enable
testing all four networking dracut modules not just two.

There are four networking modules supported currently.
Omitting one networking module not only is not necessary but
confusing as if the test really wants to omit networking modules,
it should omit all three non-used dracut networking modules.
2022-12-07 17:14:42 +01:00
Antonio Alvarez Feijoo
7debf540ca feat(kernel-modules): exclude USB drivers in strict hostonly mode
Provide a way to avoid installing all USB drivers in some use cases where they
are not needed, i.e., machines without a USB bus.
2022-12-07 09:34:32 -05:00
Laszlo Gombos
a6395e4361 ci: install procps-ng into Fedora container 2022-12-07 08:49:07 +01:00
Laszlo Gombos
d0a5b039dd ci: set DEBUGFAIL to rd.debug when debug logging is enabled
GitHub Actions allow to opt-in to more debug logging both on
web UI and on the command line.

When GitHub Action debug logging is enabled also enable
additional dracut test debugging by setting DEBUGFAIL to rd.debug.

This is particularly useful when re-run failed jobs with
debug logging enabled.
2022-12-05 16:24:02 +00:00
Laszlo Gombos
bf545567ab ci: remove native dracut installation from the test containers
The installed packaged dracut version from a distributions can
interfere with testing latest dracut from source, which is the
primary goal of these containers.
2022-12-05 15:43:08 +01:00
Laszlo Gombos
3e77f5194e ci: teach manual test workflow to run several tests
Timesaver for running tests during development and reviews.
2022-12-05 10:44:45 +01:00
Laszlo Gombos
8c0fc137ca docs: document the new release process
Release tarballs are only available on github from now on.
2022-12-05 09:57:12 +01:00
Henrik Gombos
518133714b fix(base): do not require chroot inside initramfs
dracut can be invoked inside a chroot, but inside
the generated initramfs the chroot binary is not required.

add chroot to the generated initramfs if debug or selinux
dracut modules are enabled.
2022-12-05 09:19:42 +01:00
Laszlo Gombos
57ace7c75c test: remove dead code regarding special handling of test 99 2022-12-03 14:46:30 +00:00
Antonio Alvarez Feijoo
4b931bfb4f fix(systemd-coredump): correct systemd-coredump binary path
This issue went unnoticed because the systemd module always installs the
systemd-coredump binary using the right path.
2022-12-03 14:43:12 +00:00
Laszlo Gombos
d40617f720 feat(fs-lib): fsck_single can now handle PARTLABEL and PARTUUID
As an additional benefit, gentoo container now passing test-01.
2022-12-03 14:09:31 +00:00
Antonio Alvarez Feijoo
a86aea6518 fix(dracut.sh): use DRACUT_ARCH instead of uname -m
DRACUT_ARCH overrides `uname -m` since
https://github.com/dracutdevs/dracut/commit/a0120420
2022-12-03 11:33:50 +00:00
Antonio Alvarez Feijoo
240a1d34bd fix(base): remove grep dependency
The base module requires grep with the `rd.memdebug=1` command line parameter.
As this code is broken if grep is not added by other means and grep is only
required for this, rewriting this code to avoid the dependency.
2022-12-03 11:31:19 +00:00
keentux
4a9b165de0 refactor(zfcp_rules): use read -r instead of cat
Fixes #1268: Bad style `var=$(cat <file>)`. Replace by `read -r var < file`

Signed-off-by: keentux <valentin.lefebvre@suse.com>
2022-11-28 12:16:05 +01:00
Laszlo Gombos
fd9cd02cb2 test(TEST-99-RPM): remove test
This test is specific to rpm packaging and has been disabled
for a while.
2022-11-22 08:50:59 +01:00
Laszlo Gombos
ab23d89a20 test(16): make DMSQUASH test use the test dracut modules 2022-11-22 08:42:21 +01:00
Laszlo Gombos
fe88c3f7f1 ci: add tests 50,51,62 to the integration test suite
Test 50,51 tests root filesystem on NFS with multiple nics.
Test 62 tests skipcpio.
2022-11-22 08:34:05 +01:00
Laszlo Gombos
32f6dd1d5f fix(github): yml syntax and commit message for dependabot
Also fix commit message prefix.
chore(github):(deps): bump ... --> chore(deps): bump ...
2022-11-21 15:19:17 +00:00
Laszlo Gombos
9f6b4e5336 test: use -device instead of -watchdog to remove qemu warnings 2022-11-18 10:21:44 +00:00
Laszlo Gombos
fac851814f test: make test 01 and 02 use the test dracut modules 2022-11-18 10:21:44 +00:00
Laszlo Gombos
48641207f2 test: explicitly check if systemctl is available for systemd tests
Dracut tests already do similar checks for test 40, 62, 63 and 98.

This is useful when the full testsuite is run and systemd is not
available.
2022-11-18 10:19:50 +00:00
Laszlo Gombos
62f0981d16 chore(ci): bump docker/setup-buildx-action from 1 to 2
v2 has node 16 as default runtime.
2022-11-18 05:07:09 +00:00
Laszlo Gombos
62f7e0621a ci: add mkfs.ntfs and ntfs-3g to test containers
ntfs-3g is needed to test dmsquash-live-ntfs
2022-11-14 10:03:57 +01:00
Laura Hild
69e9fc84e2 docs: correct "rd.blacklist" 2022-11-11 19:49:44 -05:00
Antonio Alvarez Feijoo
e1058b07ea fix(dracut-systemd): run systemctl daemon-reload after remove_hostonly_files
Dependencies to systemd .device unit files are marked as "hostonly" in the
special file hostonly-files. These .device unit files can be removed using the
`rd.hostonly=0` command line parameter. But, since systemd v252
(https://github.com/systemd/systemd/pull/24054), the initrd-parse-etc.service
service does not run `systemctl daemon-reload`, so systemd keeps waiting
for these .device units to show up.
This means that if a hostonly device is not available for any reason at boot
time, using `rd.hostonly=0` has no effect and the system will not boot.
2022-11-11 20:10:30 +00:00
Laszlo Gombos
60c4b2f76a ci: upgrade to actions/checkout@v3
It resolves the following warning:
Please update the following actions to use Node.js 16: actions/checkout
2022-11-11 15:43:35 +01:00
Neal Gompa
33679fff5d fix(kernel-modules): add sysctl to initramfs to handle modprobe files
Users were seeing errors like this:

[     2.917246] dracut-pre-udev[717]: sh: line 1: /sbin/sysctl: No such file or directory

This was the result of modprobe.d files that needed to call sysctl
and failing because sysctl wasn't included in the initramfs.

This change makes it so that we have the binary included so those
modprobe configuration files work properly.
2022-11-11 11:26:13 +01:00
Laszlo Gombos
4a5785a859 test(ISCSI-NM): fix failing test
server fails to startup with /sbin/sysctl: not found
2022-11-07 18:04:47 +01:00
Laszlo Gombos
1d60dd74ee ci: remove non-existing modules from labeler 2022-11-07 18:04:47 +01:00
Laszlo Gombos
d3ac78af96 ci: teach labeler about test dracut modules 2022-11-07 18:04:47 +01:00
Laszlo Gombos
8d9868cf91 test: remove layering violation from the make system
Tests should not try to build dracut itself. Test should assume dracut
is built and availabnle to run.
2022-11-07 18:04:47 +01:00
Laszlo Gombos
2d7508dc30 test: only set basedir if it is not set by the invoker
Set basedir in test-functions instead of Makefile.
This change will allow to use a different basedir without
modifying Makefiles.
2022-11-07 18:04:47 +01:00
Laszlo Gombos
c799af4078 test: remove suppressing shellcheck messages
They are no longer needed.
2022-11-07 18:04:47 +01:00
Laszlo Gombos
10277bb606 test: move more execution to dracut command line
use the -I argument to install dd and mkfs.btrfs
use the -i argument to install the hook
btrfs is already installed by the btrfs dracut module
sfdisk is not used
2022-11-07 18:04:47 +01:00
Laszlo Gombos
f6ffda48dd test: move more common dependencies from test case to test-root module
umount setsid sync binaries are used in all test cases to build rootfs
2022-11-07 18:04:47 +01:00
Laszlo Gombos
d8dbdcc287 test: remove unused dependencies 2022-11-07 18:04:47 +01:00
Laszlo Gombos
f26275b974 test: move more execution to dracut command line 2022-11-07 18:04:47 +01:00
Laszlo Gombos
d6e8d5bc2c test: move plymouth installation from test case to test-root module 2022-11-07 18:04:47 +01:00
Laszlo Gombos
3bb8a85098 test: remove unused variable 2022-11-07 18:04:47 +01:00
Laszlo Gombos
fff80cc094 test: install debug module into what test case is booting into
This will also make some of the non-essential tools optional
instead of a hard dependency.
2022-11-07 18:04:47 +01:00
Laszlo Gombos
7eb0ac977e test: building ld cache explicitly is no longer needed
dracut.sh will build the ld cache now
2022-11-07 18:04:47 +01:00
Laszlo Gombos
9cc136728e test: move common dependencies from test case to test-root module 2022-11-07 18:04:47 +01:00
Laszlo Gombos
b17a3103a5 feat(test-root): add new module to share code between tests
Use dracut to make a root filesystem instead of each test case.
2022-11-07 18:04:47 +01:00
Laszlo Gombos
79504b6179 test: move finished-false.sh from test case to test-makeroot module 2022-11-07 18:04:47 +01:00
Laszlo Gombos
2532113c44 test: move common dependencies from test case to test-makeroot module
poweroff cp umount sync dd are commonly used by test cases to make
root filesystem.
2022-11-07 18:04:47 +01:00
Laszlo Gombos
54b963ca35 feat(test-makeroot): add new module to share code between tests
This module is used for tests to create root filesystem.
2022-11-07 18:04:47 +01:00
Laszlo Gombos
7f62a9b6c9 test: move poweroff handling from test case to test module 2022-11-07 18:04:47 +01:00
Laszlo Gombos
f5689b42bd feat(test): add new module to share code between tests 2022-11-07 18:04:47 +01:00
Laszlo Gombos
c449980741 test: shutdown is not used for running tests 2022-11-07 18:04:47 +01:00
Laszlo Gombos
ba0b1b093d ci: fix Arch container
packages should be installed with -Syu instead of -Sy.
2022-11-07 17:20:48 +01:00
Laszlo Gombos
40dd5c90e0 feat(overlayfs): add a new module called overlayfs
Also split ovlfs variable with two different meaning.
2022-11-07 15:51:45 +01:00
Laszlo Gombos
8caaad4fc2 fix(dmsquash-live): add support for NFS
Move overlayfs mount out into its own dedicated file
so that we can call into it directly for NFS support.

Add a new test case for overlayfs on top of NFS.
2022-11-07 15:51:45 +01:00
Laszlo Gombos
11eef2cfd2 ci: use prebuilt Linux kernel binaries for Gentoo container
Also remove dmsetup. It does not build and it is not required for ci.
2022-11-07 15:06:27 +01:00
Marcos Mello
f7079e77a1 refactor(fs-lib.sh): udevadm info --query=property instead of --query=env
env is a long time deprecated alias to property, not listed in the man page for more than a decade.
2022-11-07 12:44:57 +00:00
Marcos Mello
b12ee558f5 fix(dracut-init.sh): instmods: wrong variable name
It worked most of the time because `dracut-install -o` returns 0 in normal circumstances.
2022-11-07 09:36:21 +01:00
Antonio Alvarez Feijoo
e78f71b9da fix(dmsquash-live-ntfs): remove unnecessary command 2022-11-05 20:27:59 +00:00
Cole Robinson
8194f72af2 feat(qemu): add efi_secret driver
Despite the generic name, the only current use of the `efi_secret`
is exposing data in /sys that's been injected into a SEV/SEV-ES
virtual machine. More info:

https://docs.kernel.org/security/secrets/coco.html

This secret is probably a luks password, so we need this driver at
boot time.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2022-11-05 16:22:44 -04:00
Jeremy Linton
415e5519d1 fix(90kernel-modules): add (nonstandard) NVMe drivers
The M1/etc hardware has an quirky NVMe disk controller that needs
a dedicated NVMe driver. Rather than picking up just that
bit of hardware pick up drivers that register NVMe controllers.

This also picks up NVMe-OF style drivers, but seems like a better
long term solution on Arm platforms which tend to have a lot
of odd hardware.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
2022-11-04 13:41:54 -04:00
Antonio Alvarez Feijoo
1ec479006f refactor(multipath): do not install the pidof binary
dracut-lib.sh provides a custom version of pidof, so there is no need to install
the pidof binary. Also, source dracut-lib.sh in hook scripts when needed.

Fixes issue #2027
2022-11-04 14:48:48 +00:00
Tao Liu
e9ed44c886 fix(dracut-functions.sh): suppress findmnt error msg if /etc/fstab not exist
When the rootfs of a virtual machine is virtiofs shared folder,
the /etc/fstab file may not exist. As a result, the "findmnt --fstab"
will complain "findmnt: can't read (null): No such file or directory"
when trying to rebuild kdump initramfs within the vm.

This patch checks if /etc/fstab exist before calling "findmnt --fstab"
to suppress the error message.

Before:
$ kdumpctl rebuild
kdump: Rebuilding /boot/initramfs-5.14.0-182.el9.x86_64kdump.img
findmnt: can't read (null): No such file or directory
findmnt: can't read (null): No such file or directory
findmnt: can't read (null): No such file or directory

After:
$ kdumpctl rebuild
kdump: Rebuilding /boot/initramfs-5.14.0-182.el9.x86_64kdump.img

Signed-off-by: Tao Liu <ltao@redhat.com>
2022-11-04 08:09:30 +01:00
Brian C. Lane
6b592f581c fix(dracut-logger.sh): this fixes the dlog_init check for /dev/log
The /dev/log check was not correct, it would continue working if
/dev/log was a broken symlink. This changes the logic to be more clear
-- /dev/log needs to be a socket, and writable, and logger needs to be
available. If any of those conditions fail, turn off syslog and only use
console logging.
2022-11-02 23:49:47 -04:00
Martin Wilck
cf31fcf804 feat(multipath): install tmpfiles.d config file
Recent multipath-tools (0.9.2) added a tmpfiles.d template. Install it
if present.
2022-10-27 08:33:23 +02:00
Laszlo Gombos
862ba52683 feat(dmsquash-live): add support for dash
Using dash instead of bash saves about 0.5M initramfs size.

Co-authored-by: nabijaczleweli <nabijaczleweli@nabijaczleweli.xyz>
2022-10-25 16:44:45 +02:00
Jóhann B. Guðmundsson
d345ca2efd feat(systemd-pcrphase): introducing the systemd-pcrphase module
Introducing the systemd-pcrphase module
2022-10-24 12:20:37 -04:00
Laszlo Gombos
444944ab37 fix(dracut.sh): make omit-drivers option do exact match for names
Modify the basic test case to use --omit-drivers and make it fail
without the PR and make it pass with the PR.

The test would fail with the following error without the PR:
FATAL: iscsiroot requested but kernel/initrd does not support iscsi
2022-10-24 15:19:37 +00:00
Laszlo Gombos
cc1c0ffdaa ci: integration test for openrc and musl 2022-10-24 10:45:52 -04:00
Laszlo Gombos
f2d181b778 chore(base): remove dead code
RD_TIMESTAMP is no longer used.
systemd-timestamp is not used.
2022-10-24 14:39:11 +00:00
Antonio Alvarez Feijoo
2d9f4b481b ci(suse.conf.example): update SUSE-specific config 2022-10-24 08:47:56 -04:00
Jóhann B. Guðmundsson
bdddfd561f feat(github): automating dependency updates
Let github's dependabot handle updating github's actions.
2022-10-24 08:44:37 -04:00
Tianhao Chai
02e646fc7e fix(multipath): install multipathd.socket 2022-10-22 11:50:08 -04:00
наб
77ac95d909 perf(90kernel-modules): use awk instead of shell monster
~120ms -> ~2ms

Downstream: https://bugs.debian.org/1017411
2022-10-22 13:08:07 +00:00
Antonio Alvarez Feijoo
03babd95e2 feat(systemd-portabled): introducing the systemd-portabled module
Introducing the systemd-portabled module.

It's intended to work only with raw binary disk images contained in regular
files, but not with directory trees.
2022-10-21 21:51:59 -04:00
Antonio Alvarez Feijoo
429f9de1c7 fix(network-manager): always install the library plugins directory
The library plugins directory is automatically added to the initrd if either
libnm-device-plugin-team.so or libnm-settings-plugin-ifcfg-rh.so are present on
the system, but both are optional libraries, and if it does not exist, the
NetworkManager issues a warning.
2022-10-21 21:49:56 -04:00
Antonio Alvarez Feijoo
cc669250af feat(dracut-init.sh): add inst_libdir_dir() helper
This helper function is similar to inst_libdir_file(), but it installs plain
directories located on a library directory instead of files.
2022-10-21 21:49:56 -04:00
Marcos Mello
f82edfed5c chore: adjust .kateconfig for C code 2022-10-21 21:09:28 -04:00
Marcos Mello
87d7df57c7 chore: remove editor configuration files from subdirectories
Keep only the toplevel ones.

Closes #1958
2022-10-21 21:09:28 -04:00
Antonio Alvarez Feijoo
b2d7561b98 fix(dracut): replace invalid lzo command with lzop for LZO compression
Fixes issue #1999
2022-10-21 23:41:10 +00:00
Marcos Mello
144279a597 refactor(dracut-install): resolve_deps: improve error message
Prefix + error description at the end.
2022-10-21 23:27:01 +00:00
Laszlo Gombos
ba0d7591a6 refactor(shutdown): move module specific code out of base module
dracut-lib.sh and the base module now does not have a knowledge
of oldroot and plymouth.

It improves the separation of concerns between the base module
and the shutdown module.
2022-10-21 22:36:03 +00:00
Antonio Alvarez Feijoo
23654c50b0 fix(network-legacy): check if dhclient has --timeout option
dhclient's --timeout option is not upstream, so a pre-check is needed before
using it.
2022-10-21 22:25:39 +00:00
Antonio Alvarez Feijoo
699e394589 fix(man): correct typo 2022-10-21 22:25:39 +00:00
Matt Coleman
a3c67d27e7 feat(dmsquash-live): add new dmsquash-live-autooverlay module 2022-10-15 14:01:27 -04:00
Matt Coleman
ef9ccd5446 ci: revert to actions/checkout@v1 in manualtest
This enables checkout to work in the Gentoo container.

See: https://github.com/actions/runner/issues/2115
2022-10-15 14:01:27 -04:00
Matt Coleman
61ae423bb0 docs: fix a typo in HACKING.md 2022-10-15 14:01:27 -04:00
Pavel Valena
8abffe7cca fix(dracut.spec): tpm2-tools is required for crypt module to work
tpm2-tools dependency can be can be pulled in case tmp2-tss package
is installed, using a soft conditional dependency.

https://bugzilla.redhat.com/show_bug.cgi?id=2077697
2022-10-07 11:59:19 +00:00
Martin Wilck
a90efdd704 fix(man): dracut.cmdline.7: clarify "rd.nvmf.discover=fc,auto" 2022-09-30 06:02:18 +00:00
Martin Wilck
2c26b70322 fix(network): avoid double brackets around IPv6 address
This code would add brackets twice. Fix it.
2022-09-30 06:02:18 +00:00
Martin Wilck
cf8986af7d feat(nvmf): set rd.neednet=1 if tcp records encountered
This is currently always the case for NBFT records.
We can do this now, as we run before parse-ip-options.sh
2022-09-30 06:02:18 +00:00
Martin Wilck
4b69e63b74 fix(man): dracut.cmdline(7): correct syntax for rd.nonvmf
rd.nonvmf=0 is a double negation, and wrong. Fix it.
2022-09-30 06:02:18 +00:00
Martin Wilck
f4e9ea879f fix(network): don't use same ifname multiple times
If multiple ibft interfaces exist, set_ifname() may reuse the same
name (usually "ibft0"), because it's usually called cmdline time,
when no interfaces exist in sysfs yet. Remember the number used
set and don't use it again.
2022-09-30 06:02:18 +00:00
Martin Wilck
a65fab6966 fix(nvmf): run cmdline hook before parse-ip-opts.sh
This way we can set "rd.neednet" and have it seen by parse-ip-options.sh
2022-09-30 06:02:18 +00:00
Martin Wilck
a93968b075 fix(nvmf): avoid calling "exit" in a cmdline hook
"exit" should never be executed in dracut hooks, because the
hooks are sourced by the main script.
2022-09-30 06:02:18 +00:00
Martin Wilck
556ef46aa9 fix(nvmf): make sure "rd.nvmf.discover=fc,auto" takes precedence
The command line may contain several rd.nvmf.discover options.
The "fc,auto" option should take precedence.
2022-09-30 06:02:18 +00:00
Martin Wilck
e93e46520d fix(nvmf): don't use "finished" queue for autoconnect
The "finished" initqueue is for testing if everything is alright,
not for triggering any actions.
2022-09-30 06:02:18 +00:00
Martin Wilck
03921ec09e fix(nvmf): don't create did-setup file
did-setup files are meant to indicate that an interface setup
was successful. Don't do it here.
2022-09-30 06:02:18 +00:00
Martin Wilck
a3cf4ec922 fix(nvmf): no need to load the nvme module
The module "nvme" is not required for NVMeoF.
2022-09-30 06:02:18 +00:00
Martin Wilck
b3ff3f3fbc fix(nvmf): don't try to validate network connections in cmdline hook
The cmdline hook runs before any network interfaces have been brought
up. There's no point in trying to validate the connections at this
stage.
2022-09-30 06:02:18 +00:00
Antonio Alvarez Feijoo
9664e98b5d fix(nvmf): nvme list-subsys prints the address using commas as separator
nvme-cli 1.x printed the address using spaces as separator, but nvme-cli 2.x
prints the address using commas as separator (exact output from sysfs). E.g.,
output from `cat /sys/class/nvme/nvme0/address`:

traddr=nn-0x201700a09890f5bf:pn-0x201900a09890f5bf,host_traddr=nn-0x200000109b579ef5:pn-0x100000109b579ef5

Also, I suppress rd.nvmf.discover= cmdline option if all fields are empty.
2022-09-30 06:02:18 +00:00
Laszlo Gombos
b17128465f ci: login and push containers as repository_owner 2022-09-30 05:42:27 +00:00
Laszlo Gombos
bc1bf6a19d test(SYSTEMD): make the man command succeed
Document the reason of the existing workaround.

Move the existing logic to the initramfs.testing generation phase
and make the steps more generic.

This change makes the test pass on debian.
2022-09-29 05:45:47 +00:00
Laszlo Gombos
31c4aac32d test: do not bring up the network interface if it is not needed
Notice that TEST-04 does not explicitelly includes dhclient
and dhclient-script for the rootfs.

Apply the same principle for all local tests that do not
need networking.

This should make the tests run faster and slightly more reliable.

This change also brings us to a better place where network-legacy
files are only gets included via proper dracut module inclusion.
2022-09-29 05:44:19 +00:00
Antonio Alvarez Feijoo
e2fdb30b56 fix(dracut-init.sh): add missing hostonly code in the inst_multiple function
It seems that commit https://github.com/dracutdevs/dracut/commit/4ef45f13 forgot
to add the code to handle the hostonly parameter in the inst_multiple function.
2022-09-29 05:41:17 +00:00
Antonio Alvarez Feijoo
0661a6a25b refactor(network-manager): use more precise global variables 2022-09-29 05:37:07 +00:00
Antonio Alvarez Feijoo
cd19da33f8 refactor(network-legacy): use more precise global variables 2022-09-29 05:37:07 +00:00
Antonio Alvarez Feijoo
1922b1264f refactor(systemd-timesyncd): use more precise global variables 2022-09-29 05:37:07 +00:00
Antonio Alvarez Feijoo
cbf7f4bc5b refactor(systemd-networkd): use more precise global variables 2022-09-29 05:37:07 +00:00
Antonio Alvarez Feijoo
744c6de5cd fix(network-manager): correct wrong local network configuration path 2022-09-29 05:37:07 +00:00
Antonio Alvarez Feijoo
2eb733cc11 fix(network-legacy): correct wrong local network configuration path 2022-09-29 05:37:07 +00:00
Antonio Alvarez Feijoo
b9dc999f87 fix(dracut.sh): correct wrong systemd variable paths
systemdsystemconfdir usually expands to /etc/systemd/system, but the local
configuration of systemd-networkd, systemd-timesyncd, portablectl and systemd
users is saved into directories whose parent is /etc/systemd
(systemdutilconfdir).

Also add missing exports.
2022-09-29 05:37:07 +00:00
Laszlo Gombos
027eee902d test(DMSQUASH): add test for overlay on top of a block device
Add a test for mounting root filesystem with overlay for /dev/sdb.

The existing test was testing mounting root filesystem with overlay
from a squashfs image file.
2022-09-29 05:27:49 +00:00
Laszlo Gombos
d091014f88 test(NFS): remove a workaround for systemd v230
Remove some more dead code.
Improve style and formatting.
Remove duplicated modules.
2022-09-29 05:25:42 +00:00
Laszlo Gombos
0da80a1841 refactor(base): remove str_replace from dracut-lib.sh
Remove duplicate implementation of `str_replace` to follow-up
commit 148e420be5
2022-09-29 05:23:07 +00:00
Laszlo Gombos
d7d80af981 ci: add Gentoo Linux container
The Gentoo container is configured to use openrc and musl to
test in those enviroments as well.
2022-09-29 05:21:06 +00:00
Laszlo Gombos
2a2c689740 chore(udev-rules): remove obsolete code
Arch linux no longer needs a special load-modules.sh file.
2022-09-29 05:16:08 +00:00
Laszlo Gombos
97345f0627 chore(base): do not output root entry while installing base
Silence the printing out root entry of passwd file
while including base module.

dracut: *** Including module: base ***
root0:0:root:/root:/bin/bash
dracut: *** Including module: fs-lib ***
2022-09-29 05:14:52 +00:00
Laszlo Gombos
b96f1afa4d ci: improve CI for containers
Login to GitHub Container Registry as the actor instead
of the repository owner.

Upgrade to login-action@v2 and build-push-action@v3 Github Actions.
2022-09-29 05:13:13 +00:00
Hari Bathini
bc1b23c292 fix(squash): build ld cache for squash loader
Commit dc21638c3f fixes kdump kernel crash, due to non-conventional
library path in powerpc, by copying /etc/ld.so.cache under initdir.
While that works in general, it is vulnerable to failure because of
missing links, when the CPU is reconfigured to run in compatibility
mode of older CPU version. Avoid this by running ldconfig for squash
loader to create the necessary links & ld cache for it. Doing this
also saves a few kilobyes of space as the copied ld cache is bigger
in size than the one needed for squash loader environment.

Fixes: dc21638c3f ("fix(squash): keep ld cache under initdir")
Cc: Pingfan Liu <piliu@redhat.com>
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
2022-09-29 04:57:14 +00:00
Pavel Valena
1157143d67 feat(dracut.sh): populate uefi_cmdline if no other cmdline is given
When creating uefi image in hostonly mode (with using --hostonly-cmdline),
it makes sense to copy current kernel commandline from /proc/cmdline,
in case there are no other options specified.

Usually, the cmdline.d/*.conf file is generated by module rootfs-block
(or other modules), but it might, not handle all cases correctly,
and specifying --kernel-cmdline every time is not much user-friendly.
2022-09-26 10:05:33 +00:00
Antonio Alvarez Feijoo
23684e4a2b feat(systemd): install systemd-sysroot-fstab-check
systemd-sysroot-fstab-check is a symlink to systemd-fstab-generator added in
systemd commit https://github.com/systemd/systemd/commit/cd7ad0cb
2022-09-26 10:02:41 +00:00
Antonio Alvarez Feijoo
e1de5bd2d7 fix(i18n): do not fail if FONT in /etc/vconsole.conf has the file extension
If the FONT option defined in /etc/vconsole.conf refers to a file with its
extension, not just the file name, dracut should not fail and install it. The
systemd-vconsole-setup service ends up calling setfont, which supports both file
names and files with extensions.
2022-09-26 09:47:31 +00:00
Frederick Grose
401158e58c fix(load_fstype): use $1 if $2 is missing
Use parameter expansion default value if the second argument is missing.
The current code mistakenly reuses the null second argument.
2022-09-26 09:46:03 +00:00
Kairui Song
481b87fa7a fix(dracut-initramfs-restore.sh): initramfs detection not working
The path detection is not working on latest Fedora and some other
distros, and it fails to extract the initramfs. It seems the if
statement is broken by a previous commit, so let's fix it.

Fixes: 3d8e1ad ('fix(dracut-initramfs-restore.sh): add missing default paths')
Signed-off-by: Kairui Song <kasong@tencent.com>
2022-09-26 09:12:51 +00:00
Antonio Alvarez Feijoo
928252a145 fix(systemd): add missing modprobe@.service
sys-kernel-config.mount needs modprobe@configfs.service since systemd v246.7
(https://github.com/systemd/systemd/commit/42cc2855), so the kernel configfs
fails to mount in the initrd.
2022-09-26 09:09:36 +00:00
Antonio Alvarez Feijoo
758f2e6937 feat(systemd-pstore): introducing the systemd-pstore module
Introducing the systemd-pstore module.
2022-09-26 09:08:35 +00:00
Laszlo Gombos
4012314f20 ci: add workflow for manual test run
This workflow allows it to run any of the 29 tests
on any of the 4 containers.

On commit, currently the CI only runs 24 tests out of the 116
possible combinations of test runs.

As the project grows, the usefulness of this tool will also grow.
2022-08-26 08:18:03 +00:00
Antonio Alvarez Feijoo
639fb95d7e docs: correct typo 2022-08-26 08:00:08 +00:00
Antonio Alvarez Feijoo
8410ee2290 fix(dracut.sh): remove duplicate "dracut:" string in logger functions
dracut-logger functions already prepend the "dracut:" prefix to the message.
2022-08-26 07:58:36 +00:00
Antonio Alvarez Feijoo
f082dad903 refactor(dracut.sh): use logger functions instead of printf
dracut-logger is sourced in dracut-init, so any printf calls after sourcing
dracut-init should be replaced with logger functions.
2022-08-26 07:58:36 +00:00
Laszlo Gombos
d6d555845e fix(man): point man pages to github.com instead of kernel.org 2022-08-26 07:54:19 +00:00
Laszlo Gombos
d87572ed8e docs: fix path to CONTRIBUTING.md 2022-08-26 07:49:44 +00:00
Laszlo Gombos
61275141df docs: clarify that rd.break stops before the breakpoint starts 2022-08-26 07:45:17 +00:00
Antonio Alvarez Feijoo
da2a092894 chore: add execute permission to all scripts
This avoids most of the rpmlint non-executable-script warnings.
2022-08-26 07:44:16 +00:00
Laszlo Gombos
1573bb815a test: list only the required modules explicitly
rootfs-block module would always include the following
modules: udev-rules base fs-lib

lvm module always includes rootfs-block

This is a follow-up to a1d4041cee
2022-08-26 07:24:55 +00:00
Antonio Alvarez Feijoo
b30a00c2a2 fix(shell-completion): add missing -p and --parallel options 2022-08-26 07:06:34 +00:00
Laszlo Gombos
78cafe465d fix(nfs,virtiofs): check kernel for builtin fs drivers
Check first for fs support in `/proc/filesystems` before attempting
to load the kernel module.

This is needed in the --no-kernel use case to avoid the error:
modprobe: FATAL: Module overlay not found in directory /lib/modules/<kver>
2022-08-18 06:25:20 +00:00
Antonio Alvarez Feijoo
4f20ae2620 fix(dracut-initramfs-restore.sh): hide unpack errors
With the current "try and fail" approach, the system log contains errors until
the correct initrd compression is reached.
2022-08-18 06:20:45 +00:00
Laszlo Gombos
bd13e0ae36 test: remove dracut.conf.test
Empty file and it is not used. Has not been used for over a decade :-)
2022-08-18 06:09:31 +00:00
David Tardon
aa0369a4a3 fix(skipcpio): ignore broken pipe
If lsinitrd is called from a context in which SIGPIPE is ignored (e.g.,
from a systemd unit with default setting of IgnoreSIGPIPE=), the
following line will result in an error being issued:

bin="$($SKIP "$image" | { read -r -N 6 bin && echo "$bin"; })"

An example error from `kdumpctl start` (which internally just calls
`systemctl start kdump.service`):

kdumpctl[1287]: ERROR: src/skipcpio/skipcpio.c:191:main(): fwrite

A minimal reproducer:

systemd-run -t sh -c '/path/to/skipcpio /path/to/any/file | false'
2022-08-18 06:08:45 +00:00
gombi
bdef7793ba test: remove unused ci-matrix.txt file
The ci matrix is described in .github/workflows instead.
ci-matrix.txt file is unreferenced.
2022-08-18 06:05:51 +00:00
Laszlo Gombos
025906de23 docs: create CONTRIBUTING.md
Note down some commonly agreed, but not yet documented guidelines
to have a baseline that can be improved later.
2022-08-18 06:03:53 +00:00
Antonio Alvarez Feijoo
d4732be877 fix(systemd-networkd): typo in systemd-networkd.socket local conf path 2022-08-15 16:03:36 +00:00
Mike Gilbert
27b316df1f fix(virtiofs): make shebangs work on split-usr systems
Fixes: c29325a982013a315418cdb2318e90cf77e387b5
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
2022-08-15 16:00:47 +00:00
runsisi
2f791b401b fix(dracut-install): use stripped kernel module path as hash key
in install_dependent_modules we use &path[kerneldirlen] as the key for inserting,
let's do the same for checking.

otherwise installing kernel module has circular dependency from a custom kernel
module directory will cause infinite recursion and segfault.

$ grep ipmi kbuilt/lib/modules/5.10.121/modules.dep
kernel/drivers/char/ipmi/ipmi_msghandler.ko:
kernel/drivers/char/ipmi/ipmi_devintf.ko: kernel/drivers/char/ipmi/ipmi_msghandler.ko

$ grep ipmi kbuilt/lib/modules/5.10.121/modules.softdep
softdep ipmi_msghandler post: ipmi_devintf

$ ./dracut-install -D /tmp --kerneldir ~/working/kernel/linux-5.10.121/kbuilt/lib/modules/5.10.121 -m ipmi-devintf
Segmentation fault (core dumped)

(gdb) b install_dependent_modules
Breakpoint 1 at 0x7db0: file src/install/dracut-install.c, line 1513.
(gdb) bt
#0  install_dependent_modules (modlist=0x0) at src/install/dracut-install.c:1513
#1  0x000055555555c027 in install_dependent_modules (modlist=modlist@entry=0x555555579e90) at src/install/dracut-install.c:1553
#2  0x000055555555bf1c in install_dependent_modules (modlist=0x5555555799d0) at src/install/dracut-install.c:1548
#3  0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557a3f0) at src/install/dracut-install.c:1554
#4  0x000055555555bf1c in install_dependent_modules (modlist=0x555555579d60) at src/install/dracut-install.c:1548
#5  0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557b170) at src/install/dracut-install.c:1554
#6  0x000055555555bf1c in install_dependent_modules (modlist=0x55555557a0f0) at src/install/dracut-install.c:1548
#7  0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555575320) at src/install/dracut-install.c:1554
#8  0x000055555555bf1c in install_dependent_modules (modlist=0x55555557ab30) at src/install/dracut-install.c:1548
#9  0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557dd60) at src/install/dracut-install.c:1554
#10 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b640) at src/install/dracut-install.c:1548
#11 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e0f0) at src/install/dracut-install.c:1554
#12 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557b9d0) at src/install/dracut-install.c:1548
#13 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574340) at src/install/dracut-install.c:1554
#14 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557cf70) at src/install/dracut-install.c:1548
#15 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x5555555768d0) at src/install/dracut-install.c:1554
#16 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557d750) at src/install/dracut-install.c:1548
#17 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555557e700) at src/install/dracut-install.c:1554
#18 0x000055555555bf1c in install_dependent_modules (modlist=0x55555557de90) at src/install/dracut-install.c:1548
#19 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555581c90) at src/install/dracut-install.c:1554
#20 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571e60) at src/install/dracut-install.c:1548
#21 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b620) at src/install/dracut-install.c:1554
#22 0x000055555555bf1c in install_dependent_modules (modlist=0x555555583000) at src/install/dracut-install.c:1548
#23 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x55555556b640) at src/install/dracut-install.c:1554
#24 0x000055555555bf1c in install_dependent_modules (modlist=0x555555571b40) at src/install/dracut-install.c:1548
#25 0x000055555555c034 in install_dependent_modules (modlist=modlist@entry=0x555555574100) at src/install/dracut-install.c:1554
#26 0x000055555555c4b0 in install_module (mod=mod@entry=0x555555573bc0) at src/install/dracut-install.c:1617
#27 0x000055555555c93d in install_modules (argc=argc@entry=1, argv=argv@entry=0x7fffffffd6e0) at src/install/dracut-install.c:1952
#28 0x000055555555862a in main (argc=<optimized out>, argv=0x7fffffffd6a8) at src/install/dracut-install.c:2090

Signed-off-by: runsisi <runsisi@hust.edu.cn>
2022-08-15 15:38:08 +00:00
Laszlo Gombos
c73e7b99db fix(virtiofs): ismounted has a dependency on the base module
When dracut.sh is called with "--modules virtiofs", make sure
dracut-lib.sh is installed by making the base module a dependency.
2022-08-15 15:36:48 +00:00
Lukas Nykryn
85149b8596 fix(drm): add video drivers needed on hyper-v and similar
Due to non-availability of Hyper-V video driver hyperv_drm in kdump
initramfs, the console seems to be in hang state with no text over it.

We should also go through the /sys/bus/vmbus/devices and include drivers
referenced there.
2022-08-15 15:34:06 +00:00
Lukas Nykryn
bc965cd889 fix(kernel-modules): always include nvmem driver on nvmem_on_arm
These drivers are needed to boot on some SoCs like NXP i.MX
We should include them so installation images will work.
2022-08-15 15:32:30 +00:00
David Tardon
101b683e1a refactor(convertfs): drop duplicate def. of ismounted() 2022-08-15 08:29:34 +00:00
Laszlo Gombos
922c9e28ed fix(dmsquash-live): check kernel for built-in squashfs drivers
Check first for squashfs in `/proc/filesystems`.
This is needed in the --no-kernel use case to avoid the error:
modprobe: FATAL: Module overlay not found in directory /lib/modules/<kver>

Introduce load_fstype function to make it easier to check `/proc/filesystems`
before calling modprobe.
2022-08-15 06:07:39 +00:00
Laszlo Gombos
ec333c30ac ci: dependencies for testing nfs module for Debian
This change allows executing TEST-20-NFS on Debian.
2022-08-15 05:48:07 +00:00
Laszlo Gombos
22ab797948 fix(test): remove unnecessary setup steps
var/lib/nfs/rpc_pipefs is only needed for NFS mounts.
2022-08-15 05:47:24 +00:00
Laszlo Gombos
b8ffc87d13 test(16-DMSQUASH): make it pass on arch
Include additional kernel drivers and install squashfs-tools
into the arch container.
2022-08-15 05:25:54 +00:00
Laszlo Gombos
3adbcc0b71 docs(README.md): update wiki link
Point to the github (and remove kernel.org). Add link to News.
Remove broken badge links.
2022-08-15 05:18:25 +00:00
Jonathan Lebon
2334031a89 fix(90multipath): use RemainAfterExit=yes for multipathd-configure.service
Services of type `oneshot` should almost always use
`RemainAfterExit=yes`. This is a one-time action that we don't want to
rerun if the unit gets pulled in multiple times in the systemd
transaction.
2022-08-12 11:59:06 +00:00
Jonathan Lebon
0940be9058 fix(90multipath): create /etc/multipath only
The dropins path is `/etc/multipath/conf.d`, not
`/etc/multipath/multipath.conf.d`:

686797b7d0/Makefile.inc (L100)

But anyway, we don't need to create that directory. We only need to
create `/etc/multipath`.

While we're here, add a comment to explain this.
2022-08-12 11:59:06 +00:00
Antonio Alvarez Feijoo
da55e26634 fix(systemd): set right permissions for the machine-id file
Fixes issue #1864
2022-08-12 11:48:33 +00:00
Marcos Mello
ebbcf97dc7 fix(dracut-install): do not try to copy files from the root directory
HWCAP library path needs at least two parent directories, for example:

/lib64/power6x/libc.so.6
/lib64/glibc-hwcaps/power9/libpthread-2.28.so (glibc 2.33+)

Before:

dracut-install: Lib install: '/lib64/libz.so.1'
dracut-install: dracut_install('/lib64/libz.so', '/lib64/libz.so', 0, 0, 1)
dracut-install: dracut_install('//libz.so.1', '//libz.so.1', 0, 0, 1)
dracut-install: dracut_install('//libz.so', '//libz.so', 0, 0, 1)

After:

dracut-install: Lib install: '/lib64/libz.so.1'
dracut-install: dracut_install('/lib64/libz.so', '/lib64/libz.so', 0, 0, 1)
2022-08-12 11:45:59 +00:00
Marcos Mello
7f2b09339c refactor(dracut-install): do not call dirname() directly
Avoid its horrible API. Borrow dirname_malloc() from systemd:

https://github.com/systemd/systemd/blob/v251/src/basic/path-util.c#L775
https://github.com/systemd/systemd/blob/v251/src/basic/path-util.h#L150

(licence is LGPLv2.1 or later)
2022-08-12 11:45:59 +00:00
Pavel Valena
b72d0d7f9b fix(dracut.sh): do not fail on irregular files
If file is not a regular file (test -f), dracut.sh fails,
which is unexpected change of behaviour.
The workaround would be to create an empty file.

Fixes: #1835
2022-08-12 11:14:05 +00:00
joamonwx
897e5effe0 feat(dracut.sh): pass engine flag to sbsign allowing use with hardware devices 2022-08-12 11:12:41 +00:00
Brian C. Lane
c8f819e6c1 fix(dmsquash-live): run checkisomd5 on correct device
When the new grub2 iso is written to a usb drive the disk label points
to a partition that does not include the full iso image. This causes
checkisomd5 to run with the wrong data and it fails.

This patch adds a check that will test to see if there is a parent
device that is a disk, and to run checkisomd5 on it instead of on the
partition pointed to by the label.

When running from an iso this will return the original
/dev/disk/by-label/ path, and when running from a usb drive it will
return the parent device (eg. /dev/sda).

Resolves: rhbz#2107858
2022-08-12 10:46:36 +00:00
Antonio Alvarez Feijoo
72b700e3cb fix(dracut-init.sh): correct dracut-install source path 2022-08-12 10:30:15 +00:00
Antonio Alvarez Feijoo
5eb996a993 fix(lsinitrd.sh): correct skipcpio source path 2022-08-12 10:30:15 +00:00
Antonio Alvarez Feijoo
d2f6f445ed fix(dracut-init.sh): propagate the result code returned by dracut-install
Currently only the inst_multiple function propagates the result code returned by
dracut-install.
This was missing since 043 (e.g.: https://github.com/dracutdevs/dracut/blob/043/dracut-functions.sh#L751)
2022-08-12 10:25:56 +00:00
Frederick Grose
d0cd7cd387 fix(dmsquash-live-root): check kernel for built-in overlay drivers
Do not assume that `overlay` is always a module.  Check first for
`overlay` in `/proc/filesystems`. This is needed in the --no-kernel
use case to avoid the error: modprobe:
  FATAL: Module overlay not found in directory /lib/modules/<kver>

Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
2022-08-12 10:25:00 +00:00
Laszlo Gombos
5a5f9c5d4e ci: add glibc to the Arch Linux container
tgt has a dependency on glibc
2022-08-12 10:19:39 +00:00
David Tardon
1343d21d8c refactor(url-lib): write curl output directly to file
The redirection to stdout was originally added to workaround
https://bugzilla.redhat.com/show_bug.cgi?id=989133 (curl would create no
file if the source was empty), but I don't see that problem with current
curl.

A nice side-effect of this change is that curl shows download progress.
2022-08-12 10:15:04 +00:00
Antonio Alvarez Feijoo
fe8fa2b0ca fix(i18n): add required includes for keymaps
Commit https://github.com/dracutdevs/dracut/commit/f3441cc7 removed shell
options but didn't adapt all the code that requires nullglob and globstar.
This caused the initrd to be generated without the required includes for
keymaps.
2022-07-08 04:48:55 +00:00
Antonio Alvarez Feijoo
7fa0094c00 fix(man): correct typo
Fixes issue #1852
2022-06-24 20:28:51 +00:00
наб
13736c50c7 fix(dracut-install): correctly waitpid() for cp 2022-06-24 20:28:17 +00:00
наб
d010fa0d7f refactor(dracut-install): fork() instead of popen(), sanitise line reading
Also set LC_ALL=C to fix ldd output pattern matching in non-english locales.
2022-06-24 20:28:17 +00:00
наб
d2648f6dd8 perf(dracut-install): convert_abs_rel: don't allocate target parent realpath 2022-06-24 20:27:08 +00:00
наб
53dd6a9bbb feat(dracut-install): convert_abs_rel: canonicalise parent of from, too
This fixes, for example, .so versioning links:
  diff --git a/cur b/new3
  index 3804a347..22d089a9 100644
  --- a/cur
  +++ b/new3
  -Image: /boot/initrd.img-5.10.0-13-amd64: 15M
  +Image: initrd: 15M
  -console-setup
  -crw-rw-rw-   1 root     root       1,   3 date etc/console-setup/null
  -drwxr-xr-x  13 root     root            0 date etc
  +drwxr-xr-x  12 root     root            0 date etc
  -drwxr-xr-x   2 root     root            0 date etc/console-setup
  --rw-r--r--   1 root     root       122498 date etc/console-setup/cached_UTF-8_del.kmap
  --rw-r--r--   1 root     root         6240 date etc/ld.so.cache
  +-rw-r--r--   1 root     root         6308 date etc/ld.so.cache
  --rw-r--r--   1 root     root          152 Dec 15  2020 etc/udev/rules.d/10-console.rules
  --rwxr-xr-x   1 root     root        98048 Mar  3  2021 usr/bin/gzip
  --rwxr-xr-x   1 root     root        14976 Oct 11  2020 usr/bin/kbd_mode
  --rwxr-xr-x   1 root     root       220304 Oct 11  2020 usr/bin/loadkeys
  --rwxr-xr-x   1 root     root          229 date usr/bin/setupcon
  -lrwxrwxrwx   1 root     root           32 date usr/lib32/libnss_files.so.2 -> ../../lib32/libnss_files-2.31.so
  +lrwxrwxrwx   1 root     root           20 date usr/lib32/libnss_files.so.2 -> libnss_files-2.31.so
  -lrwxrwxrwx   1 root     root           37 date usr/lib64/ld-linux-x86-64.so.2 -> ../../lib/x86_64-linux-gnu/ld-2.31.so
  +lrwxrwxrwx   1 root     root           34 date usr/lib64/ld-linux-x86-64.so.2 -> ../lib/x86_64-linux-gnu/ld-2.31.so
  --rw-r--r--   1 root     root          185 date usr/lib/dracut/modules.txt
  +-rw-r--r--   1 root     root          171 date usr/lib/dracut/modules.txt
  -lrwxrwxrwx   1 root     root           46 date usr/lib/i386-linux-gnu/libnss_dns.so.2 -> ../../../lib/i386-linux-gnu/libnss_dns-2.31.so
  +lrwxrwxrwx   1 root     root           18 date usr/lib/i386-linux-gnu/libnss_dns.so.2 -> libnss_dns-2.31.so
  -lrwxrwxrwx   1 root     root           48 date usr/lib/i386-linux-gnu/libnss_files.so.2 -> ../../../lib/i386-linux-gnu/libnss_files-2.31.so
  +lrwxrwxrwx   1 root     root           20 date usr/lib/i386-linux-gnu/libnss_files.so.2 -> libnss_files-2.31.so
  +-rw-r--r--   1 root     root        19187 date usr/lib/modules/5.10.0-13-amd64/kernel/crypto/blake2b_generic.ko
  -drwxr-xr-x  21 root     root            0 date usr/lib/modules/5.10.0-13-amd64/kernel/drivers
  +-rw-r--r--   1 root     root        25083 date usr/lib/modules/5.10.0-13-amd64/kernel/crypto/xor.ko
  +drwxr-xr-x  22 root     root            0 date usr/lib/modules/5.10.0-13-amd64/kernel/drivers
  +drwxr-xr-x   2 root     root            0 date usr/lib/modules/5.10.0-13-amd64/kernel/drivers/block
  +-rw-r--r--   1 root     root        74667 date usr/lib/modules/5.10.0-13-amd64/kernel/drivers/block/loop.ko
  -drwxr-xr-x   4 root     root            0 date usr/lib/modules/5.10.0-13-amd64/kernel/fs
  +drwxr-xr-x   5 root     root            0 date usr/lib/modules/5.10.0-13-amd64/kernel/fs
  +drwxr-xr-x   2 root     root            0 date usr/lib/modules/5.10.0-13-amd64/kernel/fs/overlayfs
  +-rw-r--r--   1 root     root       285667 date usr/lib/modules/5.10.0-13-amd64/kernel/fs/overlayfs/overlay.ko
  --rw-r--r--   1 root     root        69130 date usr/lib/modules/5.10.0-13-amd64/modules.alias
  --rw-r--r--   1 root     root        64959 date usr/lib/modules/5.10.0-13-amd64/modules.alias.bin
  +-rw-r--r--   1 root     root        69907 date usr/lib/modules/5.10.0-13-amd64/modules.alias
  +-rw-r--r--   1 root     root        65907 date usr/lib/modules/5.10.0-13-amd64/modules.alias.bin
  --rw-r--r--   1 root     root        19517 date usr/lib/modules/5.10.0-13-amd64/modules.dep
  --rw-r--r--   1 root     root        28161 date usr/lib/modules/5.10.0-13-amd64/modules.dep.bin
  --rw-r--r--   1 root     root          131 date usr/lib/modules/5.10.0-13-amd64/modules.devname
  +-rw-r--r--   1 root     root        19635 date usr/lib/modules/5.10.0-13-amd64/modules.dep
  +-rw-r--r--   1 root     root        28409 date usr/lib/modules/5.10.0-13-amd64/modules.dep.bin
  +-rw-r--r--   1 root     root          157 date usr/lib/modules/5.10.0-13-amd64/modules.devname
  --rw-r--r--   1 root     root       107148 date usr/lib/modules/5.10.0-13-amd64/modules.symbols
  --rw-r--r--   1 root     root       129343 date usr/lib/modules/5.10.0-13-amd64/modules.symbols.bin
  +-rw-r--r--   1 root     root       107260 date usr/lib/modules/5.10.0-13-amd64/modules.symbols
  +-rw-r--r--   1 root     root       129476 date usr/lib/modules/5.10.0-13-amd64/modules.symbols.bin
  -lrwxrwxrwx   1 root     root           44 date usr/lib/systemd/system/ctrl-alt-del.target -> ../../../../lib/systemd/system/reboot.target
  +lrwxrwxrwx   1 root     root           13 date usr/lib/systemd/system/ctrl-alt-del.target -> reboot.target
  -lrwxrwxrwx   1 root     root           20 date usr/lib/systemd/systemd-udevd -> ../../../bin/udevadm
  +lrwxrwxrwx   1 root     root           17 date usr/lib/systemd/systemd-udevd -> ../../bin/udevadm
  -lrwxrwxrwx   1 root     root           87 date usr/lib/systemd/system/sockets.target.wants/systemd-journald-audit.socket -> ../../../../../lib/systemd/system/sockets.target.wants/../systemd-journald-audit.socket
  -lrwxrwxrwx   1 root     root           89 date usr/lib/systemd/system/sockets.target.wants/systemd-journald-dev-log.socket -> ../../../../../lib/systemd/system/sockets.target.wants/../systemd-journald-dev-log.socket
  -lrwxrwxrwx   1 root     root           81 date usr/lib/systemd/system/sockets.target.wants/systemd-journald.socket -> ../../../../../lib/systemd/system/sockets.target.wants/../systemd-journald.socket
  -lrwxrwxrwx   1 root     root           86 date usr/lib/systemd/system/sockets.target.wants/systemd-udevd-control.socket -> ../../../../../lib/systemd/system/sockets.target.wants/../systemd-udevd-control.socket
  -lrwxrwxrwx   1 root     root           85 date usr/lib/systemd/system/sockets.target.wants/systemd-udevd-kernel.socket -> ../../../../../lib/systemd/system/sockets.target.wants/../systemd-udevd-kernel.socket
  +lrwxrwxrwx   1 root     root           32 date usr/lib/systemd/system/sockets.target.wants/systemd-journald-audit.socket -> ../systemd-journald-audit.socket
  +lrwxrwxrwx   1 root     root           34 date usr/lib/systemd/system/sockets.target.wants/systemd-journald-dev-log.socket -> ../systemd-journald-dev-log.socket
  +lrwxrwxrwx   1 root     root           26 date usr/lib/systemd/system/sockets.target.wants/systemd-journald.socket -> ../systemd-journald.socket
  +lrwxrwxrwx   1 root     root           31 date usr/lib/systemd/system/sockets.target.wants/systemd-udevd-control.socket -> ../systemd-udevd-control.socket
  +lrwxrwxrwx   1 root     root           30 date usr/lib/systemd/system/sockets.target.wants/systemd-udevd-kernel.socket -> ../systemd-udevd-kernel.socket
  -lrwxrwxrwx   1 root     root           83 date usr/lib/systemd/system/sysinit.target.wants/kmod-static-nodes.service -> ../../../../../lib/systemd/system/sysinit.target.wants/../kmod-static-nodes.service
  -lrwxrwxrwx   1 root     root           91 date usr/lib/systemd/system/sysinit.target.wants/systemd-ask-password-console.path -> ../../../../../lib/systemd/system/sysinit.target.wants/../systemd-ask-password-console.path
  -lrwxrwxrwx   1 root     root           82 date usr/lib/systemd/system/sysinit.target.wants/systemd-journald.service -> ../../../../../lib/systemd/system/sysinit.target.wants/../systemd-journald.service
  -lrwxrwxrwx   1 root     root           86 date usr/lib/systemd/system/sysinit.target.wants/systemd-modules-load.service -> ../../../../../lib/systemd/system/sysinit.target.wants/../systemd-modules-load.service
  -lrwxrwxrwx   1 root     root           80 date usr/lib/systemd/system/sysinit.target.wants/systemd-sysctl.service -> ../../../../../lib/systemd/system/sysinit.target.wants/../systemd-sysctl.service
  -lrwxrwxrwx   1 root     root           92 date usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service -> ../../../../../lib/systemd/system/sysinit.target.wants/../systemd-tmpfiles-setup-dev.service
  -lrwxrwxrwx   1 root     root           88 date usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup.service -> ../../../../../lib/systemd/system/sysinit.target.wants/../systemd-tmpfiles-setup.service
  -lrwxrwxrwx   1 root     root           79 date usr/lib/systemd/system/sysinit.target.wants/systemd-udevd.service -> ../../../../../lib/systemd/system/sysinit.target.wants/../systemd-udevd.service
  -lrwxrwxrwx   1 root     root           86 date usr/lib/systemd/system/sysinit.target.wants/systemd-udev-trigger.service -> ../../../../../lib/systemd/system/sysinit.target.wants/../systemd-udev-trigger.service
  +lrwxrwxrwx   1 root     root           28 date usr/lib/systemd/system/sysinit.target.wants/kmod-static-nodes.service -> ../kmod-static-nodes.service
  +lrwxrwxrwx   1 root     root           36 date usr/lib/systemd/system/sysinit.target.wants/systemd-ask-password-console.path -> ../systemd-ask-password-console.path
  +lrwxrwxrwx   1 root     root           27 date usr/lib/systemd/system/sysinit.target.wants/systemd-journald.service -> ../systemd-journald.service
  +lrwxrwxrwx   1 root     root           31 date usr/lib/systemd/system/sysinit.target.wants/systemd-modules-load.service -> ../systemd-modules-load.service
  +lrwxrwxrwx   1 root     root           25 date usr/lib/systemd/system/sysinit.target.wants/systemd-sysctl.service -> ../systemd-sysctl.service
  +lrwxrwxrwx   1 root     root           37 date usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service -> ../systemd-tmpfiles-setup-dev.service
  +lrwxrwxrwx   1 root     root           33 date usr/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup.service -> ../systemd-tmpfiles-setup.service
  +lrwxrwxrwx   1 root     root           24 date usr/lib/systemd/system/sysinit.target.wants/systemd-udevd.service -> ../systemd-udevd.service
  +lrwxrwxrwx   1 root     root           31 date usr/lib/systemd/system/sysinit.target.wants/systemd-udev-trigger.service -> ../systemd-udev-trigger.service
  --rwxr-xr-x   1 root     root           20 Dec 15  2020 usr/lib/udev/console-setup
  -lrwxrwxrwx   1 root     root           48 date usr/lib/x86_64-linux-gnu/libacl.so.1 -> ../../../lib/x86_64-linux-gnu/libacl.so.1.1.2253
  -lrwxrwxrwx   1 root     root           48 date usr/lib/x86_64-linux-gnu/libacl.so -> ../../../lib/x86_64-linux-gnu/libacl.so.1.1.2253
  +lrwxrwxrwx   1 root     root           18 date usr/lib/x86_64-linux-gnu/libacl.so.1 -> libacl.so.1.1.2253
  +lrwxrwxrwx   1 root     root           18 date usr/lib/x86_64-linux-gnu/libacl.so -> libacl.so.1.1.2253
  -lrwxrwxrwx   1 root     root           50 date usr/lib/x86_64-linux-gnu/libapparmor.so.1 -> ../../../lib/x86_64-linux-gnu/libapparmor.so.1.6.3
  +lrwxrwxrwx   1 root     root           20 date usr/lib/x86_64-linux-gnu/libapparmor.so.1 -> libapparmor.so.1.6.3
  -lrwxrwxrwx   1 root     root           49 date usr/lib/x86_64-linux-gnu/libattr.so.1 -> ../../../lib/x86_64-linux-gnu/libattr.so.1.1.2448
  -lrwxrwxrwx   1 root     root           49 date usr/lib/x86_64-linux-gnu/libattr.so -> ../../../lib/x86_64-linux-gnu/libattr.so.1.1.2448
  +lrwxrwxrwx   1 root     root           19 date usr/lib/x86_64-linux-gnu/libattr.so.1 -> libattr.so.1.1.2448
  +lrwxrwxrwx   1 root     root           19 date usr/lib/x86_64-linux-gnu/libattr.so -> libattr.so.1.1.2448
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libaudit.so.1 -> ../../../lib/x86_64-linux-gnu/libaudit.so.1.0.0
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libaudit.so -> ../../../lib/x86_64-linux-gnu/libaudit.so.1.0.0
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libaudit.so.1 -> libaudit.so.1.0.0
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libaudit.so -> libaudit.so.1.0.0
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libblkid.so.1 -> ../../../lib/x86_64-linux-gnu/libblkid.so.1.1.0
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libblkid.so -> ../../../lib/x86_64-linux-gnu/libblkid.so.1.1.0
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libblkid.so.1 -> libblkid.so.1.1.0
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libblkid.so -> libblkid.so.1.1.0
  -lrwxrwxrwx   1 root     root           45 date usr/lib/x86_64-linux-gnu/libbpf.so.0 -> ../../../lib/x86_64-linux-gnu/libbpf.so.0.3.0
  +lrwxrwxrwx   1 root     root           15 date usr/lib/x86_64-linux-gnu/libbpf.so.0 -> libbpf.so.0.3.0
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libbsd.so.0 -> ../../../lib/x86_64-linux-gnu/libbsd.so.0.11.3
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libbsd.so -> ../../../lib/x86_64-linux-gnu/libbsd.so.0.11.3
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libbsd.so.0 -> libbsd.so.0.11.3
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libbsd.so -> libbsd.so.0.11.3
  -lrwxrwxrwx   1 root     root           48 date usr/lib/x86_64-linux-gnu/libcap-ng.so.0 -> ../../../lib/x86_64-linux-gnu/libcap-ng.so.0.0.0
  -lrwxrwxrwx   1 root     root           48 date usr/lib/x86_64-linux-gnu/libcap-ng.so -> ../../../lib/x86_64-linux-gnu/libcap-ng.so.0.0.0
  +lrwxrwxrwx   1 root     root           18 date usr/lib/x86_64-linux-gnu/libcap-ng.so.0 -> libcap-ng.so.0.0.0
  +lrwxrwxrwx   1 root     root           18 date usr/lib/x86_64-linux-gnu/libcap-ng.so -> libcap-ng.so.0.0.0
  -lrwxrwxrwx   1 root     root           44 date usr/lib/x86_64-linux-gnu/libcap.so.2 -> ../../../lib/x86_64-linux-gnu/libcap.so.2.44
  -lrwxrwxrwx   1 root     root           44 date usr/lib/x86_64-linux-gnu/libcap.so -> ../../../lib/x86_64-linux-gnu/libcap.so.2.44
  +lrwxrwxrwx   1 root     root           14 date usr/lib/x86_64-linux-gnu/libcap.so.2 -> libcap.so.2.44
  +lrwxrwxrwx   1 root     root           14 date usr/lib/x86_64-linux-gnu/libcap.so -> libcap.so.2.44
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libcrypto.so -> ../../../lib/x86_64-linux-gnu/libcrypto.so.1.1
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libcrypto.so -> libcrypto.so.1.1
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libcrypt.so.1 -> ../../../lib/x86_64-linux-gnu/libcrypt.so.1.1.0
  -lrwxrwxrwx   1 root     root           43 date usr/lib/x86_64-linux-gnu/libcrypt.so -> ../../../lib/x86_64-linux-gnu/libcrypt.so.1
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libcrypt.so.1 -> libcrypt.so.1.1.0
  +lrwxrwxrwx   1 root     root           13 date usr/lib/x86_64-linux-gnu/libcrypt.so -> libcrypt.so.1
  -lrwxrwxrwx   1 root     root           42 date usr/lib/x86_64-linux-gnu/libc.so.6 -> ../../../lib/x86_64-linux-gnu/libc-2.31.so
  +lrwxrwxrwx   1 root     root           12 date usr/lib/x86_64-linux-gnu/libc.so.6 -> libc-2.31.so
  -lrwxrwxrwx   1 root     root           43 date usr/lib/x86_64-linux-gnu/libdl.so.2 -> ../../../lib/x86_64-linux-gnu/libdl-2.31.so
  -lrwxrwxrwx   1 root     root           40 date usr/lib/x86_64-linux-gnu/libdl.so -> ../../../lib/x86_64-linux-gnu/libdl.so.2
  +lrwxrwxrwx   1 root     root           13 date usr/lib/x86_64-linux-gnu/libdl.so.2 -> libdl-2.31.so
  +lrwxrwxrwx   1 root     root           10 date usr/lib/x86_64-linux-gnu/libdl.so -> libdl.so.2
  -lrwxrwxrwx   1 root     root           45 date usr/lib/x86_64-linux-gnu/libelf.so.1 -> ../../../lib/x86_64-linux-gnu/libelf-0.183.so
  -lrwxrwxrwx   1 root     root           41 date usr/lib/x86_64-linux-gnu/libelf.so -> ../../../lib/x86_64-linux-gnu/libelf.so.1
  +lrwxrwxrwx   1 root     root           15 date usr/lib/x86_64-linux-gnu/libelf.so.1 -> libelf-0.183.so
  +lrwxrwxrwx   1 root     root           11 date usr/lib/x86_64-linux-gnu/libelf.so -> libelf.so.1
  -lrwxrwxrwx   1 root     root           49 date usr/lib/x86_64-linux-gnu/libgcrypt.so.20 -> ../../../lib/x86_64-linux-gnu/libgcrypt.so.20.2.8
  -lrwxrwxrwx   1 root     root           49 date usr/lib/x86_64-linux-gnu/libgcrypt.so -> ../../../lib/x86_64-linux-gnu/libgcrypt.so.20.2.8
  +lrwxrwxrwx   1 root     root           19 date usr/lib/x86_64-linux-gnu/libgcrypt.so.20 -> libgcrypt.so.20.2.8
  +lrwxrwxrwx   1 root     root           19 date usr/lib/x86_64-linux-gnu/libgcrypt.so -> libgcrypt.so.20.2.8
  -lrwxrwxrwx   1 root     root           52 date usr/lib/x86_64-linux-gnu/libgpg-error.so.0 -> ../../../lib/x86_64-linux-gnu/libgpg-error.so.0.29.0
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libgpg-error.so -> ../../../lib/x86_64-linux-gnu/libgpg-error.so.0
  +lrwxrwxrwx   1 root     root           22 date usr/lib/x86_64-linux-gnu/libgpg-error.so.0 -> libgpg-error.so.0.29.0
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libgpg-error.so -> libgpg-error.so.0
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libip4tc.so.2 -> ../../../lib/x86_64-linux-gnu/libip4tc.so.2.0.0
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libip4tc.so.2 -> libip4tc.so.2.0.0
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libkmod.so.2 -> ../../../lib/x86_64-linux-gnu/libkmod.so.2.3.6
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libkmod.so.2 -> libkmod.so.2.3.6
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libkmod.so -> libkmod.so.2.3.6
  -lrwxrwxrwx   1 root     root           45 date usr/lib/x86_64-linux-gnu/liblz4.so.1 -> ../../../lib/x86_64-linux-gnu/liblz4.so.1.9.3
  -lrwxrwxrwx   1 root     root           45 date usr/lib/x86_64-linux-gnu/liblz4.so -> ../../../lib/x86_64-linux-gnu/liblz4.so.1.9.3
  +lrwxrwxrwx   1 root     root           15 date usr/lib/x86_64-linux-gnu/liblz4.so.1 -> liblz4.so.1.9.3
  +lrwxrwxrwx   1 root     root           15 date usr/lib/x86_64-linux-gnu/liblz4.so -> liblz4.so.1.9.3
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/liblzma.so.5 -> ../../../lib/x86_64-linux-gnu/liblzma.so.5.2.5
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/liblzma.so -> ../../../lib/x86_64-linux-gnu/liblzma.so.5.2.5
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/liblzma.so.5 -> liblzma.so.5.2.5
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/liblzma.so -> liblzma.so.5.2.5
  -lrwxrwxrwx   1 root     root           44 date usr/lib/x86_64-linux-gnu/libmd.so.0 -> ../../../lib/x86_64-linux-gnu/libmd.so.0.0.4
  -lrwxrwxrwx   1 root     root           44 date usr/lib/x86_64-linux-gnu/libmd.so -> ../../../lib/x86_64-linux-gnu/libmd.so.0.0.4
  +lrwxrwxrwx   1 root     root           14 date usr/lib/x86_64-linux-gnu/libmd.so.0 -> libmd.so.0.0.4
  +lrwxrwxrwx   1 root     root           14 date usr/lib/x86_64-linux-gnu/libmd.so -> libmd.so.0.0.4
  -lrwxrwxrwx   1 root     root           45 date usr/lib/x86_64-linux-gnu/libmnl.so.0 -> ../../../lib/x86_64-linux-gnu/libmnl.so.0.2.0
  -lrwxrwxrwx   1 root     root           45 date usr/lib/x86_64-linux-gnu/libmnl.so -> ../../../lib/x86_64-linux-gnu/libmnl.so.0.2.0
  +lrwxrwxrwx   1 root     root           15 date usr/lib/x86_64-linux-gnu/libmnl.so.0 -> libmnl.so.0.2.0
  +lrwxrwxrwx   1 root     root           15 date usr/lib/x86_64-linux-gnu/libmnl.so -> libmnl.so.0.2.0
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libmount.so.1 -> ../../../lib/x86_64-linux-gnu/libmount.so.1.1.0
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libmount.so -> ../../../lib/x86_64-linux-gnu/libmount.so.1.1.0
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libmount.so.1 -> libmount.so.1.1.0
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libmount.so -> libmount.so.1.1.0
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libmpfr.so.6 -> ../../../lib/x86_64-linux-gnu/libmpfr.so.6.1.0
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libmpfr.so.6 -> libmpfr.so.6.1.0
  -lrwxrwxrwx   1 root     root           42 date usr/lib/x86_64-linux-gnu/libm.so.6 -> ../../../lib/x86_64-linux-gnu/libm-2.31.so
  +lrwxrwxrwx   1 root     root           12 date usr/lib/x86_64-linux-gnu/libm.so.6 -> libm-2.31.so
  -lrwxrwxrwx   1 root     root           48 date usr/lib/x86_64-linux-gnu/libnss_dns.so.2 -> ../../../lib/x86_64-linux-gnu/libnss_dns-2.31.so
  -lrwxrwxrwx   1 root     root           45 date usr/lib/x86_64-linux-gnu/libnss_dns.so -> ../../../lib/x86_64-linux-gnu/libnss_dns.so.2
  +lrwxrwxrwx   1 root     root           18 date usr/lib/x86_64-linux-gnu/libnss_dns.so.2 -> libnss_dns-2.31.so
  +lrwxrwxrwx   1 root     root           15 date usr/lib/x86_64-linux-gnu/libnss_dns.so -> libnss_dns.so.2
  -lrwxrwxrwx   1 root     root           50 date usr/lib/x86_64-linux-gnu/libnss_files.so.2 -> ../../../lib/x86_64-linux-gnu/libnss_files-2.31.so
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libnss_files.so -> ../../../lib/x86_64-linux-gnu/libnss_files.so.2
  +lrwxrwxrwx   1 root     root           20 date usr/lib/x86_64-linux-gnu/libnss_files.so.2 -> libnss_files-2.31.so
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libnss_files.so -> libnss_files.so.2
  -lrwxrwxrwx   1 root     root           48 date usr/lib/x86_64-linux-gnu/libnvpair.so.3 -> ../../../lib/x86_64-linux-gnu/libnvpair.so.3.0.0
  +lrwxrwxrwx   1 root     root           18 date usr/lib/x86_64-linux-gnu/libnvpair.so.3 -> libnvpair.so.3.0.0
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libpam.so.0 -> ../../../lib/x86_64-linux-gnu/libpam.so.0.85.1
  -lrwxrwxrwx   1 root     root           41 date usr/lib/x86_64-linux-gnu/libpam.so -> ../../../lib/x86_64-linux-gnu/libpam.so.0
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libpam.so.0 -> libpam.so.0.85.1
  +lrwxrwxrwx   1 root     root           11 date usr/lib/x86_64-linux-gnu/libpam.so -> libpam.so.0
  -lrwxrwxrwx   1 root     root           50 date usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 -> ../../../lib/x86_64-linux-gnu/libpcre2-8.so.0.10.1
  -lrwxrwxrwx   1 root     root           50 date usr/lib/x86_64-linux-gnu/libpcre2-8.so -> ../../../lib/x86_64-linux-gnu/libpcre2-8.so.0.10.1
  +lrwxrwxrwx   1 root     root           20 date usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 -> libpcre2-8.so.0.10.1
  +lrwxrwxrwx   1 root     root           20 date usr/lib/x86_64-linux-gnu/libpcre2-8.so -> libpcre2-8.so.0.10.1
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libpcre.so.3 -> ../../../lib/x86_64-linux-gnu/libpcre.so.3.13.3
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libpcre.so.3 -> libpcre.so.3.13.3
  -lrwxrwxrwx   1 root     root           48 date usr/lib/x86_64-linux-gnu/libpthread.so.0 -> ../../../lib/x86_64-linux-gnu/libpthread-2.31.so
  -lrwxrwxrwx   1 root     root           45 date usr/lib/x86_64-linux-gnu/libpthread.so -> ../../../lib/x86_64-linux-gnu/libpthread.so.0
  +lrwxrwxrwx   1 root     root           18 date usr/lib/x86_64-linux-gnu/libpthread.so.0 -> libpthread-2.31.so
  +lrwxrwxrwx   1 root     root           15 date usr/lib/x86_64-linux-gnu/libpthread.so -> libpthread.so.0
  -lrwxrwxrwx   1 root     root           48 date usr/lib/x86_64-linux-gnu/libreadline.so.8 -> ../../../lib/x86_64-linux-gnu/libreadline.so.8.1
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libreadline.so -> ../../../lib/x86_64-linux-gnu/libreadline.so.8
  +lrwxrwxrwx   1 root     root           18 date usr/lib/x86_64-linux-gnu/libreadline.so.8 -> libreadline.so.8.1
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libreadline.so -> libreadline.so.8
  -lrwxrwxrwx   1 root     root           43 date usr/lib/x86_64-linux-gnu/librt.so.1 -> ../../../lib/x86_64-linux-gnu/librt-2.31.so
  -lrwxrwxrwx   1 root     root           40 date usr/lib/x86_64-linux-gnu/librt.so -> ../../../lib/x86_64-linux-gnu/librt.so.1
  +lrwxrwxrwx   1 root     root           13 date usr/lib/x86_64-linux-gnu/librt.so.1 -> librt-2.31.so
  +lrwxrwxrwx   1 root     root           10 date usr/lib/x86_64-linux-gnu/librt.so -> librt.so.1
  -lrwxrwxrwx   1 root     root           49 date usr/lib/x86_64-linux-gnu/libseccomp.so.2 -> ../../../lib/x86_64-linux-gnu/libseccomp.so.2.5.1
  +lrwxrwxrwx   1 root     root           19 date usr/lib/x86_64-linux-gnu/libseccomp.so.2 -> libseccomp.so.2.5.1
  -lrwxrwxrwx   1 root     root           45 date usr/lib/x86_64-linux-gnu/libselinux.so -> ../../../lib/x86_64-linux-gnu/libselinux.so.1
  +lrwxrwxrwx   1 root     root           15 date usr/lib/x86_64-linux-gnu/libselinux.so -> libselinux.so.1
  -lrwxrwxrwx   1 root     root           49 date usr/lib/x86_64-linux-gnu/libsigsegv.so.2 -> ../../../lib/x86_64-linux-gnu/libsigsegv.so.2.0.6
  +lrwxrwxrwx   1 root     root           19 date usr/lib/x86_64-linux-gnu/libsigsegv.so.2 -> libsigsegv.so.2.0.6
  -lrwxrwxrwx   1 root     root           51 date usr/lib/x86_64-linux-gnu/libsmartcols.so.1 -> ../../../lib/x86_64-linux-gnu/libsmartcols.so.1.1.0
  +lrwxrwxrwx   1 root     root           21 date usr/lib/x86_64-linux-gnu/libsmartcols.so.1 -> libsmartcols.so.1.1.0
  -lrwxrwxrwx   1 root     root           45 date usr/lib/x86_64-linux-gnu/libtinfo.so.6 -> ../../../lib/x86_64-linux-gnu/libtinfo.so.6.2
  -lrwxrwxrwx   1 root     root           43 date usr/lib/x86_64-linux-gnu/libtinfo.so -> ../../../lib/x86_64-linux-gnu/libtinfo.so.6
  +lrwxrwxrwx   1 root     root           15 date usr/lib/x86_64-linux-gnu/libtinfo.so.6 -> libtinfo.so.6.2
  +lrwxrwxrwx   1 root     root           13 date usr/lib/x86_64-linux-gnu/libtinfo.so -> libtinfo.so.6
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libtspi.so.1 -> ../../../lib/x86_64-linux-gnu/libtspi.so.1.2.0
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libtspi.so.1 -> libtspi.so.1.2.0
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libudev.so.1 -> ../../../lib/x86_64-linux-gnu/libudev.so.1.7.0
  -lrwxrwxrwx   1 root     root           42 date usr/lib/x86_64-linux-gnu/libudev.so -> ../../../lib/x86_64-linux-gnu/libudev.so.1
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libudev.so.1 -> libudev.so.1.7.0
  +lrwxrwxrwx   1 root     root           12 date usr/lib/x86_64-linux-gnu/libudev.so -> libudev.so.1
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libuuid.so.1 -> ../../../lib/x86_64-linux-gnu/libuuid.so.1.3.0
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libuuid.so -> ../../../lib/x86_64-linux-gnu/libuuid.so.1.3.0
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libuuid.so.1 -> libuuid.so.1.3.0
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libuuid.so -> libuuid.so.1.3.0
  -lrwxrwxrwx   1 root     root           47 date usr/lib/x86_64-linux-gnu/libuutil.so.3 -> ../../../lib/x86_64-linux-gnu/libuutil.so.3.0.0
  +lrwxrwxrwx   1 root     root           17 date usr/lib/x86_64-linux-gnu/libuutil.so.3 -> libuutil.so.3.0.0
  -lrwxrwxrwx   1 root     root           50 date usr/lib/x86_64-linux-gnu/libzfs_core.so.3 -> ../../../lib/x86_64-linux-gnu/libzfs_core.so.3.0.0
  +lrwxrwxrwx   1 root     root           20 date usr/lib/x86_64-linux-gnu/libzfs_core.so.3 -> libzfs_core.so.3.0.0
  -lrwxrwxrwx   1 root     root           45 date usr/lib/x86_64-linux-gnu/libzfs.so.4 -> ../../../lib/x86_64-linux-gnu/libzfs.so.4.1.0
  +lrwxrwxrwx   1 root     root           15 date usr/lib/x86_64-linux-gnu/libzfs.so.4 -> libzfs.so.4.1.0
  -lrwxrwxrwx   1 root     root           44 date usr/lib/x86_64-linux-gnu/libz.so.1 -> ../../../lib/x86_64-linux-gnu/libz.so.1.2.11
  -lrwxrwxrwx   1 root     root           44 date usr/lib/x86_64-linux-gnu/libz.so -> ../../../lib/x86_64-linux-gnu/libz.so.1.2.11
  +lrwxrwxrwx   1 root     root           14 date usr/lib/x86_64-linux-gnu/libz.so.1 -> libz.so.1.2.11
  +lrwxrwxrwx   1 root     root           14 date usr/lib/x86_64-linux-gnu/libz.so -> libz.so.1.2.11
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libzstd.so.1 -> ../../../lib/x86_64-linux-gnu/libzstd.so.1.4.8
  -lrwxrwxrwx   1 root     root           46 date usr/lib/x86_64-linux-gnu/libzstd.so -> ../../../lib/x86_64-linux-gnu/libzstd.so.1.4.8
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libzstd.so.1 -> libzstd.so.1.4.8
  +lrwxrwxrwx   1 root     root           16 date usr/lib/x86_64-linux-gnu/libzstd.so -> libzstd.so.1.4.8
  --rwxr-xr-x   1 root     root       517176 Nov  2  2019 usr/local/lib/libgmp.so.10.3.0
  +-rwxr-xr-x   1 root     staff      517176 Nov  2  2019 usr/local/lib/libgmp.so.10.3.0
  -lrwxrwxrwx   1 root     root           14 date usr/sbin/depmod -> ../../bin/kmod
  +lrwxrwxrwx   1 root     root           11 date usr/sbin/depmod -> ../bin/kmod
  -lrwxrwxrwx   1 root     root           19 date usr/sbin/halt -> ../../bin/systemctl
  +lrwxrwxrwx   1 root     root           16 date usr/sbin/halt -> ../bin/systemctl
  -lrwxrwxrwx   1 root     root           14 date usr/sbin/insmod -> ../../bin/kmod
  +lrwxrwxrwx   1 root     root           11 date usr/sbin/insmod -> ../bin/kmod
  -lrwxrwxrwx   1 root     root           12 date usr/sbin/ip -> ../../bin/ip
  +lrwxrwxrwx   1 root     root            9 date usr/sbin/ip -> ../bin/ip
  -lrwxrwxrwx   1 root     root           14 date usr/sbin/lsmod -> ../../bin/kmod
  -lrwxrwxrwx   1 root     root           14 date usr/sbin/modinfo -> ../../bin/kmod
  -lrwxrwxrwx   1 root     root           14 date usr/sbin/modprobe -> ../../bin/kmod
  +lrwxrwxrwx   1 root     root           11 date usr/sbin/lsmod -> ../bin/kmod
  +lrwxrwxrwx   1 root     root           11 date usr/sbin/modinfo -> ../bin/kmod
  +lrwxrwxrwx   1 root     root           11 date usr/sbin/modprobe -> ../bin/kmod
  -lrwxrwxrwx   1 root     root           19 date usr/sbin/poweroff -> ../../bin/systemctl
  +lrwxrwxrwx   1 root     root           16 date usr/sbin/poweroff -> ../bin/systemctl
  -lrwxrwxrwx   1 root     root           19 date usr/sbin/reboot -> ../../bin/systemctl
  -lrwxrwxrwx   1 root     root           14 date usr/sbin/rmmod -> ../../bin/kmod
  +lrwxrwxrwx   1 root     root           16 date usr/sbin/reboot -> ../bin/systemctl
  +lrwxrwxrwx   1 root     root           11 date usr/sbin/rmmod -> ../bin/kmod

Closes #1781
2022-06-24 20:27:08 +00:00
наб
06d316171c fix(dracut-install): convert_abs_rel: return valid path on error
convert_abs_rel() gets
  from  =/var/tmp/dracut.8dxnpY/initramfs/lib/x86_64-linux-gnu/libuuid.so.1.3.0
  target=/var/tmp/dracut.8dxnpY/initramfs/lib/x86_64-linux-gnu/libuuid.so
returning from is invalid; skip over the destdir:
  /lib/x86_64-linux-gnu/libuuid.so.1.3.0
2022-06-24 20:27:08 +00:00
наб
e7d6a1e30c perf(dracut-install): strdup()+[dirlen]=0 => strndup 2022-06-24 20:27:08 +00:00
Daan De Meyer
846a845375 fix(install.d): add --verbose if KERNEL_INSTALL_VERBOSE=1
If KERNEL_INSTALL_VERBOSE=1, let's make sure dracut also produces
extended output for debugging purposes.
2022-06-21 23:06:57 +00:00
Kairui Song
e4f1dbcc00 fix(dracut): typo error 'aggresive' -> 'aggressive'
This option was introduced not long ago, but unfortunately it was
misspelled and have affected following up commits. It's not a commonly
used option, at least not yet, so just rename and fix it.

Signed-off-by: Kairui Song <kasong@tencent.com>
2022-06-21 19:33:49 +00:00
Alberto Planas
90585c624a fix(integrity): do not enable EVM if there is no key
Track when a key is successfully loaded, and return 1 if no key has been
loaded.  This will not enable EVM if there are no keys available in the
system.

Fix #1847

Signed-off-by: Alberto Planas <aplanas@suse.com>
2022-06-21 07:05:01 +00:00
Alberto Planas
9d1004a4e9 fix(integrity): remove unused variable
Drop X509ID variable inside the `if`, and use the same comparison that
is already in evm_enable.

Signed-off-by: Alberto Planas <aplanas@suse.com>
2022-06-21 07:05:01 +00:00
Jóhann B. Guðmundsson
ad7d5bc8ea fix(Makefile): reduce the number of shell invocations
Makefile uses recursively expanded macros and as can be seen by simply
adding $(warning Call to shell) in front of $(shell ...) Foo's in the
Makefile, we are calling out to shell 9 times just to get the working
directory, a working directory which doesn't change during Make!

Let's save few pony's and reduce it to 2...
2022-06-21 05:40:09 +00:00
Jóhann B. Guðmundsson
29e9718f11 docs: update NEWS.md and AUTHORS 2022-06-19 22:35:26 +00:00
Martin Wilck
6d92326201 feat(dracut): support parallel execution with --parallel
Add an option --parallel which can currently be used with
--regenerate-all. With --regenerate-all --parallel, dracut will be
run in parallel for all kernels found.

Also introduce a config file equivalent setting: parallel="yes".
Making this work requires moving the code block that handles --regenerate-all
behind the code block for reading the config files.

Signed-off-by: Martin Wilck <mwilck@suse.com>
2022-06-17 16:47:44 +00:00
Tao Liu
d9812fc4ae feat(lvm): add new module lvmthinpool-monitor
Previously dracut didn't support the feature of lvm thinpool autoextend.

The feature is useful to cases such as kdump, when vmcore to be saved to a
lvm thin volume. The thinpool should be able to autoextend, otherwise an
IO error will be caused and leaves an incomplete vmcore.

There is lvm2-monitor.service and dmeventd avaliable, however
considering [1], it is not suitable for kdump and memory limited cases.

This patch achieves the same by parallel looping a shell function in the
background, which calls lvextend periodically. If thredshold reaches,
autoextend it, if not then nothing happens.

[1]: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/message/YF254ZO3PJ3U56P4OKHV3JNYP2PJUMYX/

Signed-off-by: Tao Liu <ltao@redhat.com>
2022-06-17 13:09:45 +00:00
наб
09a1e5afd2 fix(bluetooth): accept compressed firmwares in inst_multiple 2022-06-09 23:46:52 +00:00
наб
9d8387ed80 feat(dracut-install): support ZSTD-compressed firmware with .zst suffix
Coming in 5.19:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=driver-core-next&id=23cfbc6ec44e5e80d5522976ff45ffcdcddfb230
2022-06-09 23:46:52 +00:00
наб
95aeed8975 fix(dracut): default to correct firmware search paths
1. /sys/module/firmware_class/parameters/path (fw_path_para), if any
2. /lib/firmware/updates/$(uname -r)
3. /lib/firmware/updates
4. /lib/firmware/$(uname -r)
5. /lib/firmware

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/base/firmware_loader/main.c?h=v5.17#n406
2022-06-09 23:46:52 +00:00
Laszlo Gombos
a1d4041cee test: list only the required modules explicitly
Test for module dependencies and increase test coverage.
2022-06-02 13:43:59 +00:00
Laszlo Gombos
6ee2baf314 fix(test): dmsquash-live test without an iso
Remove fedore specific parts and use squash filesystem as live root.
2022-06-02 13:42:20 +00:00
Conrad Hoffmann
1354d6339a fix(Makefile): use of potentially unset variable
`CWD` is not a Make variable. This may have worked accidentally for some
people if their shell happend to provide `CWD` and Make picked it up.

As is, this tends to pick up git versions of unrelated parent
directories, e.g. when packaging for distributions.
2022-06-02 12:25:44 +00:00
Antonio Alvarez Feijoo
77420527b0 docs(dracut.cmdline): add missing rd.nonvmf option
This is a specific option of the nvmf module.
2022-06-02 09:58:52 +00:00
Antonio Alvarez Feijoo
e405501e23 fix(nvmf): deprecate old nvmf cmdline options
Fixes issue #1831
2022-06-02 09:58:52 +00:00
Antonio Alvarez Feijoo
f63f411d52 fix(integrity): do not display any error if there is no IMA certificate
IMA appraisal can be used without digital signatures, just by storing hash
digests instead.
2022-05-26 19:22:13 +00:00
Antonio Alvarez Feijoo
b4522705c8 docs(dracut.cmdline): add missing evmx509 option
This is a specific option of the integrity module.
2022-05-26 19:22:13 +00:00
Laszlo Gombos
1befc64167 feat(gensplash): remove module
splashutils Gentoo package (a dependency for the gensplash dracut module)
is non existent in the official Gentoo repositories.
2022-05-16 19:01:17 +00:00
Antonio Alvarez Feijoo
e455273187 docs(dracut.conf): regenerate_all not supported
The regenerate_all option is used before sourcing the configuration files.
2022-05-16 19:00:27 +00:00
Antonio Alvarez Feijoo
9bef71094e fix(dracut.sh): format usage and add missing options
Set common format to each option and add missing options:
    --no-machineid
2022-05-11 04:43:10 +00:00
Antonio Alvarez Feijoo
a6c497dc7a docs(dracut): format and add missing options
Set common format to each option, correct default compression options and add
missing options:
    --rebuild
    --aggresive-strip
    --hostonly-mode
    --hostonly-nics
    --noimageifnotneeded
2022-05-11 04:43:10 +00:00
Antonio Alvarez Feijoo
20eba720a5 docs(dracut.conf): format and add missing options
Set common format to each option, add/correct default values and add missing
options:
    force_add_dracutmodules
    libdirs
    squash_compress
    aggresive_strip
    do_hardlink
    prefix
    hostonly_mode
    hostonly_nics
    sshkey
    regenerate_all
    noimageifnotneeded
    uefi
    machine_id
    enhanced_cpio
2022-05-11 04:43:10 +00:00
Antonio Alvarez Feijoo
1199f990bb fix(shell-completion): add missing options 2022-05-11 04:43:10 +00:00
Laszlo Gombos
0b339d7351 ci(integration): maintain only Fedora latest
Alphabetically ordering the distributions in the container section
2022-05-07 08:56:32 +00:00
German Maglione
8348c5636a ci(virtiofs): add virtiofs label
Add the label virtiofs to the label trigger file.

Signed-off-by: German Maglione <gmaglione@redhat.com>
2022-05-05 22:21:33 +00:00
German Maglione
4632f79995 feat(virtiofs): virtiofs root filesystem support
Currently dracut can't mount virtiofs as root filesystem.
Make possible to boot virtual machines off virtiofs,
passing "root=virtiofs:<mtag>", using the mount tag <mtag>
as root filesystem. Alternatively this module also supports
"rootfstype=virtiofs root=<mtag>"

Signed-off-by: German Maglione <gmaglione@redhat.com>
2022-05-05 22:21:33 +00:00
Wenchao Hao
319dc7fe10 fix(iscsi): do not exit in handle_netroot() if discovery failed
User may specify multiple netroot in cmdline, failed to connect one netroot
do not mean all netroot are not accessible. So if one netroot failed, do
not exit the discovery and login flow.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
2022-05-05 20:40:00 +00:00
Laszlo Gombos
b3ab3037e8 fix(test): remove stale comments 2022-05-04 21:36:04 +00:00
Laszlo Gombos
a7dfdf6acb fix(test): add support for dpkg to pass the test on debian 2022-05-04 07:30:45 +00:00
Antonio Alvarez Feijoo
d6343146c1 fix(lsinitrd.sh): always check that MACHINE_ID is not empty 2022-05-03 22:12:13 +00:00
Antonio Alvarez Feijoo
527fdfa151 fix(dracut.sh): always check that MACHINE_ID is not empty
On new installations, /etc/machine-id may exist and be empty, and
also /efi or /boot/efi may be a mount point, leading to an invalid
initramfs output file.
2022-05-03 22:12:13 +00:00
Laszlo Gombos
7f7dc9173d ci: on debian, default shell is not bash 2022-05-03 21:41:31 +00:00
Laszlo Gombos
ab798f6785 ci: install sudo for the debian container 2022-05-02 05:46:10 +00:00
Morten Linderud
8abd45d288 docs(dracut.usage): fix dracut.cmdline reference from section 5 to 7
Signed-off-by: Morten Linderud <morten@linderud.pw>
2022-05-01 11:56:07 +00:00
Laszlo Gombos
08ed7b2d00 fix(dmsquash-live): mount live device with the correct type
fstype is not the correct type for the live device.
2022-04-29 22:12:05 +00:00
Laszlo Gombos
080f3e2e29 ci: add Debian Linux to limited tests 2022-04-29 22:10:44 +00:00
Antonio Alvarez Feijoo
012d7db27d fix(dracut.sh): avoid calling dfatal before dracut-logger is sourced
dracut-logger is sourced in dracut-init, so any earlier calls to logger
functions before dracut-init is sourced fail.

Fix issue #1758
2022-04-29 21:49:23 +00:00
Jóhann B. Guðmundsson
d0c6ab21d9 fix(dracut.spec): add connman module
Add the connman module to the spec file
2022-04-29 20:53:54 +00:00
David Tardon
42e8f17c24 feat(dracut-systemd): use Documentation= to point to man page 2022-04-26 18:24:15 +00:00
David Tardon
77c28b3020 fix(dracut-systemd): drop misleading man page reference
dracut-shutdown.service is not a part of the boot process, therefore the
reference to dracut.bootup(7) is misleading.
2022-04-26 18:24:15 +00:00
Masahiro Matsuya
485413627f fix(fedora.conf): vi binary is missing
/usr/bin/vi is just a wrapper shell script to run /usr/libexec/vi which is the vi binary.
/usr/bin/vi is available in initrd.img, but /usr/libexec/vi is missing.
As as result, vi command never works.
This PR is to add /usr/libexec/vi.
2022-04-26 07:09:15 +00:00
Antonio Alvarez Feijoo
ffc1985cb2 fix(man): add missing default paths 2022-04-25 21:29:30 +00:00
Antonio Alvarez Feijoo
49ea6c42db fix(lsinitrd.sh): add missing default paths 2022-04-25 21:29:30 +00:00
Antonio Alvarez Feijoo
28ef3bc6a6 fix(dracut.sh): add missing default output file paths 2022-04-25 21:29:30 +00:00
Coiby Xu
ab6f57339a fix(kernel-network-modules): allow specifying empty --hostonly-nics
Commit 1e92f728 ("Add a --hostonly-nics option") allows only installing
the network drivers for specified NICs. But it doesn't allow an emtpy
--hostonly-nics. Specifying empty hostonly-nics is needed to address the
following use cases,
 - drivers/s390/net is installed regardless of --hostonly-nics. There is
   no need to repeat it.
 - get_dev_module couldn't find the driver for a bond or a bridge
   network interface so it's better for a module to install a bond
   or bridge driver itself
 - dracut kdump module wants to install the needed network drivers by
   itself because it can't add the --hostonly-nics option to dracut when
   itself is a dracut module

This patch distinguishes between an empty --hostonly-nics and --hostonly-nics
not added so a user can pass an empty --hostonly-nics option.
2022-04-24 05:28:16 +00:00
Antonio Alvarez Feijoo
d615934311 fix(nfs): give /run/rpcbind ownership to rpc user
Avoid errors when rpcbind tries to write to the /run/rpcbind directory.
2022-04-21 06:42:27 +00:00
Antonio Alvarez Feijoo
0e4df7a39d fix(nfs): require and install needed binaries
parse-nfsroot.sh requires sed, chmod and chown.
2022-04-21 06:42:27 +00:00
Antonio Alvarez Feijoo
79f9d9e1c2 fix(lvm): add missing grep requirement
Since commit https://github.com/dracutdevs/dracut/commit/7ffc5e38
lvm_scan.sh needs grep.
2022-04-11 07:33:31 +00:00
Antonio Alvarez Feijoo
a7a4b76c4a fix(resume): correct call to block_is_netdevice function
The block_is_netdevice function requires the device in <maj:min>
format, but the swap_devs array is populated with the content of
/proc/swaps, which prints the devices using their paths from /dev.

This causes the check method to never detect if swap is mounted on a
network device.
2022-04-09 08:11:46 +00:00
Antonio Alvarez Feijoo
0afa840e11 fix(dracut-functions.sh): correct wrong comment 2022-04-09 08:11:46 +00:00
наб
27071e9a0e fix(dracut.cmdline.7): {=> must} also be specified 2022-04-09 08:10:35 +00:00
Antonio Alvarez Feijoo
7103c4bce9 fix(ifcfg): avoid calling unavailable dracut-logger functions
The dracut-logger functions are only available during the initrd
generation. For internal initrd scripts that run at boot,
dracut-lib provides warn() and info().
2022-04-09 08:09:24 +00:00
Antonio Alvarez Feijoo
b7059aef59 fix(network-manager): avoid calling unavailable dracut-logger functions
The dracut-logger functions are only available during the initrd
generation. For internal initrd scripts that run at boot,
dracut-lib provides warn() and info().
2022-04-09 08:09:24 +00:00
Nicolas Porcel
65e41b5460 feat(man): add documentation for rd.luks.key.tout 2022-04-09 07:55:11 +00:00
Nicolas Porcel
6c11a8fcee fix(crypt): add missing is_keysource parameter to cryptroot-ask
Without this change, rd.luks.key.tout is used, which is the number of
times cryptroot tries to find the key.
2022-04-09 07:54:06 +00:00
Antonio Alvarez Feijoo
a90dbd958b fix(man): add missing --libdirs section 2022-04-09 07:35:54 +00:00
Antonio Alvarez Feijoo
352e591731 fix(dracut.sh): add missing --libdirs usage 2022-04-09 07:35:54 +00:00
Benjamin Gilbert
25a92885a9 fix(nvmf): set executable bit on nvmf-autoconnect.sh
It's installed in /sbin, and run via initqueue in the special case of FC
transport without a discovery.conf and without kernel arguments.  If the
executable bit is not set, initqueue fails with "Invalid command".

Caught by CI checking for non-executable files in binary directories.
2022-04-09 07:35:13 +00:00
James Morris
90032a4631 feat(url-lib.sh): add --retry-connrefused to default curl arguments
Trigger the existing retry condition on connection refused
to mitigate transient connectivity issues.
2022-04-09 07:34:36 +00:00
Antonio Alvarez Feijoo
9ef73b6ad0 fix(dracut-install): copy files preserving ownership attributes
While the "clone copy" operation changes the ownership of the cloned
files, the "normal copy" using cp does not preserve it.
2022-04-04 18:21:18 +00:00
Pavel Valena
79170aafba docs: do not mention nullglob in cases where it's not needed 2022-04-04 08:00:10 +00:00
Pavel Valena
f3441cc7c5 fix(10i18n): stop leaking shell options
Avoid using shell options in findkeymap, instead of using a wrapper[*]
to restore the previous options. Using mapfile and find to generate the list
of files also has the benefit of being more readable in this case.

[*] Reverted commit 35064768eb
Original issue description from Michal Hecko <mhecko@redhat.com>:

The findkeymap function manipulates the shell options and relies on
restoring them using the trap. However, as the function might be called
recursively, each recursive invocation changes the signal handler to its
own. As the recursion is entered with shell options already modified,
the changed trap handler is replaced with restoration to the modified
shell options, not the original ones.
2022-04-04 08:00:10 +00:00
Pavel Valena
f63faaa68f revert(10i18n): stop leaking shell options
This reverts commit 35064768eb, to replace
the implementation.
2022-04-04 08:00:10 +00:00
Pavel Valena
c7b3ac2bd1 fix(test): nullglob should not be needed 2022-04-04 08:00:10 +00:00
Pavel Valena
bd1a5ca9ae fix(dracut-install): do not fail when SOURCE is optional and missing
When running dracut-install with '-o' (optional source), and nullglob
at the same time, when all of the arguments evaluate <null>, dracut-install
should not fail even when the source is not specified.
2022-04-04 08:00:10 +00:00
Pavel Valena
36aaa74f36 fix(bluetooth): nullglob should not be needed 2022-04-04 08:00:10 +00:00
Pavel Valena
c7cfdf7703 ci: obsolete Dockerfile with Fedora 33 2022-04-04 05:50:52 +00:00
Pavel Valena
92277cc8da ci: add Dockerfile for Fedora 35 2022-04-04 05:50:52 +00:00
Antonio Alvarez Feijoo
4688695621 fix(dracut-initramfs-restore.sh): unpack uncompressed initrd as last option
Attempting to unpack the initrd assuming it is uncompressed when
it is delays the shutdown process by several seconds. This must
be the last check.
2022-03-30 21:25:15 +00:00
Shreenidhi Shedi
0ef40d8812 fix(configure): check for SYS-gettid during configure
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2022-03-30 12:00:58 +00:00
David Teigland
7e03d81fe3 fix(lvm): ignore expected error message from lvm config
The "lvm config" commands that check the filter settings will
often find nothing set and report an error message:
"Configuration node devices/filter not found"
Direct these messages to /dev/null so they do not appear as
noise in system logs.
2022-03-29 02:38:48 +00:00
Zoltán Böszörményi
f6d83f9f5c fix(connman): copy netroot.sh from the network module and install it
As requested by johannbg.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
2022-03-28 08:01:46 +00:00
Zoltán Böszörményi
f30d03513f feat(connman): introduce connman support module
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
2022-03-28 08:01:46 +00:00
Antonio Alvarez Feijoo
42e9d18892 fix(plymouth): hide dpkg-architecture stderr messages
dpkg-architecture prints warnings and errors to stderr. If the system does
not have gcc installed, it issues a warning:

dpkg-architecture: warning: cannot determine CC system type, falling back to default (native compilation)

This fix checks only the value of the queried variable.
2022-03-27 18:37:39 +00:00
nkraetzschmar
70112297d8 style: remove accidental whitespace in front of comment line 2022-03-27 18:36:55 +00:00
nkraetzschmar
8391a99303 feat: add aarch64 uefi support 2022-03-27 18:36:55 +00:00
Laszlo Gombos
aebeb2ecdf fix(udev-rules): add cdrom udev rules by default
Include cdrom udev rules by default, even if
systemd-udevd or dmsquash-live dracut modules
are not installed.
2022-03-25 20:09:14 +00:00
David Tardon
24d8f35b9c fix(dracut-initramfs-restore.sh): check if SELINUXTYPE is set
It can happen that SELINUXTYPE is not set, e.g., in Fedora/RHEL
installation images /etc/selinux/config is an empty file. That means
that setfiles fails, which makes dracut-initramfs-restore fail too
because it uses "set -x", which means that dracut-shutdown.service
fails. But, after commit 7ab1d00227, a
failure of dracut-shutdown.service means that the final switch back into
initrd is skipped. Let's just add an additional sanity check to
workaround that.
2022-03-18 06:37:23 +00:00
Antonio Alvarez Feijoo
a38d9ec032 fix(bluetooth): make $dbussystem/bluetooth.conf optional
Do not display an error message if $dbussystem/bluetooth.conf file don't exist.
2022-03-17 19:40:23 +00:00
David Tardon
85fdff1212 fix(dracut-systemd): correct service dependencies
dracut-systemd.service is not an early boot service, therefore it should
not use DefaultDependencies=no. This also fixes the service's ordering
dependencies, as in its current state it is missing
Before=shutdown.target umount.target
2022-03-17 05:30:27 +00:00
Michal Hecko
35064768eb fix(10i18n): stop leaking shell options
The findkeymap function manipulates the shell options and relies on
restoring them using the trap. However, as the function might be called
recursively, each recursive invocation changes the signal handler to its
own. As the recursion is entered with shell options already modified,
the changed trap handler is replaced with restoration to the modified
shell options, not the original ones. This patch wraps the findkeymap
function so that the shellopts are manipulated and restored outside the
recursion.
2022-03-09 04:09:53 +00:00
David Tardon
3385989266 fix(dracut.sh): drop restorecon call
AFAICT there is no need for it. cp already applies appropriate label on
the target file (unless --preserve=context is used).
2022-03-09 04:03:32 +00:00
Laszlo Gombos
9a884b3afc fix(dmsquash-live): permanent overlay on the same drive as LiveCD .iso
An example kernel command line arguments for this configuration
iso-scan/filename=distro.iso root=live:CDLABEL=ISO
rd.live.image rd.live.overlay=/dev/sda:/overlay.img

iso-scan would mount /dev/sda first and keep it mounted. The change
allows detecting if the permanent overlay drive is already mounted.
It also ensures that the mount is writable, as permanent overlay
requires writable storage.
2022-03-01 22:37:09 +00:00
Laszlo Gombos
ce55a85ed5 fix(install): restore musl support
__GLIBC_PREREQ is only defined in glibc.
2022-03-01 22:25:53 +00:00
Jóhann B. Guðmundsson
8fd37d20f4 fix(github): remove packit
It's been a year since I initially made the PR to include packit.

Having it has resulted in increasing the project's cost of development
( CoD ) thus defeating the initial purpose of including it, which was an attempt
to do the opposite as in to reduce it, thus removing it.

My take on this after a year in use is that the concept is flawed,
limited to a single distribution and cannot work in practice without
adding to upstreams and it's contributors CoD but other projects milage
may vary.
2022-03-01 21:00:51 +00:00
Savyasachee Jha
9582f02773 feat(dracut): add zfs detection
zfs detection is currently done by the zfs dracut module installed by
downstream, resulting in a lot of duplicated code. This commit puts zfs
detection into the core dracut logic, allowing for detection of zfs
partitions to be done at the same time as all others. It also allows for
dracut to correctly create a `root=` cmdline parameter for zfs.

Signed-off-by: Savyasachee Jha <hi@savyasacheejha.com>
2022-02-28 21:22:38 +00:00
Antonio Alvarez Feijoo
4c355d0558 fix(dracut.sh): error exporting sysctl variables
- Typo assigning depmodd and depmodconfdir.
- Typo exporting a variable called sysctl instead of sysctld.
2022-02-26 09:08:15 +00:00
Lee Duncan
a33a8df43d fix(iscsi): remove unneeded iscsi NOP-disable code
Commit 7374943ae3 ("fix(iscsi): add support for the new iscsiadm
"no-wait" (-W) command") added some code to try to disable iscsi's
NOPs, since they are considered "bad" for an iscsi root disc,
but that code doesn't work because the session is already established
at this point. Open-iscsi will change so that it automatically
disables NOPs for the root disc, so this code can just go away.
2022-02-26 08:13:29 +00:00
Antonio Alvarez Feijoo
d3ab20615e fix(systemd-journald): remove duplicate entry in inst_multiple 2022-02-23 06:21:55 +00:00
Antonio Alvarez Feijoo
28b6adcb27 fix(systemd-timesyncd): add systemd-sysusers dependency
This systemd-timesyncd module depends on systemd-sysusers after the split of
systemd sysuser configs (fec93bb221).
2022-02-23 06:19:34 +00:00
Antonio Alvarez Feijoo
ce82e969f8 fix(systemd-coredump): add systemd-sysusers dependency
The systemd-coredump module depends on systemd-sysusers after the split of
systemd sysuser configs (fec93bb221).
2022-02-23 06:19:34 +00:00
Tao Liu
e2aee2d436 feat(squash): add shell completion for --squash-compressor option
Signed-off-by: Tao Liu <ltao@redhat.com>
2022-02-22 17:32:29 +00:00
Tao Liu
3693bfef2f feat(squash): update the manual page for --squash-compressor
Signed-off-by: Tao Liu <ltao@redhat.com>
2022-02-22 17:32:29 +00:00
Tao Liu
90d9ae8ca8 feat(squash): decouple the compressor for dracut and dracut-squash
Previously dracut-squash module inherits the compressor
name from dracut, but actually the compressors are totally
different. For dracut, the compressor is zstd/gzip/lzop
cmdline tools, for dracut-squash, the compressor is the
libzstd/libz/liblzo libraries integrated by mksquashfs.

However mksquashfs support less compressors than dracut,
such as bzip2, which is not supported by mksquashfs, so
compressor decoupling seems to be a good idea to handle this.

This patch introduces a new dracut cmdline argument
--squash-compressor, by which the compressor and compressor
specific options can be passed to mksquashfs as
--squash-compressor "lzo -Xalgorithm lzo1x_1_15".

Signed-off-by: Tao Liu <ltao@redhat.com>
2022-02-22 17:32:29 +00:00
Harald Hoyer
631d5f72a2 docs: update NEWS.md and AUTHORS
Signed-off-by: Harald Hoyer <harald@profian.com>
2022-02-18 12:32:53 +01:00
David Disseldorp
acc629abb0 fix(cpio): correct dev_t -> rmajor/rminor mapping
dev_t -> major/minor number mapping is more complicated than the
incorrect major=(dev_t >> 8) minor=(dev_t & 0xff) mapping that we
currently perform. Fix mapping to match Linux / glibc behaviour.

Fixes: https://github.com/dracutdevs/dracut/issues/1695
Reported-by: Ethan Wu <ethanwu10@gmail.com>
Signed-off-by: David Disseldorp <ddiss@suse.de>
2022-02-17 19:28:33 +00:00
David Disseldorp
8bd7ddf819 ci(cpio): add test_archive_dev_maj_min
This tests dracut-cpio's handling of rmajor / rminor values compared to
GNU cpio. The test requires root, due to mknod invocation for block
device node creation.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2022-02-17 19:28:33 +00:00
David Disseldorp
80e70f76d9 ci(cpio): add TempWorkDir.create_tmp_mknod helper
This will be used for future device major/minor testing. Convert the
current fifo test to use it.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2022-02-17 19:28:33 +00:00
Thomas Blume
5de6e4d56e fix(dasd_rules): correct udev dasd rules parsing 2022-02-12 08:19:07 +00:00
Thomas Blume
5925266832 fix(zfcp_rules): correct udev zfcp rules parsing 2022-02-12 08:19:07 +00:00
Jóhann B. Guðmundsson
dcaff88ac9 feat(pcsc): introducing the pcsc module 2022-02-08 04:36:00 +00:00
Antonio Alvarez Feijoo
d03fb675d8 fix(bluetooth): make hostonly configuration files optional
Do not fail if any of the expected configuration files don't exist.
2022-02-05 19:52:26 +00:00
Jóhann B. Guðmundsson
34b1dd2e26 fix(bluetooth): dbus configuration path fixes
Add a missing /usr/share path ( fixes #1627 )
Use variable instead of hard path
2022-02-05 19:49:16 +00:00
Henrik Gombos
51ce8893d9 fix(img-lib): install rmdir
rmdir is used in img-lib module.
2022-02-05 13:02:23 +00:00
Jóhann B. Guðmundsson
4753738b62 fix(fido2): add a missing library 2022-02-05 11:49:40 +00:00
Jóhann B. Guðmundsson
c656b612b1 fix(tpm2-tss): add a missing library 2022-02-05 11:49:40 +00:00
Martin Wilck
d754e1c6f0 fix(dracut-functions.sh): ip route parsing
The code for determining local interface and address works
only for peers that are reachable in a single hop.

This is parsed correctly:
192.168.110.1 dev br0 src 192.168.110.160 uid 0 \    cache

But this isn't:
192.168.1.4 via 192.168.110.1 dev br0 src 192.168.110.160 uid 0 \    cache

Fix it.

Fixes: ceca74cc ("dracut-functions: add ip_params_for_remote_addr() helper")
2022-02-04 18:35:33 +00:00
Antonio Alvarez Feijoo
9371dcaba3 fix(fedora.conf.example): rename misspelled variable
There is a typo in the dbussystemconfdir variable.
2022-02-04 13:27:31 +01:00
Renaud Métrich
22a80629b4 fix(dracut): be more robust when using 'set -u'
From bash manpage, FUNCNAME exists only inside functions. When in debug
mode, make sure to use an empty default value as FUNCNAME[0] when
outside of functions.

With bash4 this wasn't an issue, but is with bash5 with hardening option
'set -u' used, as shown in the example below:

Incorrect:

$ bash -u -c 'echo -n ${FUNCNAME[0]}'
bash: line 1: FUNCNAME[0]: unbound variable
$

Correct:

$ bash -u -c 'echo -n ${FUNCNAME[0]-}'
$

This hardening enables sourcing dracut-lib.sh from external utilities
executing in the initramfs such as clevis-luks-askpass, which uses
hardening option 'set -u' internally.
(see Clevis PR https://github.com/latchset/clevis/pull/340)

Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
2022-02-04 12:24:22 +00:00
Jóhann B. Guðmundsson
c5907f82d8 feat(pkcs11): include the module in the spec file
Adding the module to the spec file
2022-02-02 23:14:00 +00:00
Jóhann B. Guðmundsson
83ea8cf001 feat(pkcs11): introducing the pkcs11 module
This module allows unlocking of an encrypted filesystem using pkcs11.
2022-02-02 23:14:00 +00:00
Jóhann B. Guðmundsson
56f4fb6cb7 feat(crypt): check if pkcs11 module is needed in hostonly mode
In hostonly mode, include the pkcs11 module if any encrypted volumes
are configured to be decrypted using pkcs11.
2022-02-02 23:14:00 +00:00
Antonio Alvarez Feijoo
857b17f090 fix(fips): missing sourcing of dracut-lib
Make sure dracut-lib is sourced inside the fips-noboot script.
2022-02-02 23:02:03 +00:00
Antonio Alvarez Feijoo
e8121bfddd fix(fips): add and remove local variables 2022-02-02 23:02:03 +00:00
Antonio Alvarez Feijoo
7f10c483b6 fix(fips): wrong error message
When /dev/urandom cannot be created, the error message displays /dev/random instead.
2022-02-02 23:02:03 +00:00
Lubomir Rintel
bc4f196f98 fix(dracut-init): unbreak a comment
A dreadful copy & paste or kill-ring-save & yank error, most surely.
2022-02-02 23:00:48 +00:00
Kairui Song
67fc670a88 feat(dracut.sh): add --aggresive-strip option
Dracut currently calls `eu-strip` or `strip` with -g, which only strips
out .debug_* sections. symtab and strtab are kept, but are not required
for runtime, and people will rarely need to do binary level debugging
work in initramfs.

So introduce a --aggresive-strip options, try strip out all sections
that are not required for runtime. This can help reduce the binary size
by a lot.

For example, the size of libc.so is reduced by a lot when stripped
with no option than with -g.

    3014184 libc-2.28.orig.so
    2970920 libc-2.28.strip-g.so
    1460904 libc-2.28.strip.so

Signed-off-by: Kairui Song <kasong@tencent.com>
2022-02-02 22:59:27 +00:00
Antonio Alvarez Feijoo
22e683077a fix(network): wrong test of wicked unit
The test for the wicked service is never met because it
does not have execute permission.
2022-02-02 22:56:23 +00:00
Antonio Alvarez Feijoo
e86397de24 fix(dracut-initramfs-restore.sh): add missing compression options
The unpack fails if the initrd is not compressed or compressed with
bzip2 or LZO.

Fix issue #1463
2022-02-02 22:55:49 +00:00
Renaud Métrich
7ab1d00227 fix(dracut-shutdown): add cleanup handler on failure
It may happen that dracut-shutdown.service fails, for example on timeout
due to very low bandwidth.
In such case, for hardening purposes, a new dracut-shutdown-onfailure.service
unit doing dracut-shutdown.service cleanup needs to execute to make sure
switching root to an incomplete initramfs won't occur later.

See also RHBZ #1924587 (https://bugzilla.redhat.com/show_bug.cgi?id=1924587).
2022-02-02 22:53:31 +00:00
Thomas Blume
d40c49a8df fix(zfcp_rules): remove collect based udev rule creators
The collect binary has been removed, so the rules are broken
2022-02-02 22:52:19 +00:00
Thomas Blume
ebafbd8241 fix(dasd_rules): remove collect based udev rule creators
The collect binary has been removed, so the rules are broken
2022-02-02 22:52:19 +00:00
Kairui Song
35822f3997 fix(memstrack): drop bash runtime requirement
Use nohup instead of disown, and let systemd track the service properly.
This makes the scripts POSIX compatible and bash is no longer needed.

Signed-off-by: Kairui Song <kasong@tencent.com>
2022-02-02 22:51:54 +00:00
Dirk Müller
b3d2dcb71e fix(kernel-modules-extra): handle zstd module extension
The regular expression here is trying to handle various kernel
module compression schemas and was missing the zst extension
which indicates use of zstd.
2022-02-02 22:50:41 +00:00
Adrien Thierry
0e80ff72e0 fix(kernel-modules): add mailbox drivers for arm
Mailbox drivers might be needed by some of the devices used in the
initrd. For example, on the Raspberry Pi 4, the MMC 'sdhci-iproc' driver
depends on 'bcm2835-mailbox'.

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2022-02-02 22:48:59 +00:00
David Teigland
164e5ebb11 fix(lvm): restore setting LVM_MD_PV_ACTIVATED
The 69-dm-lvm-metad.rules udev rule has been removed from
the initrd, because it's been dropped by recent upstream
lvm versions, and it never performed any primary function
within the initrd.  But, it did have the job of setting
LVM_MD_PV_ACTIVATED=1 for active md devices used by PVs.
That step needs to be restored, and is now included in
64-lvm.rules.
2022-02-02 22:48:13 +00:00
David Teigland
1af4674319 feat(lvm): only run lvchange for LV that is seen on devices
Change the command listing LVs from lvscan to lvs, and list
only the LV names that are being activated.  Before attempting
to activate an LV, check that that LV name appears in the
lvs command output.  This avoids wasting time running an
lvchange command that we know will fail.
2022-02-02 22:48:13 +00:00
David Teigland
7ffc5e388b feat(lvm): use generated filter when none is set
Previously, the lvm device filter generated by dracut
would not be used if any lvm.conf file existed in the
initrd.  Change this so that the generated filter will
be used when the included lvm.conf has no filter set.
2022-02-02 22:48:13 +00:00
David Teigland
c0a54f2993 feat(lvm): update lvm command options
Drop checking for options that have been available for
at least ten years.  This simplifies code maintenance.

Add the new --nohints option (when available) to disable
the use of hints which is not useful during startup.
2022-02-02 22:48:13 +00:00
David Teigland
97543cca48 fix(lvm): replace --partial option
The --partial option will activate a linear (or other) LV
without segments for missing devices, which is unlikely to
be useful. The intention was to activate raid LVs in a useful
form while missing devices, which is specified with the option
--activationmode degraded.
2022-02-02 22:48:13 +00:00
David Teigland
50e7466843 revert(lvm): remove 69-dm-lvm-metad.rules
This udev rule runs pvscan to autoactivate VGs, which dracut
does not want to do, and previously disabled by editing the
rule file and commenting out lines.

This also stops /dev/disk/by-id/lvm-pv-uuid-* symlinks from
being created in the initrd.
2022-02-02 22:48:13 +00:00
David Teigland
f6f393f550 revert(lvm): remove lvmetad config changes
Remove support for modifying use_lvmetad and locking_type
settings in lvm.conf for lvm versions 2.2.*.  Recent lvm
versions (2.3.*) do not include lvmetad or locking_type.
This cleanup simplifies code maintenance.

To use the lvm module with older versions (2.2), a user
would need to ensure that lvmetad settings are disabled
in the initrd's lvm.conf rather than relying on the lvm
dracut mode to modify their lvm.conf.
2022-02-02 22:48:13 +00:00
David Teigland
1549d5e898 revert(lvm): remove snapshot feature
The feature of managing lvm snapshots has no known
recent usage.  It is unknown if it works.  The lvm
developers do not wish to maintain or support it.
2022-02-02 22:48:13 +00:00
Martin Wilck
4318533e14 fix(multipath): check if mpathconf is available
Not all distributions utilize and ship the mpathconf utilitiy.
Avoid error messages and systemd complaints about
multipathd-configure.service in this case.
2022-02-02 22:47:25 +00:00
Martin Wilck
6246da400f fix(multipathd.service): drop dependencies on iscsi and iscsid
These dependencies are redundant and will be dropped in upstream
multipath-tools, too.
2022-02-02 22:47:25 +00:00
Martin Wilck
a247d2bc0d fix(multipathd.service): adapt to upstream multipath-tools unit file
In the long run, it's desirable to be able to drop dracut's copy of
multipathd.service and use the upstream one from multipath-tools instead.
This patch makes a step in that direction.

With these changes, the only remaining difference is the support for
rd.multipath=0 and rd_NO_MULTIPATH, which must obviously be ignored in the
upstream unit.

The modifications in this patch are minor and will have no effect in the
initramfs.
2022-02-02 22:47:25 +00:00
Martin Wilck
371b338a5f fix(multipathd.service): remove dependency on systemd-udev-settle
The dependency of multipathd on "udev settle" has recently been removed in
c9689b6 ("multipathd: Remove dependency on systemd-udev-settle.service").

But this dependency has never been necessary in the initramfs environment. It
was only required after switching root, because multipathd would potentially
tear down valid multipath maps after switching from initrd to root FS. This can
happen because dm devices "survive" the root FS switch in the udev data
base (they have the "db_persist" flag set), whereas their component devices
(SCSI etc) do not. But this can only happen after initrd-udevadm-cleanup-db.service
has been run, which happens after initrd processing.

The only dependency that's really needed is that on
systemd-udevd-kernel.socket, because multipathd depends on uevents for
devices being delivered via systemd-udevd.
2022-02-02 22:47:25 +00:00
Martin Wilck
3f2c76bb14 fix(40network): consistent use of "$gw" for gateway
Replace wrong use of $gateway with $gw.

Signed-off-by: Martin Wilck <mwilck@suse.com>
2022-02-02 22:40:07 +00:00
Tony Asleson
fe8df0240a feat(spec): add systemd-integritysetup module
Signed-off-by: Tony Asleson <tasleson@redhat.com>
2022-01-14 14:17:18 +00:00
Tony Asleson
33cf47a608 feat(systemd-integritysetup): introducing the systemd-integritysetup module
Module to allow root FS to be a dm-integrity volume.  Utilizes
functionality added with: https://github.com/systemd/systemd/pull/20902

Information on dm-integrity:
https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/dm-integrity.html

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2022-01-14 14:17:18 +00:00
joshuacov1
4e85874108 fix(base): do not change the provided UUID
During boot dracut parses the provided UUID to lower case and thus starts an
endless loop wating for the devise to appear. The device is actually mapped
correctly by the kernel (which doesn't tweak the UUID) but because we are
waiting for a name with lower charachters the expeted device never appers which
drops us at the emergency shell leaving the system unbootable.
This happens especially on nfts/fat filesystems because technically those don't
have a UUID but searial numbers which are used by the linux tools as UUID.
2022-01-09 18:23:11 +00:00
Laszlo Gombos
813577e2ba fix(dmsquash-live): option to use overlayfs on a block device root
An example kernel command line option for this configuration
root=/dev/sda1 ro rd.live.image rd.live.overlay.overlayfs=1

The change checks if $FSIMG is empty and adds a symlink from
/run/rootfsbase to /run/initramfs/live and changes the place
of the creation of the required mount point directories.
2021-12-11 11:05:02 -05:00
Antonio Alvarez Feijoo
7de9ffc057 fix(dracut.sh): do not ignore invalid config file or dir path
Fix issue #1136
2021-12-11 15:58:50 +00:00
Jóhann B. Guðmundsson
3d8e1ad2ae fix(dracut-initramfs-restore.sh): add missing default paths
Adding missing default paths.
Fixes #1628
2021-12-11 10:58:18 -05:00
Antonio Alvarez Feijoo
d3b5bc17eb fix(network-wicked): multiple path corrections
Since wicked-0.6.67, its dbus configuration files can be installed in /etc or /usr/share.

Also, check if it's using libexec or lib instead of displaying always an error.
2021-12-11 14:32:49 +00:00
David Disseldorp
0af11c5ea5 fix(cpio): write zeros instead of seek for padding and alignment
This is a workaround for GRUB2's Btrfs implementation, which doesn't
correctly handle gaps between extents.

A fix has already been proposed upstream via
https://lists.gnu.org/archive/html/grub-devel/2021-10/msg00206.html

Given that this bug is severe, it makes sense to include this minimal
workaround.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-12-10 08:06:40 -05:00
Laszlo Gombos
3326e4c957 fix(rootfs-block): make the base module dependency explicit
When dracut.sh is called with "--modules rootfs-block",
make sure dracut-lib.sh is installed by making the base module an
explicit dependency.
2021-12-10 08:01:02 -05:00
Cornelius Hoffmann
fec93bb221 fix(systemd-sysusers): use split systemd sysuser configs
Fixes the regression introduced by https://github.com/systemd/systemd/pull/20056
As discussed in #1656 and #1657
2021-12-10 12:59:09 +00:00
Cornelius Hoffmann
dcbe23c14d fix(systemd-sysusers): override systemd-sysusers.service
Fixes a regression with systemd not running units with ConditionNeedsUpdate set in initrds
2021-12-10 12:58:35 +00:00
Antonio Alvarez Feijoo
e3bb1815bb fix(url-lib): improve ca-bundle detection
The current detection routine for openssl-based libcurl assumes that
libcurl has its own hardcoded path to the ca-bundle. Fix the
cases where curl is compiled with:

  --with-ca-fallback --without-ca-path --without-ca-bundle

In this case, we must also grep in OpenSSLs libcrypto.

Other changes:
  - Filter reported but non-existant paths.
  - Strip nul bytes returned by grep.
  - Consider that ca-bundles might use '.pem' instead of '.crt'.

Original-patch-by: Daniel Molkentin <daniel.molkentin@suse.com>
2021-12-10 12:56:14 +00:00
Glenn Morris
d9c3c77437 fix(network-manager): skip non-directories in /sys/class/net
There can be files in this directory, eg "bonding_masters" if a
network bond is in use.
2021-12-10 12:54:32 +00:00
Hans de Goede
14d97a6a28 fix(drm): add privacy screen modules to the initrd
Starting with kernel 5.17 the kernel supports the builtin privacy screens
built into the LCD panel of some new laptop models.

This means that the drm drivers will now return -EPROBE_DEFER from their
probe() method on models with a builtin privacy screen when the privacy
screen provider driver has not been loaded yet.

Make dracut add the privacy screen providing drivers to the initrd
(when necessary for hostmode=yes), so that drm drivers on affected
drivers can probe() successfully.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-12-10 12:40:17 +00:00
Martin Wilck
475497b1bd fix(dracut.sh): check kernel zstd support early
Rather than checking late and falling back to "cat" if the kernel
doesn't support zstd decompression, do this early, and use the
fallback code path.
2021-11-26 17:01:45 +00:00
Martin Wilck
bdac657bf6 fix(dracut.sh): check availability of configured compression
If the configured compression command is unavailable, reset $compress,
and fall back to auto-detection. This allows building an initramfs
even if the configured compression command is not installed. This can
happen e.g. if the distribution uses a preconfigured default, but the
user deinstalled the respective tool.
2021-11-26 17:01:45 +00:00
Martin Wilck
06d47ded67 fix(dracut.sh): inform user about auto-selected compression method
If the compression method is unset, or had to be reset because of
missing dependencies, inform the user what's being used. Also,
replace the printf in the "cat" case with a dwarn.
2021-11-26 17:01:45 +00:00
Martin Wilck
586d3e7664 fix(dracut.sh): drop pointless check for module compression method
There's no need to decompress the kernel modules in dracut, and
"$kcompress" is never referenced. dracut can build the initramfs
just fine if there's no tool for decompressing modules.
2021-11-26 17:01:45 +00:00
Pavel Valena
7938935267 fix(network): add errors and warnings when network interface does not exist
End with error, or show a warning when nonexistent device is specified for network setup like
`ip=10.12.8.12::10.12.255.254:255.255.0.0:xk12:eth0:off`.

I've added the error only for `write-ifcfg.sh`, as I think no such setup should be written.

Resolves: #1712424
2021-11-25 08:58:37 +00:00
Jóhann B. Guðmundsson
5b18b06c7d ci: remove Fedora 33 container
Fedora 33 is scheduled to reach end-of-life (EOL) on 2021-11-30.
No new dracut releases should be ending up in that Fedora release at this point.
2021-11-25 09:23:58 +01:00
José María Fernández
c459373448 fix(resume): resume using /usr/lib64/suspend
Now resume binary is detected in case it is at
/usr/lib64/suspend (like it happens in Gentoo).
2021-11-24 12:17:27 +00:00
José María Fernández
e8c18c9f7f fix(base): add default device choice
when the device is no one of the previous patterns,
substitute the empty default by the input,
to return the same input
2021-11-24 12:17:27 +00:00
Antonio Alvarez Feijoo
d5fd030cc2 feat(crypt): check if fido2 module is needed in hostonly mode
In hostonly mode, include the fido2 module if any encrypted volumes
are configured to be decrypted using a FIDO2 security token.
2021-11-24 12:15:42 +00:00
Antonio Alvarez Feijoo
dc3b976f33 fix(dracut-functions.sh): get block device driver if in a virtual subsystem
dracut does not install the kernel module of the block device that contains
the root filesystem if the following preconditions are met:
- Running in host-only mode.
- Symlinks of all block devices needed to boot the system pointing to virtual
subsystems.

The get_dev_module function uses "udevadm info -a" to get the corresponding
kernel modules of a /sys/class/*/* or /dev/* device. This function is called
in modules.d/90kernel-modules/module-setup.sh to detect if dracut must install
block device drivers in host-only mode. The symlinks in /sys/dev/block/
usually point to "real" devices in /sys/devices/pci*. But, we have come across
some NVMe systems where the kernel creates the symlinks in /sys/dev/block/
pointing to "virtual" devices instead. In this case, udevadm never finds any
"driver" attributes following up the chain of parent devices.
2021-11-24 11:15:25 +01:00
Alexander Wenzel
d364ce8334 fix(mdraid): allow UUID comparison for more than one UUID
If the system provides more than one UUID, the _MD_UUID var
contains a line break after each UUID. Therefore the strstr
function could not find any UUID, caused by the additional
spaces provided to the function.

Furthermore this could lead to a boot interruption, because
the start of a degraded raid1 won't be executed. So, manual
interaction is necessary.
2021-11-24 11:15:11 +01:00
David Disseldorp
8104bf0e83 ci(TEST-63-DRACUT-CPIO): kernel extraction tests for dracut-cpio
dracut-cpio already carries a bunch of unit tests covering compression
and GNU cpio extraction. The purpose of these tests is to exercise the
dracut.sh --enhanced-cpio code-paths as well as kernel cpio archive
extraction.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
David Disseldorp
afe4a6dbb7 feat(dracut.sh): add "--enhanced-cpio" option for calling dracut-cpio
The new dracut-cpio binary is capable of performing copy-on-write
optimized initramfs archive creation, but due to the rust dependency
isn't built / installed by default.
This change adds a new "--enhanced-cpio" parameter for dracut which
sees dracut-cpio called for archive creation instead of GNU cpio.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
David Disseldorp
51d21c6b37 feat(Makefile): cargo wrapper for dracut-cpio build
If configured with --enable-dracut-cpio, call cargo to build the
dracut-cpio release binary.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
David Disseldorp
a9c6704643 feat(cpio): add newc archive creation utility
dracut-cpio is a minimal cpio archive creation utility written in Rust.
It provides support for a minimal set of features needed to create
performant and space-efficient initramfs archives:
- "newc" archive format only
- reproducible; inode numbers, uid/gid and mtime can be explicitly set
- data segment copy-on-write reflinks
  + using Rust io::copy()'s native copy_file_range() support[1]
  + optional archive data segment alignment for optimal reflink use[2]
- hardlink support
- comprehensive tests asserting GNU cpio binary output compatibility

1. Rust io::copy() copy_file_range()
   https://github.com/rust-lang/rust/pull/75272

2. Data segment alignment
   We're bending the newc spec a bit to inject zeros after the file path
   to provide data segment alignment. These zeros are accounted for in
   the namesize, but some applications may only expect a single
   zero-terminator (and 4 byte alignment). GNU cpio and Linux initramfs
   handle this fine as long as PATH_MAX isn't exceeded.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
David Disseldorp
94fc50262f feat(cpio): add rust argument parsing library from crosvm
Crosvm's rust argument library is very small and simple, while still
providing helpful functionality. It will be consumed by dracut-cpio in a
subsequent commit.

The unmodified, BSD licensed argument.rs source is lifted as-is from
https://chromium.googlesource.com/chromiumos/platform/crosvm
(release-R92-13982.B b6ae6517aeef9ae1e3a39c55b52f9ac6de8edb31).
The one-line crosvm.rs wrapper is needed to ensure that crosvm::argument
imports continue to work.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
David Disseldorp
3a0f423309 ci(TEST-62-SKIPCPIO): add simple skipcpio test
Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
David Disseldorp
86bba3d4d4 ci(test): export basedir and testdir as absolute paths
Individual test scripts may change working directory, so relative paths
should be avoided.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
David Disseldorp
1c3f79fb0a ci(TEST-60-BONDBRIDGEVLANIFCFG): use toplevel Makefile
Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-11-24 11:14:54 +01:00
Brandon Sloane
5789abcbe0 fix(fips.sh): repsect rd.fips.skipkernel
Support for this flag was broken in 4257798f8a
2021-11-24 11:14:39 +01:00
Dan Horák
0b97790626 fix(resume): check for presence of /sys/power/resume
On platforms where the kernel is built without suspend/resume support we
see "cat: /sys/power/resume: No such file or directory" message when
creating an initrd image. Check for the presence of /sys/power/resume
first before reading it.

Signed-off-by: Dan Horák <dan@danny.cz>
2021-11-24 09:56:27 +00:00
Alexander Wenzel
4855242ce5 fix(man): default value of rd.retry was increased to 180 seconds
The man page still states the old value of 30 seconds,
which does not reflect the current situation of 180 seconds.
2021-11-24 09:55:51 +00:00
Antonio Alvarez Feijoo
049973b708 feat(fido2): introducing the fido2 module
This module allows to unlock an encrypted filesystem using a FIDO2
security token.
2021-11-24 09:54:44 +00:00
Antonio Alvarez Feijoo
5d990a004b feat(crypt): check if tpm2-tss module is needed in hostonly mode
In hostonly mode, include the tpm2-tss module if any encrypted volumes
are configured to be decrypted using the TPM2 device.
2021-11-24 06:49:39 +00:00
Laszlo Gombos
bf8738d31c fix(dmsquash-live): do not install systemd files when systemd is not enabled
Systemd is an optional module for the dmsquash-live module. This scenario
is properly handled for other modules (for example livenet module) but not
for dmsquash-live module.
2021-11-23 05:53:33 +00:00
Thomas Blume
f905c3a72c fix(s390_rules): drop collect installation
/usr/lib/udev/collect has been removed from udev-v246, so remove it
from the initrd too
2021-11-22 18:09:55 +00:00
Laszlo Gombos
75ad269931 fix(dmsquash-live-ntfs): fuse3 no longer requires ulockmgr_server
fuse3 no longer includes ulockmgr_server.
https://github.com/libfuse/libfuse/blob/master/ChangeLog.rst#libfuse-300-2016-12-08
2021-11-22 09:40:05 +00:00
Renaud Métrich
b9ba3c8bb8 fix(shutdown): be robust against forced shutdown
When a forced shutdown is issued through sending a burst of Ctrl-Alt-Del
keys, systemd sends SIGTERM to all processes. This ends up killing
dracut-initramfs-restore as well, preventing the script from detecting
that the unpack of the initramfs is incomplete, which later causes a
crash to happen when "shutdown" tries to execute from the unpacked
initramfs.

This fix makes sure dracut-initramfs-restore remains alive to detect
the unpack failed (because cpio was killed by systemd too).

Refs:
 * https://bugzilla.redhat.com/show_bug.cgi?id=2023665
2021-11-16 18:29:32 +00:00
Frantisek Sumsal
3f56d481e8 test: don't use -cpu max in GH Actions
There appears to be an issue with newer QEMU versions (spotted with Arch
Linux and C9S containers) which causes the respective GH Action to hang
when booting a QEMU VM in combination with the `-cpu max` parameter.

During (a particularly painful) debugging session I once managed to get
some output from such "frozen" machine (using `earlycon` and
`earlyprintk` kernel cmdline options), and in that particular case the
VM died with a trap caused by an invalid opcode.

I couldn't reproduce this locally, only in GH Actions environment with
Arch Linux and C9S containers. Also, so far I haven't found out which
specific CPUID flag causes this, but using the `IvyBridge-v2` feature
set seems to mitigate the issue.
2021-11-15 11:37:22 +00:00
Andrey Sokolov
5c2f72f152 fix(install): segfault on popen error 2021-11-09 07:01:25 +00:00
Peter Robinson
1539845868 fix(90kernel-modules): add isp1760 USB controller
Like the dwc/chipidea controllers the isp1760 can act in either
host or gadget mode so it ends up in it's own directory. Add this
driver into the initrd as it's part of some arm platforms and
is needed to be able to boot off USB storage.

Fixes issue #1619

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2021-10-28 08:52:03 +02:00
Beniamino Galvani
f6e6be245d fix(network-manager): disable tty output if the console is not usable
The network-manager module also writes logs to the console, so that it's easier
to debug network-related boot issues. If systemd can't open the console, the
service fails and network doesn't get configured.

Add a check to disable tty output when the console is not present or not
usable.

https://github.com/coreos/fedora-coreos-tracker/issues/943
2021-10-21 13:38:41 +00:00
Beniamino Galvani
e07b7ad0e7 fix(network-manager): show output on console only with rd.debug enabled
The module should show the output on console only when initrd debugging is
enabled.
2021-10-21 13:38:41 +00:00
Harald Hoyer
51c06d9fea chore: change my email address
Signed-off-by: Harald Hoyer <harald@profian.com>
2021-10-13 09:07:39 +02:00
Renaud Métrich
d502d2a816 feat(systemd): enable support for systemd compiled with ASAN
When systemd is compiled with ASAN library to troubleshoot memory issues
within systemd code, the libasan library expects to have /proc be
available as soon as systemd starts, which isn't the case currently,
causing an assertion to fail, systemd to crash and kernel to panic:

==1==AddressSanitizer CHECK failed: ../../../../libsanitizer/sanitizer_common/sanitizer_procmaps_common.cc:75 "((data_.proc_self_maps.len)) > ((0))" (0x0, 0x0)
    <empty stack>

X.XXXXXXX Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[...]
2021-10-12 18:52:06 +02:00
David Disseldorp
96f3177c33 refactor(install): use check_hashmap helper consistently
Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-10-12 13:39:17 +00:00
Peter Robinson
a1287c627f fix(90kernel-modules): add Type-C USB drivers for generic initrd
We need to pull in Type-C USB drivers as they can provide a number of
differnet bits of functionality in early boot including input, display
(altmode DP) and storage so we need to have them available to ensure
functionality attached to those buses/interfaces are available in early
boot.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2021-10-12 13:29:27 +00:00
Laszlo Gombos
e19e38904c fix(dmsquash-live): iso-scan requires rmdir 2021-10-12 13:29:03 +00:00
Harald Hoyer
0c631efb10 fix(dmsquash-live): correct regression introduced with shellcheck changes
`"$opt"` with empty `opt` will give errors for `losetup`.

https://github.com/dracutdevs/dracut/issues/1576

Rename the variable and set the arguments dynamically, if the variable
is set.
2021-10-06 18:08:01 +02:00
David Disseldorp
5c5b73c681 chore(.gitignore): update src and man paths
.gitignore wasn't updated when things were shuffled under src and man
subdirectories.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2021-10-02 06:57:28 +00:00
Luca BRUNO
9491e59928 fix(multipath): drop ExecStop= setting from service unit
This removes the 'ExecStop=' field from `multipathd.service`.
Sometimes CI runs do encounter a failure related to this
service in initrd, which seems to be stemming from a socket
I/O race between the client and the server on shutdown.
It looks like the client (`multipathd shutdown`) can lose the race,
hit an I/O error, and cause the whole unit to fail (even if the server
managed to shutdown properly already).

Notably, the upstream unit does not have such stop command
as the daemon can already perform a graceful exit through
its signal handler.

As such, this commit partially re-aligns the two units,
trying to sidestep any of the existing races.

Refs:
 * https://github.com/coreos/fedora-coreos-tracker/issues/803
 * https://github.com/opensvc/multipath-tools/blob/0.8.7/multipathd/multipathd.service
2021-09-23 09:45:27 +00:00
David Tardon
10ed204f87 fix(install): extend hwcaps library handling to libraries under glibc-hwcaps/ 2021-09-13 12:26:14 +00:00
Antonio Alvarez Feijoo
591118c56d feat(dracut.sh): check if target kernel has zstd support compiled in
If compression option is zstd, check if target kernel supports it.
Otherwise, do not compress the initramfs image.
2021-09-11 06:44:40 +00:00
Antonio Alvarez Feijoo
768dd59ef0 ci(suse.conf.example): change default compression option for SUSE
Due to an internal company decision, SUSE aims to change the default compression
method of the initramfs image to zstd.
2021-09-11 06:44:40 +00:00
Antonio Alvarez Feijoo
acfd97a943 fix(dracut.sh): change misspelled variable name 2021-09-09 10:14:27 +00:00
Antonio Alvarez Feijoo
f1245b5bc1 fix(dracut.sh): remove wrong $ in loop sequence 2021-09-09 06:43:02 +00:00
Shreenidhi Shedi
3fb8723ce0 fix(skipcpio): calculate and use CPIO_MAGIC_LEN
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2021-08-27 17:25:35 +00:00
Shreenidhi Shedi
f6d16b6bbd fix(skipcpio): improve error checking
Some other minor tweaks

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2021-08-27 17:25:35 +00:00
Andre Russ
dfbfd33b24 fix(base): tr needs to be installed 2021-08-25 23:58:12 +00:00
Andre Russ
a93fbc4ae0 fix(crypt-gpg): tr needs to be installed 2021-08-25 23:58:12 +00:00
Charles Rose
655c65e6ce fix(nvmf): validate_ip_conn
Fix how ifname for a given local_address is found.
Fix logic to detect presence of ifname and route.

Signed-off-by: Charles Rose <charles.rose@dell.com>
2021-08-23 20:20:11 +00:00
Alexander Tsoy
4afdcba212 fix(usrmount): do not empty _dev variable
Currently $_dev is always overridden with the value returned by
label_uuid_to_dev(). This results in an empty value if $_dev is a
device path. Fix this by calling label_uuid_to_dev() conditionally.

Bug: https://bugs.gentoo.org/807971
Fixes: d3532978de
2021-08-17 07:48:15 +00:00
Thomas Blume
7374943ae3 fix(iscsi): add support for the new iscsiadm "no-wait" (-W) command
remove connection timeout for iscsi firmware targets serving system root
2021-08-17 07:47:20 +00:00
Pingfan Liu
c86f4d2860 fix(kernel-modules): detect block device's hardware driver
On hostonly mode, the platform driver is not copied blindless. There
should be a way to detect the real hardware driver, which probes a block
device.

/sys/dev/block/major:minor is a symbol link, which points to the real
device, recording the hardware stack. And those info can help to
identify the associated drivers for the hardware stack.

Signed-off-by: Pingfan Liu <piliu@redhat.com>
---
v2 -> v3:
  address shellcheck in dracut-functions.sh
v1 -> v2:
  remove local variable _extra_mod
  shorten subject
2021-08-13 11:36:25 +00:00
Lukas Nykryn
b292ce7295 fix(kernel-modules): add blk_mq_alloc_disk and blk_cleanup_disk to blockfuncs
Since kernel 5-14 those are used by many drivers for example:
xen-blkfront, loop, nbd, pd
2021-08-13 11:27:15 +00:00
Beniamino Galvani
38320fce56 fix(network-manager): write DHCP filename option to dhcpopts file
Anaconda parses the 'filename' variable [1] set in /tmp/net.$netif.dhcpopts to
determine the name of the kickstart file to use.

[1] https://github.com/rhinstaller/anaconda/blob/anaconda-35.21-1/dracut/fetch-kickstart-net.sh#L31-L34
2021-08-10 15:16:48 +00:00
Shreenidhi Shedi
55468a2d40 fix(install): use size_t to avoid -Wsign-compare warning
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2021-08-09 17:11:22 +00:00
Shreenidhi Shedi
ef0f848a67 fix(install): improve gettid definition
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2021-08-09 17:11:22 +00:00
Shreenidhi Shedi
19537f8943 fix(install): validate return values log.c
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2021-08-09 17:11:22 +00:00
Shreenidhi Shedi
b5cf7ec784 fix(install): rectify unused function args in log.c
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2021-08-09 17:11:22 +00:00
Shreenidhi Shedi
e2a61595d2 fix(install): use wrapper for asprintf
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2021-08-09 17:11:22 +00:00
Kairui Song
5ab18dee99 fix(squash): apply FIPS and libpthread workaround
There are some workarounds in dracut.sh for FIPS/libpthread covering
some hidden lib dependency issues. These workarounds didn't take effect
for the squash loader since the squash loader is installed
independently. So apply these workarounds again.

Also skip the lib detection code, since these extra installed libs
are small, and squash loader contents are dropped after switch root,
won't be an issue to be always installed. And this makes the code
cleaner.

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-08-09 17:08:52 +00:00
Beniamino Galvani
07977ee5c5 fix(cms): reload NetworkManager connections
When NetworkManager is running as systemd service, it's not enough to write
connection files; the module should also tell NetworkManager to reload the
connections from disk so that any new connection can be auto-activated.

https://bugzilla.redhat.com/show_bug.cgi?id=1975929
2021-08-09 17:07:50 +00:00
Beniamino Galvani
5ee7e249b8 fix(network-manager): check for nm-initrd-generator in both /usr/{libexec,lib}
Sice commit 22d6863ef1 ("fix(network-manager): cope with distributions not
using `libexec`") nm-initrd-generator can be installed in either /usr/libexec
or /usr/lib. Change other modules to check for the binary in both locations.
2021-08-09 17:07:50 +00:00
Shreenidhi Shedi
74a4179948 fix(install): use unsigned int instead of unsigned
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2021-08-07 20:14:03 +00:00
Shreenidhi Shedi
b0bf8187d5 fix(install): reduce cppcheck warnings
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2021-08-07 20:14:03 +00:00
Thomas Haller
e509c638e6 fix(network-manager): ensure safe content of /tmp/dhclient."$ifname".dhcpopts
NetworkManager leaves state files behind in "/run/NetworkManager/devices".
These files are in keyfile format (glib's GKeyFile API [1]).

From the statefile, the dracut module writes a .dhcpopts file. And other users
want to parse that file, for example anaconda ([2]). To be fair,
anaconda seems to parse a different file, so I am a bit confused who
uses this file how. In any case, it seems somebody might be tempted to
execute this as a script.

We need to write the .dhcpopts file in a format that is defined and easy
to handle from a shell script. As already previously, this format is
a bash script that sets certain variables. That means, to load the file,
the user could execute it as bash script. But this is dangerous, as the
file contains potentially untrusted data from the network.
Optimally, users still don't trust the .dhcpopts file to be safe for
executing! It would be better if users too try to parse the file
instead of executing it. That is not trivial however because in face
of special characters, as we use bash's `printf '%q'` to escape the values
and parsing bash escaping is not trivial.

Anyway, make sure we properly quote and handle the content so that also
executing is safe. In the best case, there are no special characters
that require escaping, and naive parsing can be done with `sed`.
Otherwise, executing is now also supposed to be safe.

In this case we parse DHCP options from the state file. They are themselves
backslash escaped UTF-8 strings (C escape sequences), which then are stored
via keyfile API. The properly parse them, we would first need to load the file
with GKeyFile (which undoes one level of backslash escaping) and then
use g_str_compress() (to undo the second level). We mimic that with
shell.

[1] b3411d6780/dracut/fetch-kickstart-net.sh (L30)
[2] https://developer.gnome.org/glib/stable/glib-Key-value-file-parser.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2021-08-07 19:56:07 +00:00
Beniamino Galvani
c868feb1b1 docs: add a note about other network modules in 'man dracut.cmdline' 2021-08-06 15:59:29 +02:00
Stefan Berger
9da76af8e7 fix(integrity): add support for loading multiple EVM x509 certs
Add support for loading EVM x509 certs from a directory that the user can
specify with the EVMKEYSDIR variable in the evm config file. By default
the additional certs are loaded from /etc/keys/evm.

Support for multiple EVM keys allows the usage in a system of files with
signed metadata from multiple parties.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
2021-08-06 13:58:01 +00:00
Mike Gilbert
f649cd10b2 fix(base): do not quote $initargs for switch_root
We want word splitting to occur so that the arguments are passed
separately, and we don't end up passing an empty string if no arguments
are specified.

Bug: https://bugs.gentoo.org/803548
Fixes: 2fabaaa62d
2021-08-06 13:52:19 +00:00
Kairui Song
cbd85597e3 fix(squash): remove tailing '/' when installing ld.so.conf.d
This tailing '/' will result in following error:

dracut-install: ERROR: installing '/etc/ld.so.conf.d/'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.kEFQLs/initramfs -d /etc/ld.so.conf.d/

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-08-06 13:41:23 +00:00
Beniamino Galvani
0e5905315e fix(network-manager): include nm-daemon-helper binary
Since version 1.32, NetworkManager launches a tiny external helper to determine
the hostname via reverse DNS resolution through glibc's nss-dns. Include the
binary.
2021-08-06 13:40:56 +00:00
Zoltán Böszörményi
d7acf107f2 fix(base): repair installing dracut-util
inst_binary uses ${dracutsysrootdir} internally to find the source
file.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
2021-07-23 13:11:17 +00:00
Andreas Schwab
3cc9f1c10c fix(kernel-modules): add more modules on RISC-V
Include the same extra modules for ARM also on RISC-V and add drivers/mmc/host
and drivers/spi to the list.
2021-07-21 15:10:00 +00:00
Zbigniew Jędrzejewski-Szmek
a7f5429cb8 fix(dracut-systemd): do not use Requires for vconsole-setup.service
systemd-vconsole-setup.service may fail if the user specifies a missing keymap,
see [1,2,3], or font. This is unfortunate, but the system should not refuse
boot. It is better to continue, possible without the desired font or keymap.
All other systemd services that depend on systemd-vconsole-setup.service do so
without a hard Requires=.

(In particular, systemd-vconsole-setup internally will try to do as much setup
as possible, and will load the font even if it cannot load the keymap and vice
versa.)

[1] https://fedoraproject.org/wiki/Common_F34_bugs#kbd-legacy-media
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1955162
[3] https://bugzilla.redhat.com/show_bug.cgi?id=1955793
2021-07-20 20:53:19 +02:00
Pingfan Liu
dc21638c3f fix(squash): keep ld cache under initdir
When running kdump on PowerPC, the following bug is hit:
[    0.391629] Freeing unused kernel memory: 5568K
[    0.391634] This architecture does not have kernel memory protection.
/bin/sh: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
[    0.392214] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[    0.392214]
[    0.392223] CPU: 6 PID: 1 Comm: init Not tainted 4.18.0-319.el8.ppc64le #1
[    0.392228] Call Trace:
[    0.392234] [c00000000c703c10] [c000000008ecb94c] dump_stack+0xb0/0xf4 (unreliable)
[    0.392243] [c00000000c703c50] [c000000008167324] panic+0x148/0x3c4
[    0.392249] [c00000000c703cf0] [c000000008170474] do_exit+0xcd4/0xd40
[    0.392255] [c00000000c703dc0] [c0000000081705b0] do_group_exit+0x60/0x110
[    0.392261] [c00000000c703e00] [c000000008170684] sys_exit_group+0x24/0x30
[    0.392268] [c00000000c703e20] [c00000000800b408] system_call+0x5c/0x70

This is due to the non-conventional library path:
ldd /bin/bash
        linux-vdso64.so.1 (0x00007fffbdc90000)
        libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007fffbda80000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fffbda50000)
        libc.so.6 => /lib64/glibc-hwcaps/power9/libc-2.28.so (0x00007fffbd830000)
                            ^^^
        /lib64/ld64.so.2 (0x00007fffbdcb0000)

ldd finds the path by libc.so.6 -> /usr/lib64/libc.so.6 ->
/usr/lib64/glibc-hwcaps/power9/libc-2.28.so and cache the result. So
when dracut_install, it only saw
'/usr/lib64/glibc-hwcaps/power9/libc-2.28.so' and blind to
'/usr/lib64/libc.so.6'

In the final kdumpimg, the symlink /usr/lib64/libc.so.6 is not created,
hence ld.so can not find the /usr/lib64/glibc-hwcaps/power9/libc-2.28.so

On the other hand, during the process of building kdumpimg, all of dynamic library info
have been cached in ld.so.cache. Hence this bug can be simplely resolved
by keeping ld cache under $initdir/etc.

Signed-off-by: Pingfan Liu <piliu@redhat.com>
---
v3 -> v4:
  use inst() instead of copy
v2 -> v3:
  fix format by shfmt -s -w modules.d/99squash/module-setup.sh
v1 -> v2:
  cp -r /etc/ld.so* instead of move, since after switch-root, initdir
can not be seen any longer
2021-07-20 12:41:58 +00:00
Zoltán Böszörményi
1beeaf3b71 fix(dracut-install): tweaks to get_real_file()
Fix potential memory leaks in two locations and use
_exit(EXIT_FAILURE) if asprintf(&abspath, ...) fails.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
2021-07-19 19:39:57 +00:00
Coiby Xu
6c71ba4121 fix(qeth_rules): check the existence of /sys/devices/qeth/*/online beforehand
On s390x KVM machines, the follow errors occurred,
    $ kdumpctl rebuild
    kdump: Rebuilding /boot/initramfs-4.18.0-321.el8.s390xkdump.img
    /usr/lib/dracut/modules.d/95qeth_rules/module-setup.sh: line 13: /sys/devices/qeth/*/online: No such file or directory
    /usr/lib/dracut/modules.d/95qeth_rules/module-setup.sh: line 13: /sys/devices/qeth/*/online: No such file or directory

because s390x KVM uses virtual devices and /sys/devices/qeth/*/online
doesn't exist. Eliminate this error by checking the existence
beforehand.
2021-07-14 12:46:23 +00:00
Dusty Mabe
a0f12fb6a0 fix(network-manager): don't pull in systemd-udev-settle
We get a nice warning about it being deprecated:

```
systemd-udev-settle.service is deprecated. Please fix nm-initrd.service not to pull it in.
```

The service is deprecated because its purpose was to wait for the
discovery of all hardware, but it didn't guarantee that (see the
systemd-udev-settle man page).

NM now runs as an independent service and can deal with devices showing
up at any point, but it does need udev to be started. For now just
Want/After systemd-udev-trigger.
2021-07-01 10:34:37 +02:00
Masahiro Matsuya
ec50cec3bd fix: SC2046: Quote this to prevent word splitting 2021-06-29 22:03:38 +00:00
Masahiro Matsuya
acb18869e9 fix: SC2086: Double quote to prevent globbing and word splitting 2021-06-29 22:03:38 +00:00
Masahiro Matsuya
2f091b1707 fix(url-lib): make pre-pivot hook separetely per nfs mount 2021-06-29 22:03:38 +00:00
Tomasz Paweł Gajc
f806a628aa fix(mksh): requires printf 2021-06-30 00:01:41 +02:00
LinkTed
6610093698 fix(crypt-gpg): execute --card-status on each try
If the gpg card is not inserted before the --card-status command is
executed then the public key is not linked with the card. Therefore,
the LUKS partition cannot be decrypted. To solve this, the
--card--status command is executed on each try.
2021-06-29 22:00:03 +00:00
Kairui Song
c7fbc0c890 fix(dracut.sh): handle symlinks appropriately while using '-i' option
[[ -d $symlink ]] will return true if the symlink points to a directory.
So the symlink will not be copied, instead a directory is created with
the symlink name and the content is copied.

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-06-29 09:53:19 +02:00
Hari Bathini
f1138012c9 fix(dracut.sh): handle '-i' option to include files beginning with '.'
While including a directory using '--include' option, the file and
subdirectory names that begin with '.' are not included. Also, dracut
throws a warning message when a subdirectory is empty or only has
files or subdirectories that begin with '.'.

For example, while trying to include /tmpdata directory with the
below tree:

  # tree -a /tmpdata
  /tmpdata
  ├── .anothertestdir
  ├── testdir
  │   └── .testsubdir
  └── .testfile

dracut throws the below warning message:

  # dracut --include /tmpdata /root
  cp: cannot stat '/tmpdata/testdir/*': No such file or directory
  #

and this is how the included /tmpdata directory tree looks:

  # tree -a root
  root
  └── testdir

No file or directory beginning with '.' is included & also, copying
/tmpdata/testdir reported "No such file or directory" warning. Using
'.' instead of '*' in the below command will fix the warning whether
the directory being copied is empty or only has files or directories
that begin with dot:

  $DRACUT_CP -t "$object_destdir" "$dracutsysrootdir$objectname"/*

Also, enable 'dotglob' temporarily to include files and directories
beginning with a `.' in the results of pathname expansion of source
directory being included.

Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
2021-06-29 09:53:19 +02:00
Dusty Mabe
a97d2cedcf fix(network-manager): support teaming under NM+systemd
Previously when NM was run without dbus then teaming would come
up appropriately [1], but now that dbus exists we also need to
include some supporting infrastructure to allow for it to work
again.

[1] d689380cfc
2021-06-28 11:30:34 +00:00
Kairui Song
a2b6be4479 fix(squash): create relative symlinks
Don't use absolute path, or it may resolve to wrong files after unpack
the initramfs to a sub path on a running system.

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-06-28 11:25:58 +00:00
Jonathan Lebon
78557f05a6 fix(fips): handle s390x OSTree systems
On s390x, the `BOOT_IMAGE` karg injected by the bootloader is not a path
to the kernel image, but rather an integer describing the index of the
menu entry selected. Because of the way the s390x bootloader works,
there is no information retained about e.g. the path of the kernel that
was loaded.

This causes issues for the FIPS code which assumes that `BOOT_IMAGE` is
a path to the kernel image to derive the HMAC path. In non-OSTree
systems, this ends up working anyway, because the kernel is located at
the root of the boot partition.  In OSTree systems, this is not the
case. However, OSTree systems use BLS configs, and they are named in
reverse order of precedence (i.e. menu ordering). So from the
`BOOT_IMAGE` integer, we can figure out which BLS entry was selected.

Add some code to do just this on s390x. This isn't completely foolproof,
because it presumes that (1) BLS configs were used to populate the
bootloader (and that they were exactly in the same state they currently
are when `zipl` was run), and (2) there are no other menu entries
originating from outside the BLS configs. However, if these assumptions
are wrong we would simply fail the boot, which is currently what is
happening anyway.

See also:
https://github.com/openshift/os/pull/546
https://github.com/ibm-s390-linux/s390-tools/issues/78

Tested-by: Muhammad Adeel <muhammad.adeel@ibm.com>
2021-06-28 11:25:20 +00:00
David Tardon
2e3c5444d2 fix(multipath): get config. dir from configuration 2021-06-28 13:21:33 +02:00
Frantisek Sumsal
6a44426162 fix(install): add a missing ret value assignment
Spotted when reconfiguring LGTM for RHEL 9 dracut repo.
2021-06-28 11:20:21 +00:00
Dusty Mabe
a97d6e2b13 fix(network-manager): pull in network.target in nm-initrd.service
Otherwise units with `After=network.target` won't have any effect.
2021-06-28 10:58:10 +00:00
Kairui Song
563f543424 feat(squash): install umount util
Also install umount binary, make it possible to cleanup squash overlay
mounts. This is useful for other tools reusing the dracut initramfs built
with squash module enabled.

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-06-25 21:11:58 +02:00
Matthias Berndt
8b17105bed fix(tpm2-tss): typo in depends()
There is no systemd-udev module, only systemd-udevd
2021-06-22 15:32:28 +02:00
lapseofreason
e0abf88a15 fix(crypt): remove quotes from cryptsetupopts
Fixes #1528.
2021-06-08 19:28:45 +00:00
Harald Hoyer
86bf2533d7 docs: update NEWS.md and AUTHORS 2021-05-27 14:34:19 +02:00
Tomasz Paweł Gajc
12beeac741 fix(fs-lib): install fsck utilities 2021-05-27 09:13:04 +02:00
Stefan Berger
b12d91c431 fix(integrity): require ALLOW_METADATA_WRITES to come from EVM config file
Upcoming versions of EVM will not require the ALLOW_METADATA_WRITES anymore,
therefore we remove it from the script and require it to be set in the EVM
config file variable EVM_ACTIVATION_BITS for those versions that need it.

Patch 9 in this patch set deprecates the EVM_ALLOW_METADATA_WRITES flag:
https://lore.kernel.org/linux-integrity/20210514152753.982958-1-roberto.sassu@huawei.com/

Suggested-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2021-05-26 17:11:07 +02:00
Marcos Mello
5eb24aa21d fix(install): configure logging earlier
There are log_error() and log_debug() calls in parse_argv().
2021-05-26 09:22:09 +02:00
Jóhann B. Guðmundsson
7d205598c6 fix(warpclock): minor cleanups
- Removing shell mode lines
- Remove uncessary file requirements
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-25 14:00:52 +02:00
Jóhann B. Guðmundsson
f4ea5f8734 fix(dash): minor cleanups
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-25 11:59:08 +00:00
Jóhann B. Guðmundsson
6c673298f3 fix(mksh): minor cleanups
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-25 11:58:43 +00:00
Marcos Mello
4cb086fa29 feat(install): add default value for --firmwaredirs
If not specified, use /lib/firmware.
2021-05-25 11:48:59 +02:00
Harald Hoyer
a277a5fc7a fix(dracut-functions): get_maj_min without get_maj_min_cache_file set
If `get_maj_min_cache_file` is unset `get_maj_min()` would error out.

Fix it to work without a cache file set.
2021-05-21 14:17:07 +02:00
Harald Hoyer
0a6007bf4f fix(dracut): pipe hardlink output to dinfo
Otherwise the output is cluttered with:
```
Mode:           real
Files:          1364
Linked:         5 files
Compared:       0 xattrs
Compared:       384 files
Saved:          12.84 KiB
Duration:       0.052674 seconds
```
2021-05-21 14:16:43 +02:00
Marcos Mello
c1ab36139d fix(install): sane default --kerneldir
If --kerneldir is not specified, use /lib/modules/$(uname -r).

Fixes #1505
2021-05-20 23:56:40 +00:00
Jóhann B. Guðmundsson
9355cb8ea5 fix(bash): minor cleanups
- Remove hard coded path to binary
- Add missing license header
- Document sections
- refactor install section
2021-05-19 10:29:34 +00:00
Kairui Song
636d6df313 fix(squash): don't mount the mount points if already mounted
It is possible that user setup some early mount in the rootfs even
earlier, so just be more robust and cover that case too.

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-05-19 08:46:34 +00:00
Harald Hoyer
fa63c9be13 ci: add shfmt to Fedora containers 2021-05-18 11:33:27 +02:00
Harald Hoyer
148e420be5 fix(base): add missing str_replace to dracut-dev-lib.sh
```
dracut-dev-lib.sh: line 92: str_replace: command not found
dracut-dev-lib.sh: line 98: /var/tmp/dracut.sabKZg/initramfs/initqueue/finished/devexists-.sh: No such file or directory
dracut-dev-lib.sh: line 83: /var/tmp/dracut.sabKZg/initramfs/emergency/80-.sh: No such file or directory
```
2021-05-18 11:31:16 +02:00
Harald Hoyer
7275c6f6a0 feat(dracut.sh): detect running in a container
Don't try to `mknod` by setting DRACUT_NO_MKNOD.
Don't try to `cp` extended attributrs by setting DRACUT_NO_XATTR.
2021-05-17 16:23:00 +02:00
Harald Hoyer
c08bc8109d fix(base): split out dracut-dev-lib.sh
To share the `wait_for_dev` function and use it without side effects on
install time, split out the needed functions in an extra library.
2021-05-17 16:22:49 +02:00
Lars Wendler
b9b6f0ee5b fix(dracut-util): print error message with trailing newline
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
2021-05-14 15:48:32 +00:00
Jóhann B. Guðmundsson
f634448b29 fix(packit): downstream has renamed the master branch to main 2021-05-14 15:50:38 +02:00
401 changed files with 9942 additions and 5506 deletions

14
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
version: 2
# Maintain dependencies for GitHub Actions
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "tuesday"
commit-message:
prefix: "chore"
include: "scope"
ignore:
- dependency-name: "Manual test"

17
.github/labeler.yml vendored
View File

@@ -21,9 +21,6 @@ modules:
bash:
- modules.d/00bash/*
bootchart:
- modules.d/00bootchart/*
dash:
- modules.d/00dash/*
@@ -87,9 +84,6 @@ url-lib:
drm:
- modules.d/50drm/*
gensplash:
- modules.d/50gensplash/*
plymouth:
- modules.d/50plymouth/*
@@ -144,6 +138,9 @@ multipath:
nvdimm:
- modules.d/90nvdimm/*
overlayfs:
- modules.d/90overlayfs/*
ppcmac:
- modules.d/90ppcmac/*
@@ -153,9 +150,6 @@ qemu:
qemu-net:
- modules.d/90qemu-net/*
stratis:
- modules.d/90stratis/*
crypt-gpg:
- modules.d/91crypt-gpg/*
@@ -228,6 +222,9 @@ udev-rules:
virtfs:
- modules.d/95virtfs/*
virtiofs:
- modules.d/95virtiofs/*
zfcp:
- modules.d/95zfcp/*
@@ -291,3 +288,5 @@ uefi-lib:
test:
- test/*
- test/**/*
- modules.d/80test*
- modules.d/80test*/*

8
.github/stale.yml vendored
View File

@@ -2,6 +2,8 @@
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Ignore if in a milestone
exemptMilestones: true
# Issues with these labels will never be considered stale
exemptLabels:
- documents
@@ -13,9 +15,9 @@ exemptLabels:
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue is being marked as stale because it has not had any recent activity.
It will be closed if no further activity occurs.
If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days.
This issue is being marked as stale because it has not had any recent activity.
It will be closed if no further activity occurs.
If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days.
Thank you for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

53
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
---
# vi: ts=2 sw=2 et:
# SPDX-License-Identifier: LGPL-2.1-or-later
#
name: "CodeQL"
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ matrix.language }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['cpp', 'python']
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-extended,security-and-quality
- name: Install dependencies
run: |
sudo apt -y update
sudo apt -y install asciidoc gcc libkmod-dev libsystemd-dev pkg-config
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@@ -28,27 +28,27 @@ jobs:
fail-fast: false
matrix:
config:
- { dockerfile: 'Dockerfile-Fedora-33', tag: 'fedora:33' }
- { dockerfile: 'Dockerfile-Fedora-latest', tag: 'fedora:latest' }
- { dockerfile: 'Dockerfile-Fedora-rawhide', tag: 'fedora:rawhide' }
- { dockerfile: 'Dockerfile-OpenSuse-latest', tag: 'opensuse:latest' }
- { dockerfile: 'Dockerfile-Arch', tag: 'arch:latest' }
- { dockerfile: 'Dockerfile-Debian', tag: 'debian:latest' }
- { dockerfile: 'Dockerfile-Gentoo', tag: 'gentoo:latest' }
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# with:
# buildkitd-flags: --debug
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up env
run: echo "repository_owner=${GITHUB_REPOSITORY_OWNER,,}" >>${GITHUB_ENV}
- name: Build and Push Container
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
file: test/container/${{ matrix.config.dockerfile }}
tags: ghcr.io/dracutdevs/${{ matrix.config.tag }}
tags: ghcr.io/${{env.repository_owner}}/${{ matrix.config.tag }}
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}

View File

@@ -4,46 +4,23 @@ on:
pull_request:
branches: [ master ]
jobs:
basic:
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
cancel-in-progress: true
strategy:
matrix:
container: [
"fedora:33",
"fedora:rawhide",
"opensuse:latest",
"arch:latest",
]
test: [
"04",
]
fail-fast: false
container:
image: ghcr.io/dracutdevs/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v2
with:
fetch-depth: 0
env:
DEBUGFAIL: "${{ secrets.ACTIONS_STEP_DEBUG && 'rd.debug' }}"
- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 45
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
cancel-in-progress: true
strategy:
matrix:
container: [
"arch:latest",
"debian:latest",
"fedora:latest",
"opensuse:latest",
]
test: [
"01",
@@ -56,15 +33,10 @@ jobs:
"13",
"14",
"15",
"16",
"17",
"20",
"21",
"30",
"31",
"35",
"36",
"40",
"41",
"18",
"62",
"98",
]
fail-fast: false
@@ -73,7 +45,70 @@ jobs:
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
network:
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}-${{ matrix.network }}
cancel-in-progress: true
strategy:
matrix:
container: [
"fedora:latest",
]
network: [
"network-manager",
"network-legacy",
#"systemd-networkd",
#"connman",
]
test: [
"20",
"30",
"35",
"40",
"60",
# "50", # times out
]
fail-fast: false
container:
image: ghcr.io/dracutdevs/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "${{ matrix.container }} TEST-${{ matrix.test }}"
run: USE_NETWORK=${{ matrix.network }} ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
openrc-musl:
runs-on: ubuntu-latest
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
cancel-in-progress: true
strategy:
matrix:
container: [
"gentoo:latest",
]
test: [
"18",
]
fail-fast: false
container:
image: ghcr.io/dracutdevs/${{ matrix.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v1
with:
fetch-depth: 0

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: install tools
run: sudo apt-get install astyle
@@ -26,10 +26,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: shfmt
uses: luizm/action-sh-checker@v0.2.2
uses: luizm/action-sh-checker@v0.6.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHFMT_OPTS: -s # arguments to shfmt.

37
.github/workflows/manualtest.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Manual test
on:
workflow_dispatch:
inputs:
test:
description: "Array of tests to run, such as [11,12]"
default: "['04']"
required: true
container:
type: choice
description: 'distro'
default: 'fedora'
options:
- "fedora"
- "arch"
- "debian"
- "opensuse"
- "gentoo"
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
matrix:
test: ${{ fromJSON(inputs.test) }}
container:
image: ghcr.io/dracutdevs/${{ inputs.container }}
options: "--privileged -v /dev:/dev"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v1
with:
fetch-depth: 0
- name: "${{ inputs.container }} ${{ matrix.test }}"
run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check-out the repo under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run Commisery
uses: dracutdevs/commisery-action@master

19
.gitignore vendored
View File

@@ -1,11 +1,14 @@
/Makefile.inc
/dracut.8
/dracut-catimages.8
/dracut.conf.5
/man/dracut.8
/man/dracut-catimages.8
/man/dracut.conf.5
/dracut.conf.d/*.conf
/dracut-gencmdline.8
/man/dracut.cmdline.7
/dracut.html
/dracut.kernel.7
/man/dracut.kernel.7
/man/dracut.bootup.7
/man/dracut.modules.7
/man/lsinitrd.1
/dracut.pc
/dracut-install
/modules.d/99base/switch_root
@@ -15,13 +18,13 @@ test*.img
/.buildpath
/.project
/dracut-version.sh
/install/dracut-install
/src/install/dracut-install
/*.rpm
/*.[0-9]
/modules.d/98dracut-systemd/*.service.8
/*.sign
*.o
skipcpio/skipcpio
/util/util
/src/skipcpio/skipcpio
/src/util/util
/dracut-util
.idea/

View File

@@ -1 +1,2 @@
kate: space-indent on; tab-width 4; indent-width 4; replace-tabs on; eol unix;
kate-mimetype(text/x-c): tab-width 8; indent-width 8;

View File

@@ -2,9 +2,10 @@ Philippe Seewer <philippe.seewer@bfh.ch> <philippe.seewer-omB+W0Dpw2o@public.gm
Seewer Philippe <philippe.seewer@bfh.ch> <philippe.seewer@bfh.ch>
Philippe Seewer <philippe.seewer@bfh.ch> <philippe.seewer@bfh.ch>
Victor Lowther <victor.lowther@gmail.com> <victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Harald Hoyer <harald@redhat.com> <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Harald Hoyer <harald@redhat.com> <harald@eeepc.(none)>
Harald Hoyer <harald@redhat.com> <harald@hoyer.xyz>
Harald Hoyer <harald@profian.com> <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Harald Hoyer <harald@profian.com> <harald@eeepc.(none)>
Harald Hoyer <harald@profian.com> <harald@hoyer.xyz>
Harald Hoyer <harald@profian.com> <harald@redhat.com>
Mike Snitzer <snitzer@redhat.com> <msnitzer@redhat.com>
Amerigo Wang <amwang@redhat.com> <xiyou.wangcong@gmail.com>
Andrey Borzenkov <arvidjaar@gmail.com> <arvidjaar@mail.ru>

View File

@@ -1,55 +0,0 @@
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# The name of the upstream package
upstream_package_name: dracut
# The upstream tag versioning scheme
upstream_tag_template: "{version}"
# The URL of the upstream project
upstream_project_url: https://github.com/dracutdevs/dracut
# Relative path to a spec file within the upstream repository
specfile_path: pkgbuild/dracut.spec
# Name of the downstream package
downstream_package_name: dracut
# The URL of the downstream project
dist_git_base_url: https://src.fedoraproject.org/
# Sync file(s) from upstream repo to dist-git
synced_files:
# The dracut spec file is maintained upstream so we sync it downstream.
- dracut.spec
# We sync the packit file downstream be able to optionally use the sync-from-downstream command
- .packit.yaml
# We want new releases to be automatically built on rawhide and have few jobs
# on copr.
create_pr: false
jobs:
- job: propose_downstream
trigger: release
metadata:
dist_git_branches: master
- job: tests
trigger: pull_request
metadata:
targets:
- fedora-rawhide
- job: copr_build
trigger: pull_request
metadata:
targets:
- fedora-development
- job: copr_build
trigger: commit
metadata:
targets:
- fedora-all
- fedora-development

108
AUTHORS
View File

@@ -1,86 +1,100 @@
Harald Hoyer <harald@redhat.com>
Harald Hoyer <harald@profian.com>
Victor Lowther <victor.lowther@gmail.com>
Jóhann B. Guðmundsson <johannbg@gmail.com>
Laszlo Gombos <laszlo.gombos@gmail.com>
Amadeusz Żołnowski <aidecoe@aidecoe.name>
Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Daniel Molkentin <daniel.molkentin@suse.com>
Hannes Reinecke <hare@suse.com>
Will Woods <wwoods@redhat.com>
Kairui Song <kasong@redhat.com>
Will Woods <wwoods@redhat.com>
Philippe Seewer <philippe.seewer@bfh.ch>
Warren Togami <wtogami@redhat.com>
Dave Young <dyoung@redhat.com>
Jeremy Katz <katzj@redhat.com>
Lukas Nykryn <lnykryn@redhat.com>
David Dillow <dave@thedillows.org>
Martin Wilck <mwilck@suse.de>
Lubomir Rintel <lkundrak@v3.sk>
Michal Soltys <soltys@ziu.info>
Colin Guthrie <colin@mageia.org>
Amerigo Wang <amwang@redhat.com>
Thomas Renninger <trenn@suse.com>
Alexander Tsoy <alexander@tsoy.me>
Martin Wilck <mwilck@suse.de>
Frederick Grose <fgrose@sugarlabs.org>
WANG Chao <chaowang@redhat.com>
Beniamino Galvani <bgalvani@redhat.com>
Jonathan Lebon <jonathan@jlebon.com>
Yu Watanabe <watanabe.yu+github@gmail.com>
Andrey Borzenkov <arvidjaar@gmail.com>
Hans de Goede <hdegoede@redhat.com>
Jonathan Lebon <jonathan@jlebon.com>
Peter Jones <pjones@redhat.com>
David Tardon <dtardon@redhat.com>
Peter Robinson <pbrobinson@fedoraproject.org>
Andreas Thienemann <andreas@bawue.net>
David Disseldorp <ddiss@suse.de>
Hans de Goede <hdegoede@redhat.com>
Frantisek Sumsal <frantisek@sumsal.cz>
Peter Jones <pjones@redhat.com>
Thomas Blume <thomas.blume@suse.com>
Andreas Thienemann <andreas@bawue.net>
Marcos Mello <marcosfrm@gmail.com>
Renaud Métrich <rmetrich@redhat.com>
наб <nabijaczleweli@nabijaczleweli.xyz>
Pavel Valena <pvalena@redhat.com>
Tomasz Paweł Gajc <tpgxyz@gmail.com>
Brian C. Lane <bcl@redhat.com>
Fabian Vogt <fvogt@suse.com>
Nicolas Chauvet <kwizart@gmail.com>
Zoltán Böszörményi <zboszor@pr.hu>
Beniamino Galvani <bgalvani@redhat.com>
Colin Walters <walters@verbum.org>
John Reiser <jreiser@bitwagon.com>
Luca Berra <bluca@vodka.it>
Tomasz Paweł Gajc <tpgxyz@gmail.com>
Shreenidhi Shedi <sshedi@vmware.com>
Xunlei Pang <xlpang@redhat.com>
Brian C. Lane <bcl@redhat.com>
Daniel Drake <drake@endlessm.com>
Renaud Métrich <rmetrich@redhat.com>
David Teigland <teigland@redhat.com>
Dusty Mabe <dusty@dustymabe.com>
Kairui Song <kasong@tencent.com>
Angelo "pallotron" Failla <pallotron@fb.com>
Thomas Blume <thomas.blume@suse.com>
Dan Horák <dhorak@redhat.com>
Ville Skyttä <ville.skytta@iki.fi>
Böszörményi Zoltán <zboszor@pr.hu>
Cristian Rodríguez <crrodriguez@opensuse.org>
Dan Horák <dhorak@redhat.com>
Javier Martinez Canillas <javierm@redhat.com>
Mike Gilbert <floppym@gentoo.org>
Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Ondrej Mosnacek <omosnace@redhat.com>
Baoquan He <bhe@redhat.com>
Brendan Germain <brendan.germain@nasdaqomx.com>
David Tardon <dtardon@redhat.com>
Dusty Mabe <dusty@dustymabe.com>
Jonas Witschel <diabonas@gmx.de>
Leho Kraav <leho@kraav.com>
Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Moritz Maxeiner <moritz@ucworks.org>
Nathan Rini <nate@ucar.edu>
Radek Vykydal <rvykydal@redhat.com>
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Fabian Deutsch <fabiand@fedoraproject.org>
Kamil Rytarowski <n54@gmx.com>
Lidong Zhong <lidong.zhong@suse.com>
Marc Grimme <grimme@atix.de>
Mike Gilbert <floppym@gentoo.org>
NeilBrown <neilb@suse.de>
Peter Rajnoha <prajnoha@redhat.com>
Tao Liu <ltao@redhat.com>
Thorsten Behrens <tbehrens@suse.com>
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
q66 <daniel@octaforge.org>
Adam Williamson <awilliam@redhat.com>
Chao Wang <chaowang@redhat.com>
Frederic Crozat <fcrozat@suse.com>
James Lee <jlee@thestaticvoid.com>
Jesse Keating <jkeating@redhat.com>
Masahiro Matsuya <mmatsuya@redhat.com>
Milan Broz <mbroz@redhat.com>
Mimi Zohar <zohar@linux.vnet.ibm.com>
Norbert Lange <norbert.lange@andritz.com>
Pingfan Liu <piliu@redhat.com>
Roberto Sassu <roberto.sassu@polito.it>
Stefan Reimer <it@startux.de>
Takashi Iwai <tiwai@suse.de>
Tony Asleson <tasleson@redhat.com>
Zoltán Böszörményi <zboszor@gmail.com>
Anton Blanchard <anton@samba.org>
Bill Nottingham <notting@redhat.com>
Chapman Flack <g2@anastigmatix.net>
@@ -94,13 +108,15 @@ Jiri Konecny <jkonecny@redhat.com>
Jon Ander Hernandez <jonan.h@gmail.com>
Juan RP <xtraeme@gmail.com>
Lance Albertson <lance@osuosl.org>
Marcos Mello <marcosfrm@gmail.com>
Marian Ganisin <mganisin@redhat.com>
Matt Coleman <matt@datto.com>
Matthias Gerstner <matthias.gerstner@suse.de>
Max Resch <resch.max@gmail.com>
Michael Ploujnikov <plouj@somanetworks.com>
Nicolas Porcel <nicolasporcel06@gmail.com>
Pratyush Anand <panand@redhat.com>
Silvio Fricke <silvio.fricke@gmail.com>
Stefan Berger <stefanb@linux.ibm.com>
Steven Brudenell <steven.brudenell@gmail.com>
Stig Telfer <stelfer@cray.com>
Thomas Backlund <tmb@mageia.org>
@@ -109,11 +125,17 @@ Vasiliy Tolstov <v.tolstov@selfip.ru>
Wim Muskee <wimmuskee@gmail.com>
Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Alan Pevec <apevec@redhat.com>
Alberto Planas <aplanas@suse.com>
Alex Harpin <development@landsofshadow.co.uk>
Alexander Wenzel <alexander.wenzel@qbeyond.de>
Alexey Shabalin <shaba@altlinux.org>
Andre Russ <andre.russ@sap.com>
Andreas Schwab <schwab@suse.de>
Ankit Kumar <ankit@linux.vnet.ibm.com>
Antony Messerli <amesserl@rackspace.com>
Chao Fan <cfan@redhat.com>
Coiby Xu <coxu@redhat.com>
Cornelius Hoffmann <coding@hoffmn.de>
Daniel Cordero <dracut@0xdc.io>
Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Daniel Schaal <farbing@web.de>
@@ -121,17 +143,22 @@ Denis Silakov <dsilakov@virtuozzo.com>
Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
Erwan Velu <erwan.velu@enovance.com>
Evgeny Vereshchagin <evvers@ya.ru>
German Maglione <gmaglione@redhat.com>
Guido Trentalancia <guido@trentalancia.net>
Hari Bathini <hbathini@linux.ibm.com>
Hari Bathini <hbathini@linux.vnet.ibm.com>
Henrik Gombos <henrik99999@gmail.com>
Ian Dall <ian@beware.dropbear.id.au>
Imran Haider <imran1008@gmail.com>
James Buren <ryuo@frugalware.org>
Jan Macku <jamacku@redhat.com>
Joey Boggs <jboggs@redhat.com>
José María Fernández <josemariafg@gmail.com>
Julian Wolf <juwolf@suse.com>
Koen Kooi <koen@dominion.thruhere.net>
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Kyle McMartin <kmcmarti@redhat.com>
Lee Duncan <lduncan@suse.com>
Luiz Angelo Daros de Luca <luizluca@gmail.com>
Lukas Wunner <lukas@wunner.de>
Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
@@ -144,28 +171,28 @@ Nikoli <nikoli@gmx.us>
Patrick Talbert <ptalbert@redhat.com>
Pedro Monreal <pmgdeb@gmail.com>
Petr Pavlu <petr.pavlu@suse.com>
Pingfan Liu <piliu@redhat.com>
Przemysław Rudy <prudy1@o2.pl>
Robert LeBlanc <robert@leblancnet.us>
Robert Scheck <robert@fedoraproject.org>
Stefan Berger <stefanb@us.ibm.com>
Thomas Lange <lange@informatik.uni-koeln.de>
Till Maas <opensource@till.name>
Tony Asleson <tasleson@redhat.com>
Vivek Goyal <vgoyal@redhat.com>
Vladislav Bogdanov <bubble@hoster-ok.com>
keentux <valentin.lefebvre@suse.com>
nkraetzschmar <nkraetzschmar@users.noreply.github.com>
Érico Rolim <erico.erc@gmail.com>
наб <nabijaczleweli@nabijaczleweli.xyz>
A. Wilcox <AWilcox@Wilcox-Tech.com>
Adam Alves <adamoa@gmail.com>
Adrien Thierry <athierry@redhat.com>
Alexander Kurtz <alexander@kurtz.be>
Alexander Miroshnichenko <alex@millerson.name>
Alexander Sosedkin <asosedkin@redhat.com>
Alexander Todorov <atodorov@redhat.com>
Alexey Kodanev <alexey.kodanev@oracle.com>
Andreas Schwab <schwab@suse.de>
Andreas Stieger <astieger@suse.com>
Andrew J. Hesford <ajh@sideband.org>
Andrey Sokolov <keremet@altlinux.org>
Andy Lutomirski <luto@mit.edu>
Anjali Kulkarni <anjali.k.kulkarni@oracle.com>
Anssi Hannula <anssi@mageia.org>
@@ -175,24 +202,30 @@ Artem Savkov <asavkov@redhat.com>
Attila Bruncsak <bruncsak@users.noreply.github.com>
B. Wilson <x@wilsonb.com>
Ben Howard <ben.howard@redhat.com>
Benjamin Gilbert <bgilbert@redhat.com>
Benjamin Marzinski <bmarzins@redhat.com>
Brandon Philips <brandon@ifup.co>
Brandon Sloane <btsloane@verizon.net>
Bruno E. O. Meneguele <bmeneg@redhat.com>
Bryn M. Reeves <bmr@redhat.com>
Canek Peláez Valdés <caneko@gmail.com>
Carlo Caione <carlo@endlessm.com>
Chad Dupuis <chad.dupuis@cavium.com>
Charles Rose <charles.rose@dell.com>
Christian Heinz <christian.ch.heinz@gmail.com>
Cole Robinson <crobinso@redhat.com>
Cong Wang <amwang@redhat.com>
Conrad Hoffmann <ch@bitfehler.net>
Daan De Meyer <daan.j.demeyer@gmail.com>
Dan Fuhry <dfuhry@datto.com>
Dave Jones <davej@redhat.com>
David Disseldorp <ddiss@suse.de>
David Hildenbrand <david@redhat.com>
David Michael <david.michael@coreos.com>
Denis Volkov <denis@simpletexting.net>
Dennis Schridde <devurandom@gmx.net>
Derek Hageman <hageman@inthat.cloud>
Derek Higgins <derekh@redhat.com>
Dirk Müller <dirk@dmllr.de>
Donovan Tremura <neurognostic@protonmail.ch>
Duane Griffin <duaneg@dghda.com>
Elan Ruusamäe <glen@delfi.ee>
@@ -206,8 +239,10 @@ Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
Florian Gamböck <mail@floga.de>
Frank Deng <frank.deng@oracle.com>
François Cami <fcami@fedoraproject.org>
Frederick Grose <4335897+FGrose@users.noreply.github.com>
Gerd von Egidy <gerd.von.egidy@intra2net.com>
Glen Gray <slaine@slaine.org>
Glenn Morris <rgm@stanford.edu>
GuoChuang <guo.chuang@zte.com.cn>
HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Hendrik Brueckner <brueckner@linux.ibm.com>
@@ -218,10 +253,12 @@ Hui Wang <john.wanghui@huawei.com>
Ignaz Forster <iforster@suse.com>
Jacob Wen <jian.w.wen@oracle.com>
James Laska <jlaska@redhat.com>
James Morris <morisja@gmail.com>
Jan Stodola <jstodola@redhat.com>
Jaroslav Jindrak <dzejrou@gmail.com>
Jason Dana <jasondana@quarksecurity.com>
Jens Heise <46450477+heisej@users.noreply.github.com>
Jeremy Linton <jlinton@redhat.com>
Jeremy Linton <lintonrjeremy@gmail.com>
Jiri Pirko <jiri@resnulli.us>
Joe Lawrence <Joe.Lawrence@stratus.com>
@@ -229,13 +266,17 @@ Johannes Thumshirn <jthumshirn@suse.com>
Jonas Jelten <jj@sft.lol>
Jonas Jonsson <jonas@websystem.se>
Jonas Witschel <diabonas@archlinux.org>
Kenneth D'souza <kennethdsouza94@gmail.com>
Kevin Yung <Kevin.Yung@myob.com>
Lars R. Damerow <lars@pixar.com>
Lee Duncan <lduncan@suse.com>
Lars Wendler <polynomial-c@gentoo.org>
Laura Hild <lsh@jlab.org>
Lennart Poettering <lennart@poettering.net>
Lennert Buytenhek <buytenh@wantstofly.org>
Lev Veyde <lveyde@redhat.com>
Lianbo Jiang <lijiang@redhat.com>
LinkTed <link.ted@mailbox.org>
Luca BRUNO <luca.bruno@coreos.com>
Lucas C. Villa Real <lucasvr@gmail.com>
Major Hayden <major@mhtx.net>
Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
@@ -244,15 +285,18 @@ Marian Csontos <mcsontos@redhat.com>
Mark Fasheh <mfasheh@suse.de>
Matt <smoothsailing72@hotmail.com>
Matt Smith <shadowfax@gmx.com>
Matthias Berndt <matthias_berndt@gmx.de>
Mei Liu <liumbj@linux.vnet.ibm.com>
Michael Chapman <mike@very.puzzling.org>
Michael McCracken <michael.mccracken@gmail.com>
Michal Hecko <mhecko@redhat.com>
Michal Schmidt <mschmidt@redhat.com>
Michal Sekletar <msekleta@redhat.com>
Mike Gorse <mgorse@suse.com>
Moritz 'Morty' Strübe <morty@gmx.net>
Morten Linderud <morten@linderud.pw>
Munehiro Matsuda <haro@kgt.co.jp>
Nicolas Porcel <nicolasporcel06@gmail.com>
Neal Gompa <neal@gompa.dev>
Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Olivier Blin <dev@blino.org>
Ondrej Dubaj <odubaj@redhat.com>
@@ -274,17 +318,20 @@ Robert Buchholz <rbu@goodpoint.de>
Ruben Kerkhof <ruben@rubenkerkhof.com>
Rumbaut Thomas <Thomas.Rumbaut@digipolis.gent>
Rusty Bird <rustybird@openmailbox.org>
Savyasachee Jha <genghizkhan91@hawkradius.com>
Scott Moser <smoser@brickies.net>
Sebastian Mitterle <smitterl@redhat.com>
Sergei Iudin <tsipa740@gmail.com>
Sergey Fionov <fionov@gmail.com>
Shawn W Dunn <sfalken@opensuse.org>
Srinivasa T N <seenutn@linux.vnet.ibm.com>
Stefan Berger <stefanb@linux.ibm.com>
Stijn Hoop <stijn@sandcat.nl>
Sullivan (CTR), Austin <austin.sullivan.ctr@progeny.net>
Thierry Vignaud <thierry.vignaud@gmail.com>
Thilo Bangert <thilo.bangert@gmx.net>
Thomas Abraham <tabraham@suse.com>
Thomas Haller <thaller@redhat.com>
Tianhao Chai <cth451@gmail.com>
Tobias Geerinckx <tobias.geerinckx@gmail.com>
Tobias Klauser <tklauser@distanz.ch>
Tom Gundersen <teg@jklm.no>
@@ -294,17 +341,22 @@ Vadim Kuznetsov <vadimk@gentoo.org>
Vaughan Cao <vaughan.cao@oracle.com>
Vladius25 <vkorol2509@icloud.com>
Vratislav Podzimek <vpodzime@redhat.com>
Wenchao Hao <haowenchao@huawei.com>
Yang Liu <50459973+ly4096x@users.noreply.github.com>
Yanko Kaneti <yaneti@declera.com>
Zhiguo Deng <bjzgdeng@linux.vnet.ibm.com>
Ziyue Yang <ziyang@redhat.com>
foopub <45460217+foopub@users.noreply.github.com>
gaoyi <ymuemc@163.com>
gombi <gombi@>
honza801 <honza801@gmail.com>
jbash aka John Bashinski <jbash@velvet.com>
jloeser <jloeser@suse.de>
joamonwx <unknown>
johannes <johannes.brechtmann@gmail.com>
jonathan-teh <30538043+jonathan-teh@users.noreply.github.com>
joshuacov1 <joshuacov@gmail.com>
lapseofreason <lapseofreason0@gmail.com>
leo-lb <lle-bout@zaclys.net>
logan <logancaldwell23@gmail.com>
masem <matej.semian@gmail.com>
@@ -314,5 +366,7 @@ mwberry <mwberry@users.noreply.github.com>
nabijaczleweli <nabijaczleweli@gmail.com>
privb0x23 <privb0x23@users.noreply.github.com>
realtime-neil <neil@rtr.ai>
runsisi <runsisi@hust.edu.cn>
tupper <tupper.bob@gmail.com>
xtraeme <xtraeme@voidlinux.eu>
Дамјан Георгиевски <gdamjan@gmail.com>

22
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,22 @@
We welcome contributions from everyone. However, please follow the following guidelines when posting a GitHub Pull Request or filing a GitHub Issue on the dracut project:
By participating in this project, you agree to abide by the [code of conduct](docs/CODE_OF_CONDUCT.md).
# Filing Issues
We use GitHub Issues exclusively for tracking bugs and feature requests of dracut.
We only track bugs in the two most recently released versions of dracut in the GitHub Issue tracker.
If you are using an older version of dracut, please contact your distribution's bug tracker instead (see below). See GitHub Release Page for the list of most recent releases.
When filing an issue, specify the dracut version you are experiencing the issue with. Also, indicate which distribution you are using.
Please include an explanation how to reproduce the issue you are pointing out.
For more information on Coding Style and Commit messages see [Dracut Developer Guidelines](docs/HACKING.md).
# Older or downstream versions
For older or downstream versions that are still supported by your distribution please use respective downstream tracker:
[Debian](https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=dracut)
[Fedora](https://bugzilla.redhat.com/buglist.cgi?quicksearch=dracut)
[Gentoo](https://bugs.gentoo.org/buglist.cgi?quicksearch=dracut)
[openSUSE](https://bugzilla.opensuse.org/buglist.cgi?quicksearch=dracut)

View File

@@ -1,17 +1,16 @@
-include dracut-version.sh
DRACUT_MAIN_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :)
DRACUT_MAIN_VERSION := $(shell env GIT_CEILING_DIRECTORIES=$(CURDIR)/.. git describe --abbrev=0 --tags --always 2>/dev/null || :)
ifeq ($(DRACUT_MAIN_VERSION),)
DRACUT_MAIN_VERSION = $(DRACUT_VERSION)
endif
DRACUT_FULL_VERSION ?= $(shell env GIT_CEILING_DIRECTORIES=$(CWD)/.. git describe --tags --always 2>/dev/null || :)
DRACUT_FULL_VERSION := $(shell env GIT_CEILING_DIRECTORIES=$(CURDIR)/.. git describe --tags --always 2>/dev/null || :)
ifeq ($(DRACUT_FULL_VERSION),)
DRACUT_FULL_VERSION = $(DRACUT_VERSION)
endif
HAVE_SHELLCHECK ?= $(shell which shellcheck >/dev/null 2>&1 && echo yes)
HAVE_SHFMT ?= $(shell which shfmt >/dev/null 2>&1 && echo yes)
HAVE_RPMBUILD ?= $(shell which rpmbuild >/dev/null 2>&1 && echo yes)
HAVE_SHELLCHECK ?= $(shell command -v shellcheck >/dev/null 2>&1 && echo yes)
HAVE_SHFMT ?= $(shell command -v shfmt >/dev/null 2>&1 && echo yes)
-include Makefile.inc
@@ -49,7 +48,7 @@ man8pages = man/dracut.8 \
manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)
.PHONY: install clean archive rpm srpm testimage test all check AUTHORS CONTRIBUTORS doc dracut-version.sh
.PHONY: install clean archive testimage test all check AUTHORS CONTRIBUTORS doc dracut-version.sh
all: dracut-version.sh dracut.pc dracut-install src/skipcpio/skipcpio dracut-util
@@ -102,6 +101,16 @@ ifeq ($(HAVE_SHFMT),yes)
shfmt -w -s .
endif
src/dracut-cpio/target/release/dracut-cpio: src/dracut-cpio/src/main.rs
cargo --offline build --release --manifest-path src/dracut-cpio/Cargo.toml
dracut-cpio: src/dracut-cpio/target/release/dracut-cpio
ln -fs $< $@
ifeq ($(enable_dracut_cpio),yes)
all: dracut-cpio
endif
doc: $(manpages) dracut.html
ifneq ($(enable_documentation),no)
@@ -168,6 +177,7 @@ ifneq ($(enable_documentation),no)
endif
if [ -n "$(systemdsystemunitdir)" ]; then \
mkdir -p $(DESTDIR)$(systemdsystemunitdir); \
ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/dracut-shutdown-onfailure.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown-onfailure.service; \
ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown.service; \
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants; \
ln -s ../dracut-shutdown.service \
@@ -196,6 +206,9 @@ endif
if [ -f dracut-util ]; then \
install -m 0755 dracut-util $(DESTDIR)$(pkglibdir)/dracut-util; \
fi
ifeq ($(enable_dracut_cpio),yes)
install -m 0755 dracut-cpio $(DESTDIR)$(pkglibdir)/dracut-cpio
endif
mkdir -p $(DESTDIR)${prefix}/lib/kernel/install.d
install -m 0755 install.d/50-dracut.install $(DESTDIR)${prefix}/lib/kernel/install.d/50-dracut.install
install -m 0755 install.d/51-dracut-rescue.install $(DESTDIR)${prefix}/lib/kernel/install.d/51-dracut-rescue.install
@@ -215,13 +228,14 @@ clean:
$(RM) */*/*~
$(RM) $(manpages:%=%.xml) dracut.xml
$(RM) test-*.img
$(RM) dracut-*.rpm dracut-*.tar.bz2 dracut-*.tar.xz
$(RM) dracut-*.tar.bz2 dracut-*.tar.xz
$(RM) dracut-version.sh
$(RM) dracut-install src/install/dracut-install $(DRACUT_INSTALL_OBJECTS)
$(RM) skipcpio/skipcpio $(SKIPCPIO_OBJECTS)
$(RM) dracut-util util/util $(UTIL_OBJECTS)
$(RM) $(manpages) dracut.html
$(RM) dracut.pc
$(RM) dracut-cpio src/dracut-cpio/target/release/dracut-cpio*
$(MAKE) -C test clean
dist: dracut-$(DRACUT_MAIN_VERSION).tar.xz
@@ -236,34 +250,6 @@ dracut-$(DRACUT_MAIN_VERSION).tar.xz: doc syncheck
xz -9 dracut-$(DRACUT_MAIN_VERSION).tar
rm -f -- dracut-$(DRACUT_MAIN_VERSION).tar
ifeq ($(HAVE_RPMBUILD),yes)
rpm: dracut-$(DRACUT_MAIN_VERSION).tar.xz syncheck
rpmbuild=$$(mktemp -d -p /var/tmp rpmbuild-dracut.XXXXXX); src=$$(pwd); \
cp dracut-$(DRACUT_MAIN_VERSION).tar.xz "$$rpmbuild"; \
LC_MESSAGES=C $$src/tools/git2spec.pl $(DRACUT_MAIN_VERSION) "$$rpmbuild" < pkgbuild/dracut.spec > $$rpmbuild/dracut.spec; \
(cd "$$rpmbuild"; \
wget https://www.gnu.org/licenses/lgpl-2.1.txt; \
rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
--define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
--define "_rpmdir $$PWD" -ba dracut.spec; ) && \
( mv "$$rpmbuild"/{,$$(uname -m)/}*.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm )
srpm: dracut-$(DRACUT_MAIN_VERSION).tar.xz syncheck
rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \
cp dracut-$(DRACUT_MAIN_VERSION).tar.xz "$$rpmbuild"; \
LC_MESSAGES=C $$src/tools/git2spec.pl $(DRACUT_MAIN_VERSION) "$$rpmbuild" < pkgbuild/dracut.spec > $$rpmbuild/dracut.spec; \
(cd "$$rpmbuild"; \
[ -f $$src/lgpl-2.1.txt ] && cp $$src/lgpl-2.1.txt . || wget https://www.gnu.org/licenses/lgpl-2.1.txt; \
rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
--define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
--define "_rpmdir $$PWD" -bs dracut.spec; ) && \
( mv "$$rpmbuild"/*.src.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm )
else
.PHONY: rpm srpm
rpm: syncheck
srpm: syncheck
endif
syncheck:
@ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \
[ "$${i##*/}" = "module-setup.sh" ] && continue; \
@@ -283,7 +269,7 @@ else
endif
endif
check: all syncheck rpm
check: all syncheck
@[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; }
@$(MAKE) -C test check
@@ -318,10 +304,3 @@ AUTHORS:
CONTRIBUTORS:
@git shortlog $(DRACUT_MAIN_VERSION).. --numbered --summary -e |while read a rest || [ -n "$$rest" ]; do echo "- $$rest";done
dracut.html.sign: dracut-$(DRACUT_MAIN_VERSION).tar.xz dracut.html
gpg-sign-all dracut-$(DRACUT_MAIN_VERSION).tar.xz dracut.html
upload: dracut.html.sign
kup put dracut-$(DRACUT_MAIN_VERSION).tar.xz dracut-$(DRACUT_MAIN_VERSION).tar.sign /pub/linux/utils/boot/dracut/
kup put dracut.html dracut.html.sign /pub/linux/utils/boot/dracut/

595
NEWS.md
View File

@@ -1,5 +1,600 @@
[Rendered view](https://github.com/dracutdevs/dracut/blob/master/NEWS.md)
dracut-059
==========
#### Bug Fixes
* **NEWS.md:** add missing entries ([794ce5e3](https://github.com/dracutdevs/dracut/commit/794ce5e3ee55f1b78be32873a054aed422346f4c))
#### Contributors
- Jóhann B. Guðmundsson <johannbg@gmail.com>
dracut-058
==========
#### Bug Fixes
* **90kernel-modules:**
* MMC and NVMe on kernels 6.0+ ([e0d57a8f](https://github.com/dracutdevs/dracut/commit/e0d57a8f5b15847a7fbae2ed3df29ec2c5d25ec7))
* add (nonstandard) NVMe drivers ([415e5519](https://github.com/dracutdevs/dracut/commit/415e5519d19e24d123378710abe47a2df2b22e7b))
* **90multipath:**
* use RemainAfterExit=yes for multipathd-configure.service ([2334031a](https://github.com/dracutdevs/dracut/commit/2334031a890a1101c78f986681236c76ba806d91))
* create `/etc/multipath` only ([0940be90](https://github.com/dracutdevs/dracut/commit/0940be905843e93111e96c0d70c56389240fbc04))
* **Makefile:** reduce the number of shell invocations ([ad7d5bc8](https://github.com/dracutdevs/dracut/commit/ad7d5bc8ea181ef805f65ae690681ebe5ba29bbe))
* **base:**
* do not require chroot inside initramfs ([51813371](https://github.com/dracutdevs/dracut/commit/518133714b769160448a51c512d5e152ea6332da))
* remove grep dependency ([240a1d34](https://github.com/dracutdevs/dracut/commit/240a1d34bd5d98fb8a7d75cd1053d8abf1c73f64))
* **dbus-broker:** add missing sockets.target.wants/dbus.socket ([7ed04618](https://github.com/dracutdevs/dracut/commit/7ed0461810602bfbd4d5492fc9ed82f15e57fa9f))
* **dmsquash-live:**
* add support for NFS ([8caaad4f](https://github.com/dracutdevs/dracut/commit/8caaad4fc2d75982eb87f5ebc72a4c276986f756))
* check kernel for built-in squashfs drivers ([922c9e28](https://github.com/dracutdevs/dracut/commit/922c9e28ed87815cf6ae0b5ee911ff0ef616d1b0))
* run checkisomd5 on correct device ([c8f819e6](https://github.com/dracutdevs/dracut/commit/c8f819e6c1c38e525e4b491b4215a939ee6e00df))
* **dmsquash-live-ntfs:** remove unnecessary command ([e78f71b9](https://github.com/dracutdevs/dracut/commit/e78f71b9da29828ee4cd8444d4841ee127ef8614))
* **dmsquash-live-root:** check kernel for built-in `overlay` drivers ([d0cd7cd3](https://github.com/dracutdevs/dracut/commit/d0cd7cd38711b5425777c3b1595dbf4288beaa23))
* **dracut:**
* allow to set persistent policy based on /dev/mapper device names ([9cc7ceec](https://github.com/dracutdevs/dracut/commit/9cc7ceec1e9b4028d1a72bf51f9ea488d7ca11ac))
* shellcheck regression in DRACUT_INSTALL calls ([097dd367](https://github.com/dracutdevs/dracut/commit/097dd367bbd61da1577a182c535c5aacdfd07031))
* replace invalid lzo command with lzop for LZO compression ([b2d7561b](https://github.com/dracutdevs/dracut/commit/b2d7561b98d08c7e4018aa22dc36dc1242e50f09))
* typo error 'aggresive' -> 'aggressive' ([e4f1dbcc](https://github.com/dracutdevs/dracut/commit/e4f1dbcc0061113cb58e555724f76a7243788236))
* **dracut-functions.sh:**
* check_kernel_module should follow dracutsysrootdir ([6c42d378](https://github.com/dracutdevs/dracut/commit/6c42d378abe528ee6f10c8272080eec5f3f44acb))
* suppress findmnt error msg if /etc/fstab not exist ([e9ed44c8](https://github.com/dracutdevs/dracut/commit/e9ed44c8864445d85018e31064cd888c358f1daf))
* **dracut-init:** make require_kernel_modules ignore no kernel build ([d460941b](https://github.com/dracutdevs/dracut/commit/d460941b51d0178683b9098e62ad57e43fb71011))
* **dracut-init.sh:**
* instmods: wrong variable name ([b12ee558](https://github.com/dracutdevs/dracut/commit/b12ee558f5660073ad26415794570188e8a427b0))
* add missing hostonly code in the inst_multiple function ([e2fdb30b](https://github.com/dracutdevs/dracut/commit/e2fdb30b56305aed9d3be32f394352c7c3fdbcef))
* correct dracut-install source path ([72b700e3](https://github.com/dracutdevs/dracut/commit/72b700e3cb8a0d74033e6e20b2435d9254b36efe))
* propagate the result code returned by dracut-install ([d2f6f445](https://github.com/dracutdevs/dracut/commit/d2f6f445edb5de033d52ece0e982db38ac2614e2))
* **dracut-initramfs-restore.sh:**
* initramfs detection not working ([481b87fa](https://github.com/dracutdevs/dracut/commit/481b87fa7a82be54663071ad9ad76c34e378ddc7))
* hide unpack errors ([4f20ae26](https://github.com/dracutdevs/dracut/commit/4f20ae2620a9067270fe3e5f191ada6bff7b0ec1))
* **dracut-install:**
* use stripped kernel module path as hash key ([2f791b40](https://github.com/dracutdevs/dracut/commit/2f791b401b287f67f2421452b5f82cdb5285a637))
* do not try to copy files from the root directory ([ebbcf97d](https://github.com/dracutdevs/dracut/commit/ebbcf97dc7267f47ae568909305bcb05de2876b4))
* correctly waitpid() for cp ([13736c50](https://github.com/dracutdevs/dracut/commit/13736c50c797d63ab75468ded17bc7935d7f1f94))
* convert_abs_rel: return valid path on error ([06d31617](https://github.com/dracutdevs/dracut/commit/06d316171cd5e0e86c21006f93776ba9f49087cc))
* **dracut-logger.sh:** this fixes the dlog_init check for /dev/log ([6b592f58](https://github.com/dracutdevs/dracut/commit/6b592f581c1a5ec489acee95779867e0485770fd))
* **dracut-systemd:** run systemctl daemon-reload after remove_hostonly_files ([e1058b07](https://github.com/dracutdevs/dracut/commit/e1058b07ea2acb1bdb2d52f778639e093b1ed8a6))
* **dracut.sh:**
* split drivers_dir check ([d32d221e](https://github.com/dracutdevs/dracut/commit/d32d221efd77dcc0afa1d39230f7bdc2958ffca5))
* use DRACUT_ARCH instead of `uname -m` ([a86aea65](https://github.com/dracutdevs/dracut/commit/a86aea65186b47ac210a3947c966311bb5371aeb))
* make omit-drivers option do exact match for names ([444944ab](https://github.com/dracutdevs/dracut/commit/444944ab37c2446adf07dd163225707e90aabef3))
* correct wrong systemd variable paths ([b9dc999f](https://github.com/dracutdevs/dracut/commit/b9dc999f87a477af53e379d7fb1053d13d6dbe88))
* remove duplicate "dracut:" string in logger functions ([8410ee22](https://github.com/dracutdevs/dracut/commit/8410ee22903403cd673a22692a084125c835cbe9))
* do not fail on irregular files ([b72d0d7f](https://github.com/dracutdevs/dracut/commit/b72d0d7f9be53c1ad04f132daf0297aff7581e9c))
* **dracut.spec:** tpm2-tools is required for crypt module to work ([8abffe7c](https://github.com/dracutdevs/dracut/commit/8abffe7cca2e210e15c618beeffe7450be357f73))
* **drm:** add video drivers needed on hyper-v and similar ([85149b85](https://github.com/dracutdevs/dracut/commit/85149b85961aa535a3c61d492cd3594794e5cc3f))
* **github:** yml syntax and commit message for dependabot ([32f6dd1d](https://github.com/dracutdevs/dracut/commit/32f6dd1d5f0b7c24bda8bf950df176a0791045cb))
* **i18n:**
* do not fail if FONT in /etc/vconsole.conf has the file extension ([e1de5bd2](https://github.com/dracutdevs/dracut/commit/e1de5bd2d711df2c6814a3c3ab8472cdb4de9101))
* add required includes for keymaps ([fe8fa2b0](https://github.com/dracutdevs/dracut/commit/fe8fa2b0cadbb33e27c8dd8b5851548dcd65835c))
* **install.d:** add --verbose if KERNEL_INSTALL_VERBOSE=1 ([846a8453](https://github.com/dracutdevs/dracut/commit/846a845375b8a9ea48741079d523e6b464950ea7))
* **integrity:**
* do not enable EVM if there is no key ([90585c62](https://github.com/dracutdevs/dracut/commit/90585c624af15ba0abb7f32b0c2afc2b122dd019))
* remove unused variable ([9d1004a4](https://github.com/dracutdevs/dracut/commit/9d1004a4e9883ecabdca478a809efb5501a1e47a))
* **iscsi:** don't install the module if kernel doesn't support iscsi ([7917d797](https://github.com/dracutdevs/dracut/commit/7917d7976ded6384433ef8fb2ce1905f0a76358e))
* **kernel-modules:**
* add sysctl to initramfs to handle modprobe files ([33679fff](https://github.com/dracutdevs/dracut/commit/33679fff5deb733f9dfe8d005066ac98e107c083))
* always include nvmem driver on nvmem_on_arm ([bc965cd8](https://github.com/dracutdevs/dracut/commit/bc965cd8890013a6362733d217c18756134bbcdf))
* **load_fstype:** use $1 if $2 is missing ([401158e5](https://github.com/dracutdevs/dracut/commit/401158e58c47b2e1278a47b9cd236f501cfe2732))
* **lsinitrd.sh:**
* add a missing path to image ([e877be69](https://github.com/dracutdevs/dracut/commit/e877be69b41199ee4384ccb6352754bb9edfbba4))
* correct skipcpio source path ([5eb996a9](https://github.com/dracutdevs/dracut/commit/5eb996a9936a87918a4320963a8681975ed86be4))
* **lvm:** drop dm-eventd binary and libs from initramfs ([7d3184e4](https://github.com/dracutdevs/dracut/commit/7d3184e430823f7eee4acee87576acdcf02746c2))
* **man:**
* correct typo ([699e3945](https://github.com/dracutdevs/dracut/commit/699e39458962bc1a06a096f24ad86ffb87e8779e))
* dracut.cmdline.7: clarify "rd.nvmf.discover=fc,auto" ([a90efdd7](https://github.com/dracutdevs/dracut/commit/a90efdd704271dab6717329e88b3a1c9e850d23b))
* dracut.cmdline(7): correct syntax for rd.nonvmf ([4b69e63b](https://github.com/dracutdevs/dracut/commit/4b69e63b7414567a03e8da79acc2efe32e0a6a94))
* point man pages to github.com instead of kernel.org ([d6d55584](https://github.com/dracutdevs/dracut/commit/d6d555845e53dca0b083d59c8cedf465e6b70b71))
* correct typo ([7fa0094c](https://github.com/dracutdevs/dracut/commit/7fa0094c0087a827a22f30ec62f03f243b000bf3))
* **multipath:** install multipathd.socket ([02e646fc](https://github.com/dracutdevs/dracut/commit/02e646fc7ec91e1fbaa0f2097f35781ae41da937))
* **network:**
* check if ip command fails ([52d14607](https://github.com/dracutdevs/dracut/commit/52d14607d18d99c0c2c3242a64561b1af6a332d1))
* two bugs which cause minutes long boot times ([1d6f42c8](https://github.com/dracutdevs/dracut/commit/1d6f42c8a4029380c2147018e64fb7ebc9e175e7))
* avoid double brackets around IPv6 address ([2c26b703](https://github.com/dracutdevs/dracut/commit/2c26b703223bb65822954264bcd6ca7934c98b4a))
* don't use same ifname multiple times ([f4e9ea87](https://github.com/dracutdevs/dracut/commit/f4e9ea879f38bea92069e9397028caa5d81e5aee))
* **network-legacy:**
* check if dhclient has --timeout option ([23654c50](https://github.com/dracutdevs/dracut/commit/23654c50b003612d1b6e4b09c0bde7dd88239fd8))
* correct wrong local network configuration path ([2eb733cc](https://github.com/dracutdevs/dracut/commit/2eb733cc11c09358b79e2c73218953f5bb64da93))
* **network-manager:**
* always install the library plugins directory ([429f9de1](https://github.com/dracutdevs/dracut/commit/429f9de1c767c816301097a42cec762dc82d67da))
* correct wrong local network configuration path ([744c6de5](https://github.com/dracutdevs/dracut/commit/744c6de5cde38d012f93bc53f9076bf9c37b8b72))
* **nfs,virtiofs:** check kernel for builtin fs drivers ([78cafe46](https://github.com/dracutdevs/dracut/commit/78cafe465d972ed52cc9d847c9895716a5f44e7e))
* **nvmf:**
* run cmdline hook before parse-ip-opts.sh ([a65fab69](https://github.com/dracutdevs/dracut/commit/a65fab69662d3adf52eb968411f59ebc5a173f7c))
* avoid calling "exit" in a cmdline hook ([a93968b0](https://github.com/dracutdevs/dracut/commit/a93968b07567a654d18b8ef2144337d803186eca))
* make sure "rd.nvmf.discover=fc,auto" takes precedence ([556ef46a](https://github.com/dracutdevs/dracut/commit/556ef46aa96650d72b2fd850a09fa04dff64bbb8))
* don't use "finished" queue for autoconnect ([e93e4652](https://github.com/dracutdevs/dracut/commit/e93e46520dd89a7357a15441ab6b141ff9ff9aeb))
* don't create did-setup file ([03921ec0](https://github.com/dracutdevs/dracut/commit/03921ec09e95ea49f89ae307dcca4e2e3d1bc6d6))
* no need to load the nvme module ([a3cf4ec9](https://github.com/dracutdevs/dracut/commit/a3cf4ec92202df43adf368c7fdd12e35d304a0e4))
* don't try to validate network connections in cmdline hook ([b3ff3f3f](https://github.com/dracutdevs/dracut/commit/b3ff3f3fbce6878a754332cd4a05374e5e1156c8))
* nvme list-subsys prints the address using commas as separator ([9664e98b](https://github.com/dracutdevs/dracut/commit/9664e98b5db603567d42d4d0c6e6ea1bd3d5bf24))
* **shell-completion:** add missing -p and --parallel options ([b30a00c2](https://github.com/dracutdevs/dracut/commit/b30a00c2a2815517e79eeaeef5f76fd6f923e61f))
* **skipcpio:** ignore broken pipe ([aa0369a4](https://github.com/dracutdevs/dracut/commit/aa0369a4a31764fde06214358b0774fb1095af01))
* **squash:** build ld cache for squash loader ([bc1b23c2](https://github.com/dracutdevs/dracut/commit/bc1b23c29202023dd7852f4c3e3e97aaaf94da92))
* **systemd:**
* add missing modprobe@.service ([928252a1](https://github.com/dracutdevs/dracut/commit/928252a145ca44627ba5873e01245eabe246992f))
* set right permissions for the machine-id file ([da55e266](https://github.com/dracutdevs/dracut/commit/da55e2663499f6218d28783076c5449a9a6b8ec9))
* **systemd-coredump:** correct systemd-coredump binary path ([4b931bfb](https://github.com/dracutdevs/dracut/commit/4b931bfb4f594834d06787b3506c4a0ddbbe48ac))
* **systemd-hostnamed:**
* add missing dbus-org.freedesktop.hostname1.service ([4fca292b](https://github.com/dracutdevs/dracut/commit/4fca292b957c8ec256111442ba0db4e539442ac8))
* correct sysusers configuration ([a540c95b](https://github.com/dracutdevs/dracut/commit/a540c95bbf9496f7b9d6e86aa5080173d73dff78))
* **systemd-networkd:** typo in systemd-networkd.socket local conf path ([d4732be8](https://github.com/dracutdevs/dracut/commit/d4732be87782016c2699fbf980d63ac366819942))
* **systemd-timedated:** add missing dbus-org.freedesktop.timedate1.service ([b3d219b4](https://github.com/dracutdevs/dracut/commit/b3d219b475c8f695ccfb8b741282583da710befa))
* **systemd-timesyncd:** typo in systemd-time-wait-sync.service local conf path ([e3ec51e1](https://github.com/dracutdevs/dracut/commit/e3ec51e128135d56c3995d87ca2a4ff65b253391))
* **test:** remove unnecessary setup steps ([22ab7979](https://github.com/dracutdevs/dracut/commit/22ab79794852eced9caaccd8763332b870e97032))
* **virtiofs:**
* make shebangs work on split-usr systems ([27b316df](https://github.com/dracutdevs/dracut/commit/27b316df1f001949675fbeddaeab6ff56bc449d2))
* ismounted has a dependency on the base module ([c73e7b99](https://github.com/dracutdevs/dracut/commit/c73e7b99db8c759d89236d0791145d6919abd2bc))
* **zipl:** remove trailing spaces from zipl boot device name ([b4de9ee1](https://github.com/dracutdevs/dracut/commit/b4de9ee107742c8b0b8a86dcc22aa4fd366b068e))
#### Features
* **dmsquash-live:**
* add support for dash ([862ba526](https://github.com/dracutdevs/dracut/commit/862ba52683834f87722cae7a6692a59d09271ec3))
* add new dmsquash-live-autooverlay module ([a3c67d27](https://github.com/dracutdevs/dracut/commit/a3c67d27e75223bb45df19f850d246ced9a09938))
* **dracut-init.sh:**
* introduce a new helper require_kernel_modules ([d3a5e631](https://github.com/dracutdevs/dracut/commit/d3a5e6312a84b29bcb10fd5d28e1314f1acbc78f))
* add inst_libdir_dir() helper ([cc669250](https://github.com/dracutdevs/dracut/commit/cc669250affa0176ed2bba866d8e933fb0668f4c))
* **dracut-install:** convert_abs_rel: canonicalise parent of from, too ([53dd6a9b](https://github.com/dracutdevs/dracut/commit/53dd6a9bbb0eb91dea0e56bec556bf865a920b2e), closes [#1781](https://github.com/dracutdevs/dracut/issues/1781))
* **dracut.sh:**
* populate uefi_cmdline if no other cmdline is given ([1157143d](https://github.com/dracutdevs/dracut/commit/1157143d67b02ccf95602ae082f6fbfd1a20f342))
* pass engine flag to sbsign allowing use with hardware devices ([897e5eff](https://github.com/dracutdevs/dracut/commit/897e5effe08f15de6b20099caeda7bc1167b7026))
* **fs-lib:** fsck_single can now handle PARTLABEL and PARTUUID ([d40617f7](https://github.com/dracutdevs/dracut/commit/d40617f720ce7d895be4f6297ac4342d4492c39a))
* **github:** automating dependency updates ([bdddfd56](https://github.com/dracutdevs/dracut/commit/bdddfd561f38469b3f51d7e6af196ff1f190e2a2))
* **kernel-modules:** exclude USB drivers in strict hostonly mode ([7debf540](https://github.com/dracutdevs/dracut/commit/7debf540ca69d9171cb86b4752c882bac997c26e))
* **multipath:** install tmpfiles.d config file ([cf31fcf8](https://github.com/dracutdevs/dracut/commit/cf31fcf804be4dc0fa31885f5185a59b6012cdf4))
* **nvmf:** set rd.neednet=1 if tcp records encountered ([cf8986af](https://github.com/dracutdevs/dracut/commit/cf8986af7d9a3ce73f330de23d5312f924acea34))
* **overlayfs:**
* add new overlayfs module to dracut.spec ([b55563f6](https://github.com/dracutdevs/dracut/commit/b55563f635fb8aad5e141c4fa5d3e486dc2b0b60))
* add a new module called overlayfs ([40dd5c90](https://github.com/dracutdevs/dracut/commit/40dd5c90e0efcb9ebaa9abb42a38c7316e9706bd))
* **qemu:** add efi_secret driver ([8194f72a](https://github.com/dracutdevs/dracut/commit/8194f72af2e9b6ab3cdb01412381023b0a58c852))
* **squash:** use require_kernel_modules for better module checking ([d4a9d6b4](https://github.com/dracutdevs/dracut/commit/d4a9d6b4c006a375e0b89396251e8ad1aecc0b16))
* **systemd:** install systemd-sysroot-fstab-check ([23684e4a](https://github.com/dracutdevs/dracut/commit/23684e4a2bb024595ad63d9f49d83b4693537110))
* **systemd-pcrphase:** introducing the systemd-pcrphase module ([d345ca2e](https://github.com/dracutdevs/dracut/commit/d345ca2efd5e017be5cc80cfc96137a7f0bee425))
* **systemd-portabled:** introducing the systemd-portabled module ([03babd95](https://github.com/dracutdevs/dracut/commit/03babd95e28bc884e87fd0885edafb2ee91f8935))
* **systemd-pstore:** introducing the systemd-pstore module ([758f2e69](https://github.com/dracutdevs/dracut/commit/758f2e69374d7865bf55a74ee218a1d52df20123))
* **test:** add new module to share code between tests ([f5689b42](https://github.com/dracutdevs/dracut/commit/f5689b42bdb9dfcb0f1b610d7db845ceac985061))
* **test-makeroot:** add new module to share code between tests ([54b963ca](https://github.com/dracutdevs/dracut/commit/54b963ca35a3a4cc8bcdb35e5e9ebb74af09191e))
* **test-root:** add new module to share code between tests ([b17a3103](https://github.com/dracutdevs/dracut/commit/b17a3103a516b5a45af954b1e2969a5256fffebc))
#### Performance
* **90kernel-modules:** use awk instead of shell monster ([77ac95d9](https://github.com/dracutdevs/dracut/commit/77ac95d9091afcfdbd1fe0372389613914dd1bc6))
* **dracut-install:**
* convert_abs_rel: don't allocate target parent realpath ([d2648f6d](https://github.com/dracutdevs/dracut/commit/d2648f6dd8277c3d9a0b8d05ca66a212da47070e))
* strdup()+[dirlen]=0 => strndup ([e7d6a1e3](https://github.com/dracutdevs/dracut/commit/e7d6a1e30c34134d27c0ae921b7d18525ddf3dea))
* **dracut.sh:** do not mkdir $initdir/lib/dracut within a loop ([8d46cc01](https://github.com/dracutdevs/dracut/commit/8d46cc01a95afc6902e8c86a795db082622a3c74))
#### Contributors
- Laszlo Gombos <laszlo.gombos@gmail.com>
- Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
- Martin Wilck <mwilck@suse.de>
- Kairui Song <kasong@tencent.com>
- Marcos Mello <marcosfrm@gmail.com>
- наб <nabijaczleweli@nabijaczleweli.xyz>
- David Tardon <dtardon@redhat.com>
- Jóhann B. Guðmundsson <johannbg@gmail.com>
- Matt Coleman <matt@datto.com>
- Pavel Valena <pvalena@redhat.com>
- Alberto Planas <aplanas@suse.com>
- Brian C. Lane <bcl@redhat.com>
- Jonathan Lebon <jonathan@jlebon.com>
- Lukas Nykryn <lnykryn@redhat.com>
- keentux <valentin.lefebvre@suse.com>
- Cole Robinson <crobinso@redhat.com>
- Daan De Meyer <daan.j.demeyer@gmail.com>
- Frederick Grose <4335897+FGrose@users.noreply.github.com>
- Frederick Grose <fgrose@sugarlabs.org>
- Hari Bathini <hbathini@linux.ibm.com>
- Henrik Gombos <henrik99999@gmail.com>
- Jeremy Linton <jlinton@redhat.com>
- Kenneth D'souza <kennethdsouza94@gmail.com>
- Laura Hild <lsh@jlab.org>
- Mike Gilbert <floppym@gentoo.org>
- Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
- Neal Gompa <neal@gompa.dev>
- Scott Moser <smoser@brickies.net>
- Tao Liu <ltao@redhat.com>
- Tianhao Chai <cth451@gmail.com>
- gombi <gombi@>
- joamonwx <unknown>
- runsisi <runsisi@hust.edu.cn>
- tupper <tupper.bob@gmail.com>
dracut-057
==========
#### Bug Fixes
* **10i18n:**
* stop leaking shell options ([f3441cc7](https://github.com/dracutdevs/dracut/commit/f3441cc7c577554dde04a9fe90638f779bb0a411))
* stop leaking shell options ([35064768](https://github.com/dracutdevs/dracut/commit/35064768ebf14d3ec6bf3f7df52580fb4920ea3d))
* **Makefile:** use of potentially unset variable ([1354d633](https://github.com/dracutdevs/dracut/commit/1354d6339a2e603fe0787bc028f9e7e1d49cbf82))
* **bluetooth:**
* accept compressed firmwares in inst_multiple ([09a1e5af](https://github.com/dracutdevs/dracut/commit/09a1e5afd2eaa7f8e9f3beaf8a48283357e7fea0))
* nullglob should not be needed ([36aaa74f](https://github.com/dracutdevs/dracut/commit/36aaa74f3641d375cb435298864fad1945444893))
* make $dbussystem/bluetooth.conf optional ([a38d9ec0](https://github.com/dracutdevs/dracut/commit/a38d9ec0320f3819a3b70dc5bb59f6d2fc570149))
* **configure:** check for SYS-gettid during configure ([0ef40d88](https://github.com/dracutdevs/dracut/commit/0ef40d88124fe67726b8b5d8321dce064c727447))
* **connman:** copy netroot.sh from the network module and install it ([f6d83f9f](https://github.com/dracutdevs/dracut/commit/f6d83f9f5cd4850468f26048f8eed015dc2bd0e0))
* **crypt:** add missing is_keysource parameter to cryptroot-ask ([6c11a8fc](https://github.com/dracutdevs/dracut/commit/6c11a8fcee08c297a34bd5c5215a7a29d3529b85))
* **dmsquash-live:**
* mount live device with the correct type ([08ed7b2d](https://github.com/dracutdevs/dracut/commit/08ed7b2d0035eaa699c139bc9719f90190f6ffc1))
* permanent overlay on the same drive as LiveCD .iso ([9a884b3a](https://github.com/dracutdevs/dracut/commit/9a884b3afce1ebc8c6a6e5f62594ce708486a826))
* **dracut:** default to correct firmware search paths ([95aeed89](https://github.com/dracutdevs/dracut/commit/95aeed8975dd5a2af782ec986f2af6176b585c59))
* **dracut-functions.sh:** correct wrong comment ([0afa840e](https://github.com/dracutdevs/dracut/commit/0afa840e111e63da14edcb655886734b45d61c4b))
* **dracut-initramfs-restore.sh:**
* unpack uncompressed initrd as last option ([46886956](https://github.com/dracutdevs/dracut/commit/46886956211f8a436e2e9f81fc4972d2a297c3a3))
* check if SELINUXTYPE is set ([24d8f35b](https://github.com/dracutdevs/dracut/commit/24d8f35b9c162f42c58abd27fe9c75bbf76cbfe7))
* **dracut-install:**
* copy files preserving ownership attributes ([9ef73b6a](https://github.com/dracutdevs/dracut/commit/9ef73b6ad08c19c3906564e5a15c7908ed9a81c8))
* do not fail when SOURCE is optional and missing ([bd1a5ca9](https://github.com/dracutdevs/dracut/commit/bd1a5ca9ae9e347061e67e51be29335ab074ad95))
* **dracut-systemd:**
* drop misleading man page reference ([77c28b30](https://github.com/dracutdevs/dracut/commit/77c28b3020b7dede848d8282151f609d80905b05))
* correct service dependencies ([85fdff12](https://github.com/dracutdevs/dracut/commit/85fdff1212e708d335f035926f3c2a6b87bb1c3c))
* **dracut.cmdline.7:** {=> must} also be specified ([27071e9a](https://github.com/dracutdevs/dracut/commit/27071e9a0e7928bccc45469eb659cdafb20f134b))
* **dracut.sh:**
* format usage and add missing options ([9bef7109](https://github.com/dracutdevs/dracut/commit/9bef71094eba84a9eac161fc45386ccd73bd2b34))
* always check that MACHINE_ID is not empty ([527fdfa1](https://github.com/dracutdevs/dracut/commit/527fdfa1517b7f010afa049fe6add71e4c916cdd))
* avoid calling dfatal before dracut-logger is sourced ([012d7db2](https://github.com/dracutdevs/dracut/commit/012d7db27da7416471ed49ee2ca666ab95837f47))
* add missing default output file paths ([28ef3bc6](https://github.com/dracutdevs/dracut/commit/28ef3bc6a6f1efcd8d8c16228a6dee9d563342e7))
* add missing --libdirs usage ([352e5917](https://github.com/dracutdevs/dracut/commit/352e59173152f13b242c598a735243f0f2850ff1))
* drop restorecon call ([33859892](https://github.com/dracutdevs/dracut/commit/3385989266ddb1c0685f9f7501f1835e9ce49730))
* error exporting sysctl variables ([4c355d05](https://github.com/dracutdevs/dracut/commit/4c355d05587b0432a6dc551b8693dbdc51a07962))
* **dracut.spec:** add connman module ([d0c6ab21](https://github.com/dracutdevs/dracut/commit/d0c6ab21d906cc5b0e05e1107c48baffcbedb02c))
* **fedora.conf:** vi binary is missing ([48541362](https://github.com/dracutdevs/dracut/commit/485413627f04fdc0c5c29958ce437718b262a99c))
* **github:** remove packit ([8fd37d20](https://github.com/dracutdevs/dracut/commit/8fd37d20f4b7cc08ee0970e0249aac4cd5b47a4e))
* **ifcfg:** avoid calling unavailable dracut-logger functions ([7103c4bc](https://github.com/dracutdevs/dracut/commit/7103c4bce9240d5896a0d207c216e0f6270ad2e8))
* **install:** restore musl support ([ce55a85e](https://github.com/dracutdevs/dracut/commit/ce55a85ed5d902c19d75895508856f96ec2ceb1a))
* **integrity:** do not display any error if there is no IMA certificate ([f63f411d](https://github.com/dracutdevs/dracut/commit/f63f411d52df613936082d646ab072447b8b9d7f))
* **iscsi:**
* do not exit in handle_netroot() if discovery failed ([319dc7fe](https://github.com/dracutdevs/dracut/commit/319dc7fe10585a19d1a051f8ad1ba0190f86ff1f))
* remove unneeded iscsi NOP-disable code ([a33a8df4](https://github.com/dracutdevs/dracut/commit/a33a8df43d33c9bdf85d7a5b7392585129a690f5))
* **kernel-network-modules:** allow specifying empty --hostonly-nics ([ab6f5733](https://github.com/dracutdevs/dracut/commit/ab6f57339ad77b5bc116400f7b66580745bfc563))
* **lsinitrd.sh:**
* always check that MACHINE_ID is not empty ([d6343146](https://github.com/dracutdevs/dracut/commit/d6343146c1db69fc724ca666a5d9321af7fd0d46))
* add missing default paths ([49ea6c42](https://github.com/dracutdevs/dracut/commit/49ea6c42db7180eec5ba57e082a38d116f2d17a5))
* **lvm:**
* add missing grep requirement ([79f9d9e1](https://github.com/dracutdevs/dracut/commit/79f9d9e1c29a9c8fc046ab20765e5bde2aaa3428))
* ignore expected error message from lvm config ([7e03d81f](https://github.com/dracutdevs/dracut/commit/7e03d81fe3df932558d2b7280fa57da24ba955c0))
* **man:**
* add missing default paths ([ffc1985c](https://github.com/dracutdevs/dracut/commit/ffc1985cb26894c50487b7db2703e8715a4a7537))
* add missing --libdirs section ([a90dbd95](https://github.com/dracutdevs/dracut/commit/a90dbd958b19778044047f17559449fffdb94cc2))
* **network-manager:** avoid calling unavailable dracut-logger functions ([b7059aef](https://github.com/dracutdevs/dracut/commit/b7059aef5962aad1dc8d96a0f600105a40867380))
* **nfs:**
* give /run/rpcbind ownership to rpc user ([d6159343](https://github.com/dracutdevs/dracut/commit/d615934311e25146bb37943bf1385a19dfdbd9e8))
* require and install needed binaries ([0e4df7a3](https://github.com/dracutdevs/dracut/commit/0e4df7a39dda388dc71ff6f749c8197cba4442b9))
* **nvmf:**
* deprecate old nvmf cmdline options ([e405501e](https://github.com/dracutdevs/dracut/commit/e405501e23462d151bba252133f4a6179bf79cf0))
* set executable bit on nvmf-autoconnect.sh ([25a92885](https://github.com/dracutdevs/dracut/commit/25a92885a9519701cc480298c2b082e2e2bf5ebe))
* **plymouth:** hide dpkg-architecture stderr messages ([42e9d188](https://github.com/dracutdevs/dracut/commit/42e9d1889298c3d8badfb6f95e16e048ad83a1f6))
* **resume:** correct call to block_is_netdevice function ([a7a4b76c](https://github.com/dracutdevs/dracut/commit/a7a4b76c4ad5794f5f8a24ecd5b495f1512d05f7))
* **shell-completion:** add missing options ([1199f990](https://github.com/dracutdevs/dracut/commit/1199f990bb93b4e6bd56fa3df050b17fc7e6c378))
* **systemd-coredump:** add systemd-sysusers dependency ([ce82e969](https://github.com/dracutdevs/dracut/commit/ce82e969f8faaccbb57be178833ef4e39f01cdf9))
* **systemd-journald:** remove duplicate entry in inst_multiple ([d3ab2061](https://github.com/dracutdevs/dracut/commit/d3ab20615ef94370e43b042d913d5f787dd52430))
* **systemd-timesyncd:** add systemd-sysusers dependency ([28b6adcb](https://github.com/dracutdevs/dracut/commit/28b6adcb27fb5240c01f7d41511ce02597aa27bd))
* **test:**
* dmsquash-live test without an iso ([6ee2baf3](https://github.com/dracutdevs/dracut/commit/6ee2baf314fc6aa3bb88ca52d11c9f599223eb77))
* remove stale comments ([b3ab3037](https://github.com/dracutdevs/dracut/commit/b3ab3037e8b9272498ed40131f30bf1831acab73))
* add support for dpkg to pass the test on debian ([a7dfdf6a](https://github.com/dracutdevs/dracut/commit/a7dfdf6acbf7a87fd2735541f06a062126966f69))
* nullglob should not be needed ([c7b3ac2b](https://github.com/dracutdevs/dracut/commit/c7b3ac2bd115521855b3ad8ce287cb1a9afca128))
* **udev-rules:** add cdrom udev rules by default ([aebeb2ec](https://github.com/dracutdevs/dracut/commit/aebeb2ecdf76b7716fadbab8b216b8805d36a461))
#### Features
* add aarch64 uefi support ([8391a993](https://github.com/dracutdevs/dracut/commit/8391a993033e212a24635dd629c167354f0834f8))
* **connman:** introduce connman support module ([f30d0351](https://github.com/dracutdevs/dracut/commit/f30d03513f357a36d2ed48a522c7ef2a46bb0c5c))
* **dracut:**
* support parallel execution with --parallel ([6d923262](https://github.com/dracutdevs/dracut/commit/6d92326201014cde9ab04b90367017f875d3b991))
* add zfs detection ([9582f027](https://github.com/dracutdevs/dracut/commit/9582f02773c5115e14fe0992ec2db3935cb0e6eb))
* **dracut-install:** support ZSTD-compressed firmware with .zst suffix ([9d8387ed](https://github.com/dracutdevs/dracut/commit/ 9d8387ed803dfc3e8b97d2e415a15083774d7ac6))
* **dracut-systemd:** use Documentation= to point to man page ([42e8f17c](https://github.com/dracutdevs/dracut/commit/ 42e8f17c2481d33a3d6ba23f653c835e0cda6994))
* **gensplash:** remove module ([1befc641](https://github.com/dracutdevs/dracut/commit/1befc6416743a527824f0f2cc25471e86a6f8a79))
* **lvm:** add new module lvmthinpool-monitor ([d9812fc4](https://github.com/dracutdevs/dracut/commit/d9812fc4ae18a39c144140dd60cb03e16e0d2e06))
* **man:** add documentation for rd.luks.key.tout ([65e41b54](https://github.com/dracutdevs/dracut/commit/65e41b54600878e3e08bbe3b60f66524e1d166a8))
* **squash:**
* add shell completion for --squash-compressor option ([e2aee2d4](https://github.com/dracutdevs/dracut/commit/e2aee2d436cf68c4515a381d620a963ff18dcf05))
* update the manual page for --squash-compressor ([3693bfef](https://github.com/dracutdevs/dracut/commit/3693bfef2fc252f5a4b18278c87a1076896b7fb5))
* decouple the compressor for dracut and dracut-squash ([90d9ae8c](https://github.com/dracutdevs/dracut/commit/90d9ae8ca814c26045ecea63fa15bd8959076d0d))
* **url-lib.sh:** add --retry-connrefused to default curl arguments ([90032a46](https://github.com/dracutdevs/dracut/commit/ 90032a463190ab68f20f493894f667320466082d))
* **virtiofs:** virtiofs root filesystem support ([4632f799](https://github.com/dracutdevs/dracut/commit/4632f799954c18eb8f655efe05b1e6ce30246828))
#### Contributors
- Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
- Laszlo Gombos <laszlo.gombos@gmail.com>
- Pavel Valena <pvalena@redhat.com>
- David Tardon <dtardon@redhat.com>
- Tao Liu <ltao@redhat.com>
- наб <nabijaczleweli@nabijaczleweli.xyz>
- German Maglione <gmaglione@redhat.com>
- Jóhann B. Guðmundsson <johannbg@gmail.com>
- Nicolas Porcel <nicolasporcel06@gmail.com>
- Zoltán Böszörményi <zboszor@gmail.com>
- nkraetzschmar <nkraetzschmar@users.noreply.github.com>
- Benjamin Gilbert <bgilbert@redhat.com>
- Coiby Xu <coxu@redhat.com>
- Conrad Hoffmann <ch@bitfehler.net>
- David Teigland <teigland@redhat.com>
- James Morris <morisja@gmail.com>
- Lee Duncan <lduncan@suse.com>
- Martin Wilck <mwilck@suse.de>
- Masahiro Matsuya <mmatsuya@redhat.com>
- Michal Hecko <mhecko@redhat.com>
- Morten Linderud <morten@linderud.pw>
- Savyasachee Jha <genghizkhan91@hawkradius.com>
- Shreenidhi Shedi <sshedi@vmware.com>
- Wenchao Hao <haowenchao@huawei.com>
dracut-056
==========
#### Bug Fixes
* **base:**
* do not change the provided UUID ([4e858741](https://github.com/dracutdevs/dracut/commit/4e858741087a5cfea891bd2c1fd51ea9b830aeaf))
* add default device choice ([e8c18c9f](https://github.com/dracutdevs/dracut/commit/e8c18c9f7f5ed94898f70e9ff5a5f94a815a2b49))
* tr needs to be installed ([dfbfd33b](https://github.com/dracutdevs/dracut/commit/dfbfd33b24524c0c10ad3594be143192f5b7da84))
* do not quote $initargs for switch_root ([f649cd10](https://github.com/dracutdevs/dracut/commit/f649cd10b2e920e9d65c532db9b9f89a7370ad99))
* repair installing dracut-util ([d7acf107](https://github.com/dracutdevs/dracut/commit/d7acf107f2ac619f73dfa29588ea9adfaf79e296))
* **bluetooth:**
* make hostonly configuration files optional ([d03fb675](https://github.com/dracutdevs/dracut/commit/d03fb675d8e904c6c44de9b91814b33c45043f4f))
* dbus configuration path fixes ([34b1dd2e](https://github.com/dracutdevs/dracut/commit/34b1dd2e26c343e9000094db01a7985b6851adf1))
* **cms:** reload NetworkManager connections ([07977ee5](https://github.com/dracutdevs/dracut/commit/07977ee5c5294a5d30c1f33f292a0b31303750fb))
* **cpio:**
* correct dev_t -> rmajor/rminor mapping ([acc629ab](https://github.com/dracutdevs/dracut/commit/acc629abb0d7a26f692f99e5a9cf8c8401bc6a86))
* write zeros instead of seek for padding and alignment ([0af11c5e](https://github.com/dracutdevs/dracut/commit/0af11c5ea5018a3e1049a2207a9a671049651876))
* **crypt:** remove quotes from cryptsetupopts ([e0abf88a](https://github.com/dracutdevs/dracut/commit/e0abf88a15d23fbf793cf872397016ad86aeaaa8), closes [#1528](https://github.com/dracutdevs/dracut/issues/1528))
* **crypt-gpg:**
* tr needs to be installed ([a93fbc4a](https://github.com/dracutdevs/dracut/commit/a93fbc4ae00d8c6ecda67319a6425f7966609bbe))
* execute --card-status on each try ([66100936](https://github.com/dracutdevs/dracut/commit/6610093698db25fda1d584b9771da1e2c2330095))
* **dasd_rules:**
* correct udev dasd rules parsing ([5de6e4d5](https://github.com/dracutdevs/dracut/commit/5de6e4d56e5206cb47f645ad1cb6d39794048c68))
* remove collect based udev rule creators ([ebafbd82](https://github.com/dracutdevs/dracut/commit/ebafbd824175e201ae9476576588a896c6b7d7eb))
* **dmsquash-live:**
* option to use overlayfs on a block device root ([813577e2](https://github.com/dracutdevs/dracut/commit/813577e2ba034b448d2cf2d2857b2d20d56c0259))
* do not install systemd files when systemd is not enabled ([bf8738d3](https://github.com/dracutdevs/dracut/commit/bf8738d31ca53ad6410c46c1f9b2a4a12273b9a3))
* iso-scan requires rmdir ([e19e3890](https://github.com/dracutdevs/dracut/commit/e19e38904c054664473207d2d6ef3c53bd938867))
* correct regression introduced with shellcheck changes ([0c631efb](https://github.com/dracutdevs/dracut/commit/0c631efb10bf4ce18ec8640277bd94712950298a))
* **dmsquash-live-ntfs:** fuse3 no longer requires ulockmgr_server ([75ad2699](https://github.com/dracutdevs/dracut/commit/75ad269931eccd266a5d60ba4000d93655143e00))
* **dracut:** be more robust when using 'set -u' ([22a80629](https://github.com/dracutdevs/dracut/commit/22a80629b4bbcef02eb8fe3611ea44e253ef4c61))
* **dracut-functions.sh:**
* ip route parsing ([d754e1c6](https://github.com/dracutdevs/dracut/commit/d754e1c6f081a6501cb7fdcb5caaa6c4977235af))
* get block device driver if in a virtual subsystem ([dc3b976f](https://github.com/dracutdevs/dracut/commit/dc3b976f3393d7a3fb75b349418fc8ee2c9142bd))
* **dracut-init:** unbreak a comment ([bc4f196f](https://github.com/dracutdevs/dracut/commit/bc4f196f9825029eaef7ccf525ec57f5229b2793))
* **dracut-initramfs-restore.sh:**
* add missing compression options ([e86397de](https://github.com/dracutdevs/dracut/commit/e86397de24f4efa6d36e2bb5ae84b7d9ec69b72d))
* add missing default paths ([3d8e1ad2](https://github.com/dracutdevs/dracut/commit/3d8e1ad2ae1e34244ddf700beea6358c1452e05c), closes [#1628](https://github.com/dracutdevs/dracut/issues/1628))
* **dracut-install:** tweaks to get_real_file() ([1beeaf3b](https://github.com/dracutdevs/dracut/commit/1beeaf3b71aed763d5fc7a9ee044d675f8906e8c))
* **dracut-shutdown:** add cleanup handler on failure ([7ab1d002](https://github.com/dracutdevs/dracut/commit/7ab1d00227cad6f1b86ba01fdc766769faebb031))
* **dracut-systemd:** do not use Requires for vconsole-setup.service ([a7f5429c](https://github.com/dracutdevs/dracut/commit/a7f5429cb81f7ffdf9bd5684af8d36725170b756))
* **dracut.sh:**
* do not ignore invalid config file or dir path ([7de9ffc0](https://github.com/dracutdevs/dracut/commit/7de9ffc0574790ecbad74b5a000ecd022d7736d4))
* check kernel zstd support early ([475497b1](https://github.com/dracutdevs/dracut/commit/475497b1bd12c006c782541124b6427cb7ef4cb7))
* check availability of configured compression ([bdac657b](https://github.com/dracutdevs/dracut/commit/bdac657bf65615438942a872491a818750735014))
* inform user about auto-selected compression method ([06d47ded](https://github.com/dracutdevs/dracut/commit/06d47ded679231e1370cc655c1df408fc865baac))
* drop pointless check for module compression method ([586d3e76](https://github.com/dracutdevs/dracut/commit/586d3e7664c00bf144becfa69dde2dbab8711d51))
* change misspelled variable name ([acfd97a9](https://github.com/dracutdevs/dracut/commit/acfd97a94385c33cd6cef4e5a37f233ea4081288))
* remove wrong $ in loop sequence ([f1245b5b](https://github.com/dracutdevs/dracut/commit/f1245b5bc13a98ef0dcc679dcef6148214e09503))
* handle symlinks appropriately while using '-i' option ([c7fbc0c8](https://github.com/dracutdevs/dracut/commit/c7fbc0c8901917baf0d1f0822568e65c6ec00d18))
* handle '-i' option to include files beginning with '.' ([f1138012](https://github.com/dracutdevs/dracut/commit/f1138012c9dc44e6614466c0a8e929fc55e4a5dd))
* **drm:** add privacy screen modules to the initrd ([14d97a6a](https://github.com/dracutdevs/dracut/commit/14d97a6a28c6172340c47c89374358aaf4e2629d))
* **fedora.conf.example:** rename misspelled variable ([9371dcab](https://github.com/dracutdevs/dracut/commit/9371dcaba3c58377428eee44bd702fae7b2ab20e))
* **fido2:** add a missing library ([4753738b](https://github.com/dracutdevs/dracut/commit/4753738b62d958955f50fb077ea21c56a8d23dc3))
* **fips:**
* missing sourcing of dracut-lib ([857b17f0](https://github.com/dracutdevs/dracut/commit/857b17f090bdf575292f0bd6f5e8e3d753f6b426))
* add and remove local variables ([e8121bfd](https://github.com/dracutdevs/dracut/commit/e8121bfddda34e20db889a74d4ac6259ed182aea))
* wrong error message ([7f10c483](https://github.com/dracutdevs/dracut/commit/7f10c483b6abcc8be42cf246bbdade264be68228))
* handle s390x OSTree systems ([78557f05](https://github.com/dracutdevs/dracut/commit/78557f05a69fe718a97df85d2ed741ce10d3f806))
* **fips.sh:** repsect rd.fips.skipkernel ([5789abcb](https://github.com/dracutdevs/dracut/commit/5789abcbe05f30d556086590b786c4857d025d9d))
* **img-lib:** install rmdir ([51ce8893](https://github.com/dracutdevs/dracut/commit/51ce8893d981e90640123a7dcc3e4f3621e7d819))
* **install:**
* segfault on popen error ([5c2f72f1](https://github.com/dracutdevs/dracut/commit/5c2f72f152ec319a8001d1ff0bfd1f81a9130b04))
* extend hwcaps library handling to libraries under glibc-hwcaps/ ([10ed204f](https://github.com/dracutdevs/dracut/commit/10ed204f873f454dcd15ffcc82dc3a1c781c1514))
* use size_t to avoid -Wsign-compare warning ([55468a2d](https://github.com/dracutdevs/dracut/commit/55468a2d40182de4cce5ba4ecd5dcd96be03bd4d))
* improve gettid definition ([ef0f848a](https://github.com/dracutdevs/dracut/commit/ef0f848a67fdd0a0dab135acbd1cd7fa0179a95c))
* validate return values log.c ([19537f89](https://github.com/dracutdevs/dracut/commit/19537f8943ac4106c6d4ab0e00a48a8c0a9a0519))
* rectify unused function args in log.c ([b5cf7ec7](https://github.com/dracutdevs/dracut/commit/b5cf7ec784335ec561e379f8e78f48019a344ac0))
* use wrapper for asprintf ([e2a61595](https://github.com/dracutdevs/dracut/commit/e2a61595d2c91202ff4ea69937064cd2c0d1f336))
* use unsigned int instead of unsigned ([74a41799](https://github.com/dracutdevs/dracut/commit/74a417994840f7a6119e2dee57f9a3bb4d84998b))
* reduce cppcheck warnings ([b0bf8187](https://github.com/dracutdevs/dracut/commit/b0bf8187d5cc51d5576d8d70a81677d7c9741b37))
* add a missing ret value assignment ([6a444261](https://github.com/dracutdevs/dracut/commit/6a44426162d5b1b7084b17f921799863d353f847))
* **integrity:** add support for loading multiple EVM x509 certs ([9da76af8](https://github.com/dracutdevs/dracut/commit/9da76af8e7f0f7a939b2ee44f0b4a5ce0bdd3b0b))
* **iscsi:** add support for the new iscsiadm "no-wait" (-W) command ([7374943a](https://github.com/dracutdevs/dracut/commit/7374943ae3d063f0142c969b132c4156030fda8b))
* **kernel-modules:**
* add mailbox drivers for arm ([0e80ff72](https://github.com/dracutdevs/dracut/commit/0e80ff72e01d28e7e92d3adbf98ec40bdbdc37fe))
* detect block device's hardware driver ([c86f4d28](https://github.com/dracutdevs/dracut/commit/c86f4d286000d1e76fd405560b4114537e2cbbff))
* add blk_mq_alloc_disk and blk_cleanup_disk to blockfuncs ([b292ce72](https://github.com/dracutdevs/dracut/commit/b292ce7295f18192124e64e5ec31161d09492160))
* add more modules on RISC-V ([3cc9f1c1](https://github.com/dracutdevs/dracut/commit/3cc9f1c10c67dcdb5254e0eb69f19e9ab22abf20))
* add isp1760 USB controller ([15398458](https://github.com/dracutdevs/dracut/commit/15398458685d376fef56b1bf6fe09ae7c68324c1))
* add Type-C USB drivers for generic initrd ([a1287c62](https://github.com/dracutdevs/dracut/commit/a1287c627f28b16b1b066b7c256549b832bd98de))
* **kernel-modules-extra:** handle zstd module extension ([b3d2dcb7](https://github.com/dracutdevs/dracut/commit/b3d2dcb71e7af8f605f5f66041ed3c801333e5f1))
* **lvm:**
* restore setting LVM_MD_PV_ACTIVATED ([164e5ebb](https://github.com/dracutdevs/dracut/commit/164e5ebb1199ea3e3d641ce402d8257f0055a529))
* replace --partial option ([97543cca](https://github.com/dracutdevs/dracut/commit/97543cca48dfde849396f11c83f9c320e1b91c46))
* **man:** default value of rd.retry was increased to 180 seconds ([4855242c](https://github.com/dracutdevs/dracut/commit/4855242ce5cb586afd2eebd91df57ce1d28ae6b5))
* **mdraid:** allow UUID comparison for more than one UUID ([d364ce83](https://github.com/dracutdevs/dracut/commit/d364ce8334fef96f48492bd0fb3b7deac37bbb66))
* **memstrack:** drop bash runtime requirement ([35822f39](https://github.com/dracutdevs/dracut/commit/35822f39970b369301e0ff54436d5714dd996896))
* **mksh:** requires printf ([f806a628](https://github.com/dracutdevs/dracut/commit/f806a628aa9aec548e425e81b6ea4ab6f5db26f6))
* **multipath:**
* check if mpathconf is available ([4318533e](https://github.com/dracutdevs/dracut/commit/4318533e1493bfab622b64efc1b799426c812c26))
* drop ExecStop= setting from service unit ([9491e599](https://github.com/dracutdevs/dracut/commit/9491e599282d0d6bb12063eddbd192c0d2ce8acf))
* get config. dir from configuration ([2e3c5444](https://github.com/dracutdevs/dracut/commit/2e3c5444d271cb8f05955858b8fdc367c4ea5c48))
* **multipathd.service:**
* drop dependencies on iscsi and iscsid ([6246da40](https://github.com/dracutdevs/dracut/commit/6246da400fa7f527a1ff1c620bf85ac9f6644508))
* adapt to upstream multipath-tools unit file ([a247d2bc](https://github.com/dracutdevs/dracut/commit/a247d2bc0d4c6d37a2ea4f3da98dd7902bb37385))
* remove dependency on systemd-udev-settle ([371b338a](https://github.com/dracutdevs/dracut/commit/371b338a5f19d40ff4c3216dc0f27f9a00cf4e22))
* **network:**
* consistent use of "$gw" for gateway ([3f2c76bb](https://github.com/dracutdevs/dracut/commit/3f2c76bb1456941a28d3333569d2bf18f8624617))
* wrong test of wicked unit ([22e68307](https://github.com/dracutdevs/dracut/commit/22e683077a686b592da55e1d247b31f65c95d481))
* add errors and warnings when network interface does not exist ([79389352](https://github.com/dracutdevs/dracut/commit/7938935267dd8824f074adf84c219340ad4c8db6))
* **network-manager:**
* skip non-directories in /sys/class/net ([d9c3c774](https://github.com/dracutdevs/dracut/commit/d9c3c77437d91d7d66369a3ef701ffc5e501346d))
* disable tty output if the console is not usable ([f6e6be24](https://github.com/dracutdevs/dracut/commit/f6e6be245d0cda14d90a0442b688c8dca1410a2e))
* show output on console only with rd.debug enabled ([e07b7ad0](https://github.com/dracutdevs/dracut/commit/e07b7ad0e7f5dbb8024336f3075610b3b74ffb2e))
* write DHCP filename option to dhcpopts file ([38320fce](https://github.com/dracutdevs/dracut/commit/38320fce56a8d83b79d6c970c491a454ba9de213))
* check for nm-initrd-generator in both /usr/{libexec,lib} ([5ee7e249](https://github.com/dracutdevs/dracut/commit/5ee7e249b8cc74461122ccd7efe954b3402c23da))
* ensure safe content of /tmp/dhclient."$ifname".dhcpopts ([e509c638](https://github.com/dracutdevs/dracut/commit/e509c638e68a8e3cae446d1a4f9f86e3aa6e7a99))
* include nm-daemon-helper binary ([0e590531](https://github.com/dracutdevs/dracut/commit/0e5905315e92dfc095f543fd73db6190db533217))
* don't pull in systemd-udev-settle ([a0f12fb6](https://github.com/dracutdevs/dracut/commit/a0f12fb6a09b09f35ab28753d7c4461c10a8b562))
* support teaming under NM+systemd ([a97d2ced](https://github.com/dracutdevs/dracut/commit/a97d2cedcf65a9a2fbff2591171f0163c7d3cb46))
* pull in network.target in nm-initrd.service ([a97d6e2b](https://github.com/dracutdevs/dracut/commit/a97d6e2b13146783831b166ec5e8b33b29c514b0))
* **network-wicked:** multiple path corrections ([d3b5bc17](https://github.com/dracutdevs/dracut/commit/d3b5bc17ebadfe8922d1144b3dfd5435d0ecc71a))
* **nvmf:** validate_ip_conn ([655c65e6](https://github.com/dracutdevs/dracut/commit/655c65e6ced00e7a80c41e96c5f6fe108da07839))
* **qeth_rules:** check the existence of /sys/devices/qeth/*/online beforehand ([6c71ba41](https://github.com/dracutdevs/dracut/commit/6c71ba4121ae64ccd13fefba68ca327ac623810f))
* **resume:**
* resume using /usr/lib64/suspend ([c4593734](https://github.com/dracutdevs/dracut/commit/c459373448d24760d15e22fde7c6f811c7891376))
* check for presence of /sys/power/resume ([0b977906](https://github.com/dracutdevs/dracut/commit/0b97790626bff3579755b38f78a9c524a075cfcc))
* **rootfs-block:** make the base module dependency explicit ([3326e4c9](https://github.com/dracutdevs/dracut/commit/3326e4c957d0499495d9e91182fc574b960ace86))
* **s390_rules:** drop collect installation ([f905c3a7](https://github.com/dracutdevs/dracut/commit/f905c3a72c975cf6006f266755cc91229132c739))
* **shutdown:** be robust against forced shutdown ([b9ba3c8b](https://github.com/dracutdevs/dracut/commit/b9ba3c8bb8f0f1328cd1ffaa8dbf64585b28c474))
* **skipcpio:**
* calculate and use CPIO_MAGIC_LEN ([3fb8723c](https://github.com/dracutdevs/dracut/commit/3fb8723ce0066b4ba92f6dbfc4373a66d1f551c4))
* improve error checking ([f6d16b6b](https://github.com/dracutdevs/dracut/commit/f6d16b6bbd5b8b7ac238c3d2148bebf4e91140a2))
* **squash:**
* apply FIPS and libpthread workaround ([5ab18dee](https://github.com/dracutdevs/dracut/commit/5ab18dee996f0eeb2b0bfe354570e1b1af46d025))
* remove tailing '/' when installing ld.so.conf.d ([cbd85597](https://github.com/dracutdevs/dracut/commit/cbd85597e3ed6abf64ac17f431da5477eb5aefa0))
* keep ld cache under initdir ([dc21638c](https://github.com/dracutdevs/dracut/commit/dc21638c3f0acbb54417f3bfb6294ad5514bf2db))
* create relative symlinks ([a2b6be44](https://github.com/dracutdevs/dracut/commit/a2b6be44792b68218e3378a7d844b0f8527a4805))
* **systemd-sysusers:**
* use split systemd sysuser configs ([fec93bb2](https://github.com/dracutdevs/dracut/commit/fec93bb22181f80056b40231fca36c422248ade0))
* override systemd-sysusers.service ([dcbe23c1](https://github.com/dracutdevs/dracut/commit/dcbe23c14d13ca335ad327b7bb985071ca442f12))
* **tpm2-tss:**
* add a missing library ([c656b612](https://github.com/dracutdevs/dracut/commit/c656b612b101e4834e01f9841162e2629a7272f7))
* typo in depends() ([8b17105b](https://github.com/dracutdevs/dracut/commit/8b17105bed69ed90582a13d97d95ee19e6581365))
* **url-lib:**
* SC2086: Double quote to prevent globbing and word splitting ([acb18869](https://github.com/dracutdevs/dracut/commit/acb18869e98687a3f8c172d7e7befaa5326cf67a))
* SC2046: Quote this to prevent word splitting ([ec50cec3](https://github.com/dracutdevs/dracut/commit/ec50cec3bd9169410df409e077d0487c63c2a627))
* improve ca-bundle detection ([e3bb1815](https://github.com/dracutdevs/dracut/commit/e3bb1815bbbff1a7e21b857d2ae32bc0410754d5))
* make pre-pivot hook separetely per nfs mount ([2f091b17](https://github.com/dracutdevs/dracut/commit/2f091b17075f81ff490b05d3d566d736fc32f0be))
* **usrmount:** do not empty _dev variable ([4afdcba2](https://github.com/dracutdevs/dracut/commit/4afdcba212793f136aea012b30dd7bdb5b641a5a))
* **zfcp_rules:**
* correct udev zfcp rules parsing ([59252668](https://github.com/dracutdevs/dracut/commit/5925266832042f9d17a3fb7a219b83118c5b16d6))
* remove collect based udev rule creators ([d40c49a8](https://github.com/dracutdevs/dracut/commit/d40c49a8dfe203be33af8ace5f0efd07a88856f4))
#### Features
* **Makefile:** cargo wrapper for dracut-cpio build ([51d21c6b](https://github.com/dracutdevs/dracut/commit/51d21c6b37b0eb8566d18d665d0197ca4d68101c))
* **cpio:**
* add newc archive creation utility ([a9c67046](https://github.com/dracutdevs/dracut/commit/a9c67046431ccf5fd4f4c16c890695df388f0d38))
* add rust argument parsing library from crosvm ([94fc5026](https://github.com/dracutdevs/dracut/commit/94fc50262f5e6c28d92782dc231fbb6c61855954))
* **crypt:**
* check if pkcs11 module is needed in hostonly mode ([56f4fb6c](https://github.com/dracutdevs/dracut/commit/56f4fb6cb755327c77c32f8c414a4a0e64fc933c))
* check if fido2 module is needed in hostonly mode ([d5fd030c](https://github.com/dracutdevs/dracut/commit/d5fd030cc285730e1a1b9e0e78a1e1dc4daabfe0))
* check if tpm2-tss module is needed in hostonly mode ([5d990a00](https://github.com/dracutdevs/dracut/commit/5d990a004b5ae6863f2c9a633b184c07dd73563d))
* **dracut.sh:**
* add --aggresive-strip option ([67fc670a](https://github.com/dracutdevs/dracut/commit/67fc670a88ab6c97d22c6718082619c0cf850fc3))
* add "--enhanced-cpio" option for calling dracut-cpio ([afe4a6db](https://github.com/dracutdevs/dracut/commit/afe4a6dbb7df62982baab8212bba5d90010dfbac))
* check if target kernel has zstd support compiled in ([591118c5](https://github.com/dracutdevs/dracut/commit/591118c56da2bfcea060e3b7671bc87b23c0e44a))
* **fido2:** introducing the fido2 module ([049973b7](https://github.com/dracutdevs/dracut/commit/049973b708298ea0ce1ac9c869b404f4c718eff3))
* **lvm:**
* only run lvchange for LV that is seen on devices ([1af46743](https://github.com/dracutdevs/dracut/commit/1af46743195422aaebcde5c508a5dd479eff51ea))
* use generated filter when none is set ([7ffc5e38](https://github.com/dracutdevs/dracut/commit/7ffc5e388bcce20785803825bdd260c3c854b34f))
* update lvm command options ([c0a54f29](https://github.com/dracutdevs/dracut/commit/c0a54f2993b1d3c2101202c274a41f925445d54b))
* **pcsc:** introducing the pcsc module ([dcaff88a](https://github.com/dracutdevs/dracut/commit/dcaff88ac942042e3db0a2bbfc1c995ec0735f38))
* **pkcs11:**
* include the module in the spec file ([c5907f82](https://github.com/dracutdevs/dracut/commit/c5907f82d835d72e4dd7c473a86e872fce37d61e))
* introducing the pkcs11 module ([83ea8cf0](https://github.com/dracutdevs/dracut/commit/83ea8cf001a49356cf7814b3c08bdd1c4b4f2763))
* **spec:** add systemd-integritysetup module ([fe8df024](https://github.com/dracutdevs/dracut/commit/fe8df0240a24b9d2d60a5b0b998f82b251ede849))
* **squash:** install umount util ([563f5434](https://github.com/dracutdevs/dracut/commit/563f543424c66bf38e6cbd3f489655d45ad9b5c5))
* **systemd:** enable support for systemd compiled with ASAN ([d502d2a8](https://github.com/dracutdevs/dracut/commit/d502d2a816ba8f8329b3d8616bd2a7e82a0ad21f))
* **systemd-integritysetup:** introducing the systemd-integritysetup module ([33cf47a6](https://github.com/dracutdevs/dracut/commit/33cf47a60870cc290bd5b59c9cf87c54ad37051f))
#### Contributors
- Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
- David Disseldorp <ddiss@suse.de>
- Martin Wilck <mwilck@suse.de>
- Jóhann B. Guðmundsson <johannbg@gmail.com>
- Shreenidhi Shedi <sshedi@vmware.com>
- David Teigland <teigland@redhat.com>
- Beniamino Galvani <bgalvani@redhat.com>
- Thomas Blume <thomas.blume@suse.com>
- Kairui Song <kasong@redhat.com>
- Laszlo Gombos <laszlo.gombos@gmail.com>
- Renaud Métrich <rmetrich@redhat.com>
- Dusty Mabe <dusty@dustymabe.com>
- Masahiro Matsuya <mmatsuya@redhat.com>
- Alexander Wenzel <alexander.wenzel@qbeyond.de>
- Andre Russ <andre.russ@sap.com>
- Cornelius Hoffmann <coding@hoffmn.de>
- David Tardon <dtardon@redhat.com>
- Frantisek Sumsal <frantisek@sumsal.cz>
- Harald Hoyer <harald@profian.com>
- José María Fernández <josemariafg@gmail.com>
- Kairui Song <kasong@tencent.com>
- Peter Robinson <pbrobinson@fedoraproject.org>
- Pingfan Liu <piliu@redhat.com>
- Tony Asleson <tasleson@redhat.com>
- Zoltán Böszörményi <zboszor@gmail.com>
- Adrien Thierry <athierry@redhat.com>
- Alexander Tsoy <alexander@tsoy.me>
- Andreas Schwab <schwab@suse.de>
- Andrey Sokolov <keremet@altlinux.org>
- Brandon Sloane <btsloane@verizon.net>
- Charles Rose <charles.rose@dell.com>
- Coiby Xu <coxu@redhat.com>
- Dan Horák <dhorak@redhat.com>
- Dirk Müller <dirk@dmllr.de>
- Glenn Morris <rgm@stanford.edu>
- Hans de Goede <hdegoede@redhat.com>
- Hari Bathini <hbathini@linux.ibm.com>
- Henrik Gombos <henrik99999@gmail.com>
- Jonathan Lebon <jonathan@jlebon.com>
- LinkTed <link.ted@mailbox.org>
- Lubomir Rintel <lkundrak@v3.sk>
- Luca BRUNO <luca.bruno@coreos.com>
- Lukas Nykryn <lnykryn@redhat.com>
- Matthias Berndt <matthias_berndt@gmx.de>
- Mike Gilbert <floppym@gentoo.org>
- Pavel Valena <pvalena@redhat.com>
- Stefan Berger <stefanb@linux.ibm.com>
- Thomas Haller <thaller@redhat.com>
- Tomasz Paweł Gajc <tpgxyz@gmail.com>
- Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
- joshuacov1 <joshuacov@gmail.com>
- lapseofreason <lapseofreason0@gmail.com>
dracut-055
==========
#### Bug Fixes
* **base:**
* add missing `str_replace` to `dracut-dev-lib.sh` ([148e420b](https://github.com/dracutdevs/dracut/commit/148e420be5b5809aa8d5033f47477573bbbf3e60))
* split out `dracut-dev-lib.sh` ([c08bc810](https://github.com/dracutdevs/dracut/commit/c08bc8109d4c43beacfa4bcdc20a356102da6d02))
* **bash:** minor cleanups ([9355cb8e](https://github.com/dracutdevs/dracut/commit/9355cb8ea5024533210067373657dc337d63ecb9))
* **dash:** minor cleanups ([f4ea5f87](https://github.com/dracutdevs/dracut/commit/f4ea5f8734c4636f7d6db78da76e9525beb9a0ac))
* **dracut:** pipe hardlink output to `dinfo` ([0a6007bf](https://github.com/dracutdevs/dracut/commit/0a6007bf4f472565d2c0c205a56edea7ba3e3bc3))
* **dracut-functions:** get_maj_min without get_maj_min_cache_file set ([a277a5fc](https://github.com/dracutdevs/dracut/commit/a277a5fc7acc0a9e8d853f09671495f9d27645c1))
* **dracut-util:** print error message with trailing newline ([b9b6f0ee](https://github.com/dracutdevs/dracut/commit/b9b6f0ee5b859a562e46a8c4e0dee0261fabf74d))
* **fs-lib:** install fsck utilities ([12beeac7](https://github.com/dracutdevs/dracut/commit/12beeac741e4429146a674ef4ea9aa0bac10364b))
* **install:**
* configure logging earlier ([5eb24aa2](https://github.com/dracutdevs/dracut/commit/5eb24aa21d3ee639f869c2e363b3fb0b98be552b))
* sane default --kerneldir ([c1ab3613](https://github.com/dracutdevs/dracut/commit/c1ab36139d416e580e768c29f2addf7ccbc2c612), closes [#1505](https://github.com/dracutdevs/dracut/issues/1505))
* **integrity:** require ALLOW_METADATA_WRITES to come from EVM config file ([b12d91c4](https://github.com/dracutdevs/dracut/commit/b12d91c431220488fecf7b4be82427e3560560cb))
* **mksh:** minor cleanups ([6c673298](https://github.com/dracutdevs/dracut/commit/6c673298f36990665467564e6114c9ca2530f584))
* **squash:** don't mount the mount points if already mounted ([636d6df3](https://github.com/dracutdevs/dracut/commit/636d6df3134dde1dac72241937724bc59deb9303))
* **warpclock:** minor cleanups ([7d205598](https://github.com/dracutdevs/dracut/commit/7d205598c6a500b58b4d328e824d0446276f7ced))
#### Features
* **dracut.sh:** detect running in a container ([7275c6f6](https://github.com/dracutdevs/dracut/commit/7275c6f6a0f6808cd939ea5bdf1244c7bd13ba44))
* **install:** add default value for --firmwaredirs ([4cb086fa](https://github.com/dracutdevs/dracut/commit/4cb086fa2995799b95c0b25bc9a0cf72ba3868ea))
#### Contributors
- Harald Hoyer <harald@redhat.com>
- Jóhann B. Guðmundsson <johannbg@gmail.com>
- Marcos Mello <marcosfrm@gmail.com>
- Kairui Song <kasong@redhat.com>
- Lars Wendler <polynomial-c@gentoo.org>
- Stefan Berger <stefanb@linux.ibm.com>
- Tomasz Paweł Gajc <tpgxyz@gmail.com>
dracut-054
==========

View File

@@ -3,10 +3,7 @@ dracut
dracut is an event driven initramfs infrastructure.
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](.github/CODE_OF_CONDUCT.md)
[![Fedora-32](https://github.com/dracutdevs/dracut/workflows/Fedora-32/badge.svg?branch=master)](https://github.com/dracutdevs/dracut/actions?query=workflow%3AFedora-32)
[![Fedora-33](https://github.com/dracutdevs/dracut/workflows/Fedora-33/badge.svg?branch=master)](https://github.com/dracutdevs/dracut/actions?query=workflow%3AFedora-33)
[![Fedora-latest](https://github.com/dracutdevs/dracut/workflows/Fedora-latest/badge.svg?branch=master)](https://github.com/dracutdevs/dracut/actions?query=workflow%3AFedora-latest)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](docs/CODE_OF_CONDUCT.md)
dracut (the tool) is used to create an initramfs image by copying tools
and files from an installed system and combining it with the
@@ -29,23 +26,21 @@ specific functionality into the initramfs. They live in the modules.d
subdirectory, and use functionality provided by dracut-functions to do their
work.
Currently dracut lives on github.com and kernel.org.
Documentation:
- [Introduction](man/dracut.asc)
- [User Manual](man/dracut.usage.asc)
The tarballs can be found here:
http://www.kernel.org/pub/linux/utils/boot/dracut/
ftp://ftp.kernel.org/pub/linux/utils/boot/dracut/
Currently dracut is developed on [github.com](https://github.com/dracutdevs/dracut).
Git:
https://github.com/dracutdevs/dracut.git
http://git.kernel.org/?p=boot/dracut/dracut.git
The release tarballs are [here](https://github.com/dracutdevs/dracut/releases).
Project Documentation:
http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
Gitter (chat):
- https://gitter.im/dracutdevs/Lobby
Project Wiki:
http://dracut.wiki.kernel.org
See [News](NEWS.md) for information about changes in the releases and
the [Wiki](https://github.com/dracutdevs/dracut/wiki) to share information.
See the github issue tracker for things which still need to be done and HACKING.md
See the github issue tracker for things which still need to be done and [Hacking](docs/HACKING.md)
for some instructions on how to get started. There is also a mailing list
that is being used for the discussion -- initramfs@vger.kernel.org.
It is a typical vger list, send mail to majordomo@vger.kernel.org with body

38
configure vendored
View File

@@ -6,6 +6,7 @@ echo \#buildapi-variable-no-builddir > /dev/null
prefix=/usr
enable_documentation=yes
enable_dracut_cpio=no
CC="${CC:-cc}"
PKG_CONFIG="${PKG_CONFIG:-pkg-config}"
@@ -48,6 +49,7 @@ while (($# > 0)); do
--infodir) read_arg infodir "$@" || shift ;;
--systemdsystemunitdir) read_arg systemdsystemunitdir "$@" || shift ;;
--bashcompletiondir) read_arg bashcompletiondir "$@" || shift ;;
--enable-dracut-cpio) enable_dracut_cpio=yes ;;
*) echo "Ignoring unknown option '$1'" ;;
esac
shift
@@ -102,6 +104,41 @@ if test $found = no; then
exit 1
fi
cat << EOF > conftest.c
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>
#ifndef SYS_gettid
#error "SYS_gettid unavailable on this system"
#endif
#define gettid() ((pid_t) syscall(SYS_gettid))
int main(void) {
return getpid() == gettid() ? 0 : -1;
}
EOF
# shellcheck disable=SC2086
${CC} $CFLAGS $LDFLAGS conftest.c > /dev/null 2>&1
ret=$?
rm -f conftest.c a.out
if test $ret -ne 0; then
echo "dracut needs SYS_gettid support." >&2
exit 1
fi
if test "$enable_dracut_cpio" = "yes"; then
cargo --version > /dev/null
ret=$?
if test $ret -ne 0; then
echo "dracut couldn't find cargo for dracut-cpio build"
exit 1
fi
fi
cat > Makefile.inc.$$ << EOF
prefix ?= ${prefix}
libdir ?= ${libdir:-${prefix}/lib}
@@ -110,6 +147,7 @@ sysconfdir ?= ${sysconfdir:-${prefix}/etc}
sbindir ?= ${sbindir:-${prefix}/sbin}
mandir ?= ${mandir:-${prefix}/share/man}
enable_documentation ?= ${enable_documentation:-yes}
enable_dracut_cpio ?= ${enable_dracut_cpio}
bindir ?= ${bindir:-${prefix}/bin}
KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 23 ")
KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 23 ")

View File

@@ -16,8 +16,8 @@ Don't use `dirname`, use:
If you set `shopt` in a function, reset to its default state with `trap`:
```shell
func() {
trap "$(shopt -p nullglob globstar)" RETURN
shopt -q -s nullglob globstar
trap "$(shopt -p globstar)" RETURN
shopt -q -s globstar
}
```
@@ -51,8 +51,8 @@ func() {
Or collect the filenames in an array, if you need them more than once:
```shell
func() {
trap "$(shopt -p nullglob globstar)" RETURN
shopt -q -s nullglob globstar
trap "$(shopt -p globstar)" RETURN
shopt -q -s globstar
filenames=( /usr/lib*/**/lib*.a )

View File

@@ -40,7 +40,7 @@ This Code of Conduct applies within all community spaces, and also applies when
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainer responsible for enforcement Harald Hoyer <harald@redhat.com>.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainer responsible for enforcement Harald Hoyer <harald@profian.com>.
All complaints will be reviewed and investigated promptly and fairly and will result in a response that is deemed necessary and appropriate to the circumstances.
Project maintainers are obligated to respect the privacy and security of the reporter of any incident.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

View File

@@ -1,11 +1,12 @@
# Dracut Developer Guidelines
Please make sure to follow our [Contribution Guidelines](../CONTRIBUTING.md).
## git
Currently dracut lives on github.com and kernel.org.
Currently dracut lives on github.com.
* https://github.com/dracutdevs/dracut.git
* https://git.kernel.org/pub/scm/boot/dracut/dracut.git
Pull requests should be filed preferably on github nowadays.
@@ -141,7 +142,7 @@ dracut_install_dir/modules.d/
This function of module-setup.sh is called to install all
non-kernel files. dracut supplies several install functions that are
specialized for different file types. Browse through dracut-functions
fore more details. dracut also provides a $moddir variable if you
for more details. dracut also provides a $moddir variable if you
need to install a file from the module directory, such as an initrd
hook, a udev rule, or a specialized executable.

View File

@@ -27,44 +27,22 @@ This documents contains the necessary steps to conduct a successful release.
4. Check in AUTHORS and NEWS.md
```console
$ git ci -m "docs: update NEWS.md and AUTHORS" NEWS.md AUTHORS
$ git commit -m "docs: update NEWS.md and AUTHORS" NEWS.md AUTHORS
$ git push origin master
```
5. Tag the release and push
5. Tag the release, validate the tag and push
```console
$ VERSION=052
$ git tag -s "$VERSION"
$ git tag -s 060
$ git tag -v 060
$ git push --tags
```
Add the section from `NEWS.md` to the git tag message.
Add the section from `NEWS.md` to the git tag message excluding the Rendered
view entry.
6. Push git to kernel.org
With:
```console
$ git remote add kernelorg ssh://gitolite@ra.kernel.org/pub/scm/boot/dracut/dracut.git
```
Push to kernel.org git:
```console
$ git push --atomic kernelorg master "$VERSION"
```
7. Sign and upload tarballs to kernel.org
```console
$ make upload
```
This requires `kup` and a kernel.org account.
Wait until the tarballs are synced to http://www.kernel.org/pub/linux/utils/boot/dracut/ .
8. Create a new release on github (https://github.com/dracutdevs/dracut/releases/new)
6. Create a new release on github (https://github.com/dracutdevs/dracut/releases/new)
- Add the section from `NEWS.md` to the release.
- Attach the tarballs and signature file from http://www.kernel.org/pub/linux/utils/boot/dracut/ to the github release.
9. Close the github milestone and open a new one (https://github.com/dracutdevs/dracut/milestones)
10. Ensure that announcement was sent and reached the linux-initramfs mailinglist (https://www.spinics.net/lists/linux-initramfs/)
7. Open a new milestone, move all unfinished issue from the previous milestone to the new one and close the released milestone (https://github.com/dracutdevs/dracut/milestones)

View File

@@ -1,3 +1,3 @@
Security is very important to us. If you discover any issue regarding security, we'd appreciate a non-public disclosure of
the information, so please disclose the information responsibly by sending an email to Harald Hoyer harald@redhat.com and not by creating a GitHub issue.
the information, so please disclose the information responsibly by sending an email to Harald Hoyer <harald@profian.com> and not by creating a GitHub issue.
We will respond swiftly to fix verifiable security issues with the disclosure being coordinated with distributions and relevant security teams.

View File

@@ -37,6 +37,13 @@ str_starts() { [ "${1#"$2"*}" != "$1" ]; }
# returns OK if $1 contains literal string $2 at the end, and isn't empty
str_ends() { [ "${1%*"$2"}" != "$1" ]; }
trim() {
local var="$*"
var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters
printf "%s" "$var"
}
# find a binary. If we were not passed the full path directly,
# search in the usual places to find the binary.
find_binary() {
@@ -234,13 +241,20 @@ get_fs_env() {
# 8:2
get_maj_min() {
local _majmin
out="$(grep -m1 -oP "^$1 \K\S+$" "${get_maj_min_cache_file:?}")"
if [ -z "$out" ]; then
_majmin="$(stat -L -c '%t:%T' "$1" 2> /dev/null)"
out="$(printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))")"
echo "$1 $out" >> "${get_maj_min_cache_file:?}"
local _out
if [[ $get_maj_min_cache_file ]]; then
_out="$(grep -m1 -oE "^$1 \S+$" "$get_maj_min_cache_file" | awk '{print $NF}')"
fi
echo -n "$out"
if ! [[ "$_out" ]]; then
_majmin="$(stat -L -c '%t:%T' "$1" 2> /dev/null)"
_out="$(printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))")"
if [[ $get_maj_min_cache_file ]]; then
echo "$1 $_out" >> "$get_maj_min_cache_file"
fi
fi
echo -n "$_out"
}
# get_devpath_block <device>
@@ -376,6 +390,7 @@ find_block_device() {
} && return 0
fi
# fall back to /etc/fstab
[[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1
findmnt -e --fstab -v -n -o 'MAJ:MIN,SOURCE' --target "$_find_mpt" | {
while read -r _majmin _dev || [ -n "$_dev" ]; do
@@ -426,6 +441,8 @@ find_mp_fstype() {
} && return 0
fi
[[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1
findmnt --fstab -e -v -n -o 'FSTYPE' --target "$1" | {
while read -r _fs || [ -n "$_fs" ]; do
[[ $_fs ]] || continue
@@ -466,6 +483,8 @@ find_dev_fstype() {
} && return 0
fi
[[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1
findmnt --fstab -e -v -n -o 'FSTYPE' --source "$_find_dev" | {
while read -r _fs || [ -n "$_fs" ]; do
[[ $_fs ]] || continue
@@ -492,6 +511,8 @@ find_mp_fsopts() {
findmnt -e -v -n -o 'OPTIONS' --target "$1" 2> /dev/null && return 0
fi
[[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1
findmnt --fstab -e -v -n -o 'OPTIONS' --target "$1"
}
@@ -515,6 +536,8 @@ find_dev_fsopts() {
findmnt -e -v -n -o 'OPTIONS' --source "$_find_dev" 2> /dev/null && return 0
fi
[[ ! -f "$dracutsysrootdir"/etc/fstab ]] && return 1
findmnt --fstab -e -v -n -o 'OPTIONS' --source "$_find_dev"
}
@@ -610,6 +633,27 @@ for_each_host_dev_and_slaves() {
return 1
}
# /sys/dev/block/major:minor is symbol link to real hardware device
# go downstream $(realpath /sys/dev/block/major:minor) to detect driver
get_blockdev_drv_through_sys() {
local _block_mods=""
local _path
_path=$(realpath "$1")
while true; do
if [[ -L "$_path"/driver/module ]]; then
_mod=$(realpath "$_path"/driver/module)
_mod=$(basename "$_mod")
_block_mods="$_block_mods $_mod"
fi
_path=$(dirname "$_path")
if [[ $_path == '/sys/devices' ]] || [[ $_path == '/' ]]; then
break
fi
done
echo "$_block_mods"
}
# ugly workaround for the lvm design
# There is no volume group device,
# so, there are no slave devices for volume groups.
@@ -668,7 +712,7 @@ fs_get_option() {
while [ $# -gt 0 ]; do
case $1 in
$_option=*)
echo "${1#${_option}=}"
echo "${1#"${_option}"=}"
break
;;
esac
@@ -694,7 +738,7 @@ check_kernel_config() {
# 0 if the kernel module is either built-in or available
# 1 if the kernel module is not enabled
check_kernel_module() {
modprobe -S "$kernel" --dry-run "$1" &> /dev/null || return 1
modprobe -d "$dracutsysrootdir" -S "$kernel" --dry-run "$1" &> /dev/null || return 1
}
# get_cpu_vendor
@@ -752,16 +796,40 @@ btrfs_devs() {
done
}
zfs_devs() {
local _mp="$1"
zpool list -H -v -P "${_mp%%/*}" | awk -F$'\t' '$2 ~ /^\// {print $2}' \
| while read -r _dev; do
realpath "${_dev}"
done
}
iface_for_remote_addr() {
# shellcheck disable=SC2046
set -- $(ip -o route get to "$1")
echo "$3"
while [ $# -gt 0 ]; do
case $1 in
dev)
echo "$2"
return
;;
esac
shift
done
}
local_addr_for_remote_addr() {
# shellcheck disable=SC2046
set -- $(ip -o route get to "$1")
echo "$5"
while [ $# -gt 0 ]; do
case $1 in
src)
echo "$2"
return
;;
esac
shift
done
}
peer_for_addr() {
@@ -878,7 +946,7 @@ block_is_nbd() {
}
# block_is_iscsi <maj:min>
# Check whether $1 is an nbd device
# Check whether $1 is an iSCSI device
block_is_iscsi() {
local _dir
local _dev=$1
@@ -915,7 +983,102 @@ block_is_netdevice() {
block_is_nbd "$1" || block_is_iscsi "$1" || block_is_fcoe "$1"
}
# convert the driver name given by udevadm to the corresponding kernel module name
get_module_name() {
local dev_driver
while read -r dev_driver; do
case "$dev_driver" in
mmcblk)
echo "mmc_block"
;;
*)
echo "$dev_driver"
;;
esac
done
}
# get the corresponding kernel modules of a /sys/class/*/* or/dev/* device
get_dev_module() {
udevadm info -a "$1" | sed -n 's/\s*DRIVERS=="\(\S\+\)"/\1/p'
local dev_attr_walk
local dev_drivers
local dev_paths
dev_attr_walk=$(udevadm info -a "$1")
dev_drivers=$(echo "$dev_attr_walk" \
| sed -n 's/\s*DRIVERS=="\(\S\+\)"/\1/p' \
| get_module_name)
# also return modalias info from sysfs paths parsed by udevadm
dev_paths=$(echo "$dev_attr_walk" | sed -n 's/.*\(\/devices\/.*\)'\'':/\1/p')
local dev_path
for dev_path in $dev_paths; do
local modalias_file="/sys$dev_path/modalias"
if [ -e "$modalias_file" ]; then
dev_drivers="$(printf "%s\n%s" "$dev_drivers" "$(cat "$modalias_file")")"
fi
done
# if no kernel modules found and device is in a virtual subsystem, follow symlinks
if [[ -z $dev_drivers && $(udevadm info -q path "$1") == "/devices/virtual"* ]]; then
local dev_vkernel
local dev_vsubsystem
local dev_vpath
dev_vkernel=$(echo "$dev_attr_walk" | sed -n 's/\s*KERNELS=="\(\S\+\)"/\1/p' | tail -1)
dev_vsubsystem=$(echo "$dev_attr_walk" | sed -n 's/\s*SUBSYSTEMS=="\(\S\+\)"/\1/p' | tail -1)
dev_vpath="/sys/devices/virtual/$dev_vsubsystem/$dev_vkernel"
if [[ -n $dev_vkernel && -n $dev_vsubsystem && -d $dev_vpath ]]; then
local dev_links
local dev_link
dev_links=$(find "$dev_vpath" -maxdepth 1 -type l ! -name "subsystem" -exec readlink {} \;)
for dev_link in $dev_links; do
[[ -n $dev_drivers && ${dev_drivers: -1} != $'\n' ]] && dev_drivers+=$'\n'
dev_drivers+=$(udevadm info -a "$dev_vpath/$dev_link" \
| sed -n 's/\s*DRIVERS=="\(\S\+\)"/\1/p' \
| get_module_name \
| grep -v -e pcieport)
done
fi
fi
echo "$dev_drivers"
}
# Check if file is in PE format
pe_file_format() {
if [[ $# -eq 1 ]]; then
local magic
magic=$(objdump -p "$1" \
| awk '{if ($1 == "Magic"){print strtonum("0x"$2)}}')
magic=$(printf "0x%x" "$magic")
# 0x10b (PE32), 0x20b (PE32+)
[[ $magic == 0x20b || $magic == 0x10b ]] && return 0
fi
return 1
}
# Get specific data from the PE header
pe_get_header_data() {
local data_header
[[ $# -ne "2" ]] && return 1
[[ $(pe_file_format "$1") -eq 1 ]] && return 1
data_header=$(objdump -p "$1" \
| awk -v data="$2" '{if ($1 == data){print $2}}')
echo "$data_header"
}
# Get the SectionAlignment data from the PE header
pe_get_section_align() {
local align_hex
[[ $# -ne "1" ]] && return 1
align_hex=$(pe_get_header_data "$1" "SectionAlignment")
[[ $? -eq 1 ]] && return 1
echo "$((16#$align_hex))"
}
# Get the ImageBase data from the PE header
pe_get_image_base() {
local base_image
[[ $# -ne "1" ]] && return 1
base_image=$(pe_get_header_data "$1" "ImageBase")
[[ $? -eq 1 ]] && return 1
echo "$((16#$base_image))"
}

197
dracut-init.sh Normal file → Executable file
View File

@@ -72,8 +72,6 @@ srcmods="$dracutsysrootdir/lib/modules/$kernel/"
}
export srcmods
[[ $DRACUT_FIRMWARE_PATH ]] || export DRACUT_FIRMWARE_PATH="/lib/firmware/updates:/lib/firmware:/lib/firmware/$kernel"
# export standard hookdirs
[[ $hookdirs ]] || {
hookdirs="cmdline pre-udev pre-trigger netroot "
@@ -121,7 +119,7 @@ require_binaries() {
for cmd in "$@"; do
if ! find_binary "$cmd" &> /dev/null; then
dinfo "dracut module '${_module_name#[0-9][0-9]}' will not be installed, because command '$cmd' could not be found!"
dinfo "Module '${_module_name#[0-9][0-9]}' will not be installed, because command '$cmd' could not be found!"
((_ret++))
fi
done
@@ -152,6 +150,31 @@ require_any_binary() {
return 0
}
# helper function for check() in module-setup.sh
# to check for required kernel modules
# issues a standardized warning message
require_kernel_modules() {
# shellcheck disable=SC2154
local _module_name="${moddir##*/}"
local _ret=0
# Ignore kernel module requirement for no-kernel build
[[ $no_kernel == yes ]] && return 0
if [[ $1 == "-m" ]]; then
_module_name="$2"
shift 2
fi
for mod in "$@"; do
if ! check_kernel_module "$mod" &> /dev/null; then
dinfo "Module '${_module_name#[0-9][0-9]}' will not be installed, because kernel module '$mod' is not available!"
((_ret++))
fi
done
return "$_ret"
}
dracut_need_initqueue() {
: > "$initdir/lib/dracut/need-initqueue"
}
@@ -182,8 +205,8 @@ fi
if ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/dracut-install ]]; then
DRACUT_INSTALL=$dracutbasedir/dracut-install
elif ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/install/dracut-install ]]; then
DRACUT_INSTALL=$dracutbasedir/install/dracut-install
elif ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/src/install/dracut-install ]]; then
DRACUT_INSTALL=$dracutbasedir/src/install/dracut-install
fi
# Test if dracut-install is a standalone executable with no options.
@@ -205,64 +228,84 @@ fi
if [[ $hostonly == "-h" ]]; then
if ! [[ $DRACUT_KERNEL_MODALIASES ]] || ! [[ -f $DRACUT_KERNEL_MODALIASES ]]; then
export DRACUT_KERNEL_MODALIASES="${DRACUT_TMPDIR}/modaliases"
"$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${srcmods:+--kerneldir "$srcmods"} --modalias > "$DRACUT_KERNEL_MODALIASES"
$DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${srcmods:+--kerneldir "$srcmods"} --modalias > "$DRACUT_KERNEL_MODALIASES"
fi
fi
[[ $DRACUT_RESOLVE_LAZY ]] || export DRACUT_RESOLVE_DEPS=1
inst_dir() {
local _ret
[[ -e ${initdir}/"$1" ]] && return 0 # already there
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -d "$@"; then
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -d "$@"; then
return 0
else
_ret=$?
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -d "$@"
return $_ret
fi
}
inst() {
local _hostonly_install
local _ret _hostonly_install
if [[ $1 == "-H" ]]; then
_hostonly_install="-H"
shift
fi
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
# shellcheck disable=SC2154
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
return 0
else
_ret=$?
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
return $_ret
fi
}
inst_simple() {
local _hostonly_install
local _ret _hostonly_install
if [[ $1 == "-H" ]]; then
_hostonly_install="-H"
shift
fi
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
[[ -e $1 ]] || return 1 # no source
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@"; then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@" || :
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@"; then
return 0
else
_ret=$?
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@"
return $_ret
fi
}
inst_symlink() {
local _hostonly_install
local _ret _hostonly_install
if [[ $1 == "-H" ]]; then
_hostonly_install="-H"
shift
fi
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
[[ -L $1 ]] || return 1
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
return 0
else
_ret=$?
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
return $_ret
fi
}
inst_multiple() {
local _ret
if "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"; then
local _ret _hostonly_install
if [[ $1 == "-H" ]]; then
_hostonly_install="-H"
shift
fi
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
return 0
else
_ret=$?
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} -a ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
return $_ret
fi
}
@@ -272,7 +315,7 @@ dracut_install() {
}
dracut_instmods() {
local _silent=0
local _ret _silent=0
local i
# shellcheck disable=SC2154
[[ $no_kernel == yes ]] && return
@@ -280,50 +323,71 @@ dracut_instmods() {
[[ $i == "--silent" ]] && _silent=1
done
# shellcheck disable=SC2154
if ! "$DRACUT_INSTALL" \
if $DRACUT_INSTALL \
${dracutsysrootdir:+-r "$dracutsysrootdir"} \
${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@"; then
return 0
else
_ret=$?
if ((_silent == 0)); then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@" || :
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} -m "$@"
fi
return $_ret
fi
}
inst_library() {
local _hostonly_install
local _ret _hostonly_install
if [[ $1 == "-H" ]]; then
_hostonly_install="-H"
shift
fi
[[ -e ${initdir}/"${2:-$1}" ]] && return 0 # already there
[[ -e $1 ]] || return 1 # no source
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@" || :
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"; then
return 0
else
_ret=$?
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} ${_hostonly_install:+-H} "$@"
return $_ret
fi
}
inst_binary() {
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"; then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
local _ret
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"; then
return 0
else
_ret=$?
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"
return $_ret
fi
}
inst_script() {
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"; then
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
local _ret
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"; then
return 0
else
_ret=$?
derror FAILED: "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@"
return $_ret
fi
}
inst_fsck_help() {
local _helper="/run/dracut/fsck/fsck_help_$1.txt"
if ! "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$2" "$_helper"; then
derror "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$2" "$_helper" || :
local _ret _helper="/run/dracut/fsck/fsck_help_$1.txt"
if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$2" "$_helper"; then
return 0
else
_ret=$?
derror "$DRACUT_INSTALL" ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$2" "$_helper"
return $_ret
fi
}
# Use with form hostonly="$(optional_hostonly)" inst_xxxx <args>
# If hosotnly mode is set to "strict", hostonly restrictions will still
# If hostonly mode is set to "strict", hostonly restrictions will still
# be applied, else will ignore hostonly mode and try to install all
# given modules.
optional_hostonly() {
@@ -423,7 +487,7 @@ inst_rule_programs() {
done
}
# attempt to install any programs specified in a udev rule
# attempt to create any groups and users specified in a udev rule
inst_rule_group_owner() {
local i
@@ -476,7 +540,7 @@ inst_rules() {
inst_rule_initqueue "$_found"
inst_simple "$_found" "$_target/${_found##*/}"
done
[[ $_found ]] || dinfo "Skipping udev rule: $_rule"
[[ $_found ]] || ddebug "Skipping udev rule: $_rule"
done
}
@@ -503,10 +567,26 @@ inst_rules_wildcard() {
_found=$_rule
done
fi
[[ $_found ]] || dinfo "Skipping udev rule: $_rule"
[[ $_found ]] || ddebug "Skipping udev rule: $_rule"
}
# make sure that library links are correct and up to date
build_ld_cache() {
for f in "$dracutsysrootdir"/etc/ld.so.conf "$dracutsysrootdir"/etc/ld.so.conf.d/*; do
[[ -f $f ]] && inst_simple "${f#"$dracutsysrootdir"}"
done
if ! $DRACUT_LDCONFIG -r "$initdir" -f /etc/ld.so.conf; then
if [[ $EUID == 0 ]]; then
derror "ldconfig exited ungracefully"
else
derror "ldconfig might need uid=0 (root) for chroot()"
fi
fi
}
prepare_udev_rules() {
dwarn "prepare_udev_rules: deprecated and will be removed"
if [ -z "$UDEVVERSION" ]; then
UDEVVERSION=$(udevadm --version)
export UDEVVERSION
@@ -591,6 +671,22 @@ inst_any() {
return 1
}
# inst_libdir_dir <dir> [<dir>...]
# Install a <dir> located on a lib directory to the initramfs image
inst_libdir_dir() {
local -a _dirs
for _dir in $libdirs; do
for _i in "$@"; do
for _d in "$dracutsysrootdir$_dir"/$_i; do
[[ -d $_d ]] && _dirs+=("${_d#"$dracutsysrootdir"}")
done
done
done
for _dir in "${_dirs[@]}"; do
inst_dir "$_dir"
done
}
# inst_libdir_file [-n <pattern>] <file> [<file>...]
# Install a <file> located on a lib directory to the initramfs image
# -n <pattern> install matching files
@@ -602,8 +698,8 @@ inst_libdir_file() {
for _dir in $libdirs; do
for _i in "$@"; do
for _f in "$dracutsysrootdir$_dir"/$_i; do
[[ ${_f#$dracutsysrootdir} =~ $_pattern ]] || continue
[[ -e $_f ]] && _files+=("${_f#$dracutsysrootdir}")
[[ ${_f#"$dracutsysrootdir"} =~ $_pattern ]] || continue
[[ -e $_f ]] && _files+=("${_f#"$dracutsysrootdir"}")
done
done
done
@@ -611,7 +707,7 @@ inst_libdir_file() {
for _dir in $libdirs; do
for _i in "$@"; do
for _f in "$dracutsysrootdir$_dir"/$_i; do
[[ -e $_f ]] && _files+=("${_f#$dracutsysrootdir}")
[[ -e $_f ]] && _files+=("${_f#"$dracutsysrootdir"}")
done
done
done
@@ -877,7 +973,7 @@ check_mount() {
&& force_add_dracutmodules+=" $_moddep "
# if a module we depend on fail, fail also
if ! check_module "$_moddep"; then
derror "dracut module '$_mod' depends on '$_moddep', which can't be installed"
derror "Module '$_mod' depends on '$_moddep', which can't be installed"
return 1
fi
done
@@ -909,7 +1005,7 @@ check_module() {
[[ $2 ]] || mods_checked_as_dep+=" $_mod "
if [[ " $omit_dracutmodules " == *\ $_mod\ * ]]; then
ddebug "dracut module '$_mod' will not be installed, because it's in the list to be omitted!"
ddebug "Module '$_mod' will not be installed, because it's in the list to be omitted!"
return 1
fi
@@ -952,7 +1048,7 @@ check_module() {
&& force_add_dracutmodules+=" $_moddep "
# if a module we depend on fail, fail also
if ! check_module "$_moddep"; then
derror "dracut module '$_mod' depends on '$_moddep', which can't be installed"
derror "Module '$_mod' depends on '$_moddep', which can't be installed"
return 1
fi
done
@@ -970,11 +1066,11 @@ for_each_module_dir() {
local _mod
local _moddir
local _func
local _reason
_func=$1
for _moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
[[ -d $_moddir ]] || continue
[[ -e $_moddir/install || -e $_moddir/installkernel || -e \
$_moddir/module-setup.sh ]] || continue
[[ -e $_moddir/install || -e $_moddir/installkernel || -e $_moddir/module-setup.sh ]] || continue
_mod=${_moddir##*/}
_mod=${_mod#[0-9][0-9]}
$_func "$_mod" 1 "$_moddir"
@@ -991,7 +1087,10 @@ for_each_module_dir() {
&& [[ " $omit_dracutmodules " == *\ $_mod\ * ]] \
&& continue
derror "dracut module '$_mod' cannot be found or installed."
[[ -d $(echo "$dracutbasedir/modules.d"/[0-9][0-9]"$_mod") ]] \
&& _reason="installed" \
|| _reason="found"
derror "Module '$_mod' cannot be $_reason."
[[ " $force_add_dracutmodules " == *\ $_mod\ * ]] && exit 1
[[ " $dracutmodules " == *\ $_mod\ * ]] && exit 1
[[ " $add_dracutmodules " == *\ $_mod\ * ]] && exit 1
@@ -1043,7 +1142,7 @@ instmods() {
return 0
fi
"$DRACUT_INSTALL" \
$DRACUT_INSTALL \
${initdir:+-D "$initdir"} \
${dracutsysrootdir:+-r "$dracutsysrootdir"} \
${loginstall:+-L "$loginstall"} \
@@ -1069,7 +1168,7 @@ instmods() {
-m "$@"
fi
[[ "$optional" ]] && return 0
[[ "$_optional" ]] && return 0
return $_ret
}
@@ -1091,7 +1190,7 @@ is_qemu_virtualized() {
# 1 if a virt environment could not be detected
# 255 if any error was encountered
if type -P systemd-detect-virt > /dev/null 2>&1; then
if ! vm=$(systemd-detect-virt --vm > /dev/null 2>&1); then
if ! vm=$(systemd-detect-virt --vm 2> /dev/null); then
return 255
fi
[[ $vm == "qemu" ]] && return 0

47
dracut-initramfs-restore.sh Normal file → Executable file
View File

@@ -6,28 +6,45 @@ set -e
[ -e /run/initramfs/bin/sh ] && exit 0
[ -e /run/initramfs/.need_shutdown ] || exit 0
# SIGTERM signal is received upon forced shutdown: ignore the signal
# We want to remain alive to be able to trap unpacking errors to avoid
# switching root to an incompletely unpacked initramfs
trap 'echo "Received SIGTERM signal, ignoring!" >&2' TERM
KERNEL_VERSION="$(uname -r)"
[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut
SKIP="$dracutbasedir/skipcpio"
[[ -x $SKIP ]] || SKIP="cat"
[[ -f /etc/machine-id ]] && read -r MACHINE_ID < /etc/machine-id
if [[ -d /efi/Default ]] || [[ -d /boot/Default ]] || [[ -d /boot/efi/Default ]]; then
MACHINE_ID="Default"
elif [[ -s /etc/machine-id ]]; then
read -r MACHINE_ID < /etc/machine-id
[[ $MACHINE_ID == "uninitialized" ]] && MACHINE_ID="Default"
else
MACHINE_ID="Default"
fi
mount -o ro /boot &> /dev/null || true
if [[ -d /efi/loader/entries || -L /efi/loader/entries ]] \
&& [[ $MACHINE_ID ]] \
&& [[ -d /efi/${MACHINE_ID} || -L /efi/${MACHINE_ID} ]]; then
&& [[ -d /efi/$MACHINE_ID || -L /efi/$MACHINE_ID ]]; then
IMG="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
elif [[ -d /boot/loader/entries || -L /boot/loader/entries ]] \
&& [[ $MACHINE_ID ]] \
&& [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]]; then
&& [[ -d /boot/$MACHINE_ID || -L /boot/$MACHINE_ID ]]; then
IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
IMG="/boot/initramfs-${KERNEL_VERSION}.img"
elif [[ -d /boot/efi/loader/entries || -L /boot/efi/loader/entries ]] \
&& [[ -d /boot/efi/$MACHINE_ID || -L /boot/efi/$MACHINE_ID ]]; then
IMG="/boot/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then
IMG="/lib/modules/${KERNEL_VERSION}/initrd"
elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
IMG="/boot/initramfs-${KERNEL_VERSION}.img"
elif mountpoint -q /efi; then
IMG="/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
elif mountpoint -q /boot/efi; then
IMG="/boot/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
else
echo "No initramfs image found to restore!"
exit 1
@@ -35,13 +52,13 @@ fi
cd /run/initramfs
if $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet > /dev/null; then
rm -f -- .need_shutdown
elif $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet > /dev/null; then
rm -f -- .need_shutdown
elif $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null; then
rm -f -- .need_shutdown
elif $SKIP "$IMG" | zstd -d -c | cpio -id --no-absolute-filenames --quiet > /dev/null; then
if (command -v zcat > /dev/null && $SKIP "$IMG" 2> /dev/null | zcat 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \
|| (command -v bzcat > /dev/null && $SKIP "$IMG" 2> /dev/null | bzcat 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \
|| (command -v xzcat > /dev/null && $SKIP "$IMG" 2> /dev/null | xzcat 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \
|| (command -v lz4 > /dev/null && $SKIP "$IMG" 2> /dev/null | lz4 -d -c 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \
|| (command -v lzop > /dev/null && $SKIP "$IMG" 2> /dev/null | lzop -d -c 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \
|| (command -v zstd > /dev/null && $SKIP "$IMG" 2> /dev/null | zstd -d -c 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1) \
|| ($SKIP "$IMG" 2> /dev/null | cpio -id --no-absolute-filenames --quiet > /dev/null 2>&1); then
rm -f -- .need_shutdown
else
# something failed, so we clean up
@@ -60,7 +77,7 @@ fi
if [ -e /etc/selinux/config -a -x /usr/sbin/setfiles ]; then
. /etc/selinux/config
/usr/sbin/setfiles -v -r /run/initramfs /etc/selinux/"${SELINUXTYPE}"/contexts/files/file_contexts /run/initramfs > /dev/null
[ -n "${SELINUXTYPE}" ] && /usr/sbin/setfiles -v -r /run/initramfs /etc/selinux/"${SELINUXTYPE}"/contexts/files/file_contexts /run/initramfs > /dev/null
fi
exit 0

View File

@@ -151,7 +151,7 @@ dlog_init() {
readonly _dlogfd=15
systemd-cat -t 'dracut' --level-prefix=true < "$_systemdcatfile" &
exec 15> "$_systemdcatfile"
elif ! [[ -S /dev/log ]] && [[ -w /dev/log ]] || ! command -v logger > /dev/null; then
elif ! ([[ -S /dev/log ]] && [[ -w /dev/log ]] && command -v logger > /dev/null); then
# We cannot log to syslog, so turn this facility off.
kmsgloglvl=$sysloglvl
sysloglvl=0
@@ -323,7 +323,7 @@ _do_dlog() {
local msg="$*"
local lmsg="$lvlc: $*"
((lvl <= stdloglvl)) && printf -- 'dracut: %s\n' "$msg" >&2
((lvl <= stdloglvl)) && printf -- 'dracut[%s]: %s\n' "$lvlc" "$msg" >&2
if ((lvl <= sysloglvl)); then
if [[ "$_dlogfd" ]]; then

View File

@@ -8,7 +8,7 @@ i18n_install_all="yes"
stdloglvl=3
sysloglvl=5
install_optional_items+=" vi /etc/virc ps grep cat rm "
install_optional_items+=" vi /usr/libexec/vi /etc/virc ps grep cat rm "
prefix="/"
environment=/usr/lib/environment.d
environmentconfdir=/etc/environment.d
@@ -22,7 +22,7 @@ dbusconfdir=/etc/dbus-1
dbusinterfacesconfdir=/etc/dbus-1/interfaces
dbusservicesconfdir=/etc/dbus-1/services
dbussessionconfdir=/etc/dbus-1/session.d
dbussystem=confdir/etc/dbus-1/system.d
dbussystemconfdir=/etc/dbus-1/system.d
dbussystemservicesconfdir=/etc/dbus-1/system-services
sysctld=/usr/lib/sysctl.d
sysctlconfdir=/etc/sysctl.d

View File

@@ -1,5 +0,0 @@
# /etc/dracut.conf.d/gentoo-systemd.conf
# Paths of systemd dirs on Gentoo
systemdutildir=/usr/lib/systemd
systemdsystemunitdir=/usr/lib/systemd/system

View File

@@ -1,15 +0,0 @@
# /etc/dracut.conf.d/gentoo.conf
# dracut config file customized for Gentoo Base System release 2
udevdir=/lib/udev
ro_mnt=yes
#
# Modules
#
# i18n
i18n_vars="/etc/conf.d/keymaps:keymap-KEYMAP,extended_keymaps-EXT_KEYMAPS /etc/conf.d/consolefont:consolefont-FONT,consoletranslation-FONT_MAP /etc/rc.conf:unicode-UNICODE"
i18n_default_font="LatArCyrHeb-16"
omit_drivers+=" i2o_scsi "

View File

@@ -3,22 +3,12 @@
# SUSE by default always builds as small as possible initrd for performance
# and resource reasons.
# If you like to build a generic initrd which works on other platforms than
# on the one dracut/mkinitrd got called comment out below setting(s).
# on the one dracut got called comment out below setting(s).
hostonly="yes"
hostonly_cmdline="yes"
compress="xz -0 --check=crc32 --memlimit-compress=50%"
compress="zstd -3 -T0 -q"
i18n_vars="/etc/sysconfig/language:RC_LANG-LANG,RC_LC_ALL-LC_ALL /etc/sysconfig/console:CONSOLE_UNICODEMAP-FONT_UNIMAP,CONSOLE_FONT-FONT,CONSOLE_SCREENMAP-FONT_MAP /etc/sysconfig/keyboard:KEYTABLE-KEYMAP"
omit_drivers+=" i2o_scsi "
# Below adds additional tools to the initrd which are not urgently necessary to
# bring up the system, but help to debug problems.
# See /usr/lib/dracut/modules.d/95debug/module-setup.sh which additional tools
# are installed and add more if you need them. This specifically helps if you
# use:
# rd.break=[cmdline|pre-udev|pre-trigger|initqueue|pre-mount|
# mount|pre-pivot|cleanup]
# boot parameter or if you are forced to enter the dracut emergency shell.
# add_dracutmodules+=debug

1040
dracut.sh

File diff suppressed because it is too large Load Diff

View File

@@ -11,27 +11,51 @@ if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then
exit 0
fi
if [[ -d "$BOOT_DIR_ABS" ]]; then
INITRD="initrd"
# Mismatching the install layout and the --uefi/--no-uefi opts just creates a mess.
if [[ $KERNEL_INSTALL_LAYOUT == "uki" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then
BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA"
IMAGE="uki.efi"
UEFI_OPTS="--uefi"
elif [[ $KERNEL_INSTALL_LAYOUT == "bls" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then
BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA"
IMAGE="initrd"
UEFI_OPTS="--no-uefi"
else
BOOT_DIR_ABS="/boot"
INITRD="initramfs-${KERNEL_VERSION}.img"
# No layout information, use users --uefi/--no-uefi preference
UEFI_OPTS=""
if [[ -d $BOOT_DIR_ABS ]]; then
IMAGE="initrd"
else
BOOT_DIR_ABS="/boot"
IMAGE="initramfs-${KERNEL_VERSION}.img"
fi
fi
ret=0
case "$COMMAND" in
add)
INITRD_IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/initrd
if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then
# we found an initrd at the same place as the kernel
if [[ $IMAGE == "uki.efi" ]]; then
IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/uki.efi
else
IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/initrd
fi
if [[ -f ${IMAGE_PREGENERATED} ]]; then
# we found an initrd or uki.efi at the same place as the kernel
# use this and don't generate a new one
cp --reflink=auto "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$INITRD" \
&& chown root:root "$BOOT_DIR_ABS/$INITRD" \
&& chmod 0600 "$BOOT_DIR_ABS/$INITRD" \
[[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo \
"There is an ${IMAGE} image at the same place as the kernel, skipping generating a new one"
cp --reflink=auto "$IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$IMAGE" \
&& chown root:root "$BOOT_DIR_ABS/$IMAGE" \
&& chmod 0600 "$BOOT_DIR_ABS/$IMAGE" \
&& exit 0
fi
if [[ -f /etc/kernel/cmdline ]]; then
if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then
if [ -f "$KERNEL_INSTALL_CONF_ROOT/cmdline" ]; then
read -r -d '' -a BOOT_OPTIONS < "$KERNEL_INSTALL_CONF_ROOT/cmdline"
fi
elif [[ -f /etc/kernel/cmdline ]]; then
read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
elif [[ -f /usr/lib/kernel/cmdline ]]; then
read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline
@@ -40,26 +64,36 @@ case "$COMMAND" in
read -r -d '' -a line < /proc/cmdline
for i in "${line[@]}"; do
[[ "${i#initrd=*}" != "$i" ]] && continue
[[ ${i#initrd=*} != "$i" ]] && continue
BOOT_OPTIONS+=("$i")
done
fi
unset noimageifnotneeded
for ((i=0; i < "${#BOOT_OPTIONS[@]}"; i++)); do
for ((i = 0; i < "${#BOOT_OPTIONS[@]}"; i++)); do
# shellcheck disable=SC1001
if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then
noimageifnotneeded="yes"
break
fi
done
dracut -f ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
# shellcheck disable=SC2046
dracut -f \
${noimageifnotneeded:+--noimageifnotneeded} \
$([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \
$([[ -n $KERNEL_IMAGE ]] && echo --kernel-image "$KERNEL_IMAGE") \
"$UEFI_OPTS" \
--kver "$KERNEL_VERSION" \
"$BOOT_DIR_ABS/$IMAGE"
ret=$?
;;
;;
remove)
rm -f -- "$BOOT_DIR_ABS/$INITRD"
rm -f -- "$BOOT_DIR_ABS/$IMAGE"
ret=$?
;;
;;
esac
exit $ret

View File

@@ -7,13 +7,12 @@ KERNEL_VERSION="$2"
BOOT_DIR_ABS="${3%/*}/0-rescue"
KERNEL_IMAGE="$4"
dropindirs_sort()
{
suffix=$1; shift
dropindirs_sort() {
suffix=$1
shift
args=("$@")
files=$(
while (( $# > 0 )); do
while (($# > 0)); do
for i in "${1}"/*"${suffix}"; do
[[ -f $i ]] && echo "${i##*/}"
done
@@ -31,11 +30,17 @@ dropindirs_sort()
done
}
[[ -f /etc/os-release ]] && . /etc/os-release
if [[ -f /etc/os-release ]]; then
. /etc/os-release
elif [[ -f /usr/lib/os-release ]]; then
. /usr/lib/os-release
fi
[[ -n $PRETTY_NAME ]] || PRETTY_NAME="Linux $KERNEL_VERSION"
if [[ ${KERNEL_INSTALL_MACHINE_ID+x} ]]; then
MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
elif [[ -f /etc/machine-id ]] ; then
elif [[ -f /etc/machine-id ]]; then
read -r MACHINE_ID < /etc/machine-id
fi
@@ -43,7 +48,11 @@ if ! [[ $MACHINE_ID ]]; then
exit 0
fi
if [[ -f /etc/kernel/cmdline ]]; then
if [ -n "$KERNEL_INSTALL_CONF_ROOT" ]; then
if [ -f "$KERNEL_INSTALL_CONF_ROOT/cmdline" ]; then
read -r -d '' -a BOOT_OPTIONS < "$KERNEL_INSTALL_CONF_ROOT/cmdline"
fi
elif [[ -f /etc/kernel/cmdline ]]; then
read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
elif [[ -f /usr/lib/kernel/cmdline ]]; then
read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline
@@ -52,14 +61,14 @@ else
read -r -d '' -a line < /proc/cmdline
for i in "${line[@]}"; do
[[ "${i#initrd=*}" != "$i" ]] && continue
[[ ${i#initrd=*} != "$i" ]] && continue
BOOT_OPTIONS+=("$i")
done
fi
if [[ -d "${BOOT_DIR_ABS%/*}" ]]; then
if [[ -d ${BOOT_DIR_ABS%/*} ]]; then
BOOT_DIR="/${MACHINE_ID}/0-rescue"
BOOT_ROOT=${BOOT_DIR_ABS%$BOOT_DIR}
BOOT_ROOT=${BOOT_DIR_ABS%"$BOOT_DIR"}
LOADER_ENTRY="$BOOT_ROOT/loader/entries/${MACHINE_ID}-0-rescue.conf"
KERNEL="linux"
INITRD="initrd"
@@ -75,8 +84,12 @@ ret=0
case "$COMMAND" in
add)
[[ -f "$LOADER_ENTRY" ]] && [[ -f "$BOOT_DIR_ABS/$KERNEL" ]] \
&& [[ -f "$BOOT_DIR_ABS/$INITRD" ]] && exit 0
if [[ -f $LOADER_ENTRY ]] && [[ -f "$BOOT_DIR_ABS/$KERNEL" ]] \
&& [[ -f "$BOOT_DIR_ABS/$INITRD" ]]; then
[[ $KERNEL_INSTALL_VERBOSE == 1 ]] \
&& echo "Skipping, there is already a rescue image generated with the same input parameters"
exit 0
fi
# source our config dir
for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do
@@ -87,20 +100,30 @@ case "$COMMAND" in
done
# shellcheck disable=SC2154
[[ $dracut_rescue_image != "yes" ]] && exit 0
if [[ $dracut_rescue_image != "yes" ]]; then
[[ $KERNEL_INSTALL_VERBOSE == 1 ]] \
&& echo "Skipping, 'dracut_rescue_image' not set to 'yes' in any dracut configuration file"
exit 0
fi
[[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS"
[[ -d $BOOT_DIR_ABS ]] || mkdir -p "$BOOT_DIR_ABS"
if ! cp --reflink=auto "$KERNEL_IMAGE" "$BOOT_DIR_ABS/$KERNEL"; then
echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/$KERNEL'!" >&2
fi
if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then
dracut -f --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
((ret+=$?))
# shellcheck disable=SC2046
dracut -f --no-hostonly --no-uefi \
-a "rescue" \
$([[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo --verbose) \
--kver "$KERNEL_VERSION" \
"$BOOT_DIR_ABS/$INITRD"
((ret += $?))
fi
if [[ "${BOOT_DIR_ABS}" != "/boot" ]]; then
[[ $KERNEL_INSTALL_VERBOSE == 1 ]] && echo "Creating $LOADER_ENTRY"
if [[ ${BOOT_DIR_ABS} != "/boot" ]]; then
{
echo "title $PRETTY_NAME - Rescue Image"
echo "version $KERNEL_VERSION"
@@ -118,16 +141,13 @@ case "$COMMAND" in
sed -i "s/${KERNEL_VERSION}/0-rescue-${MACHINE_ID}/" "$LOADER_ENTRY"
fi
((ret+=$?))
((ret += $?))
;;
remove)
exit 0
;;
*)
usage
ret=1;;
esac
exit $ret

View File

@@ -109,7 +109,14 @@ if [[ $1 ]]; then
exit 1
fi
else
[[ -f /etc/machine-id ]] && read -r MACHINE_ID < /etc/machine-id
if [[ -d /efi/Default ]] || [[ -d /boot/Default ]] || [[ -d /boot/efi/Default ]]; then
MACHINE_ID="Default"
elif [[ -s /etc/machine-id ]]; then
read -r MACHINE_ID < /etc/machine-id
[[ $MACHINE_ID == "uninitialized" ]] && MACHINE_ID="Default"
else
MACHINE_ID="Default"
fi
if [[ -d /efi/loader/entries || -L /efi/loader/entries ]] \
&& [[ $MACHINE_ID ]] \
@@ -119,8 +126,24 @@ else
&& [[ $MACHINE_ID ]] \
&& [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]]; then
image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
else
elif [[ -d /boot/efi/loader/entries || -L /boot/efi/loader/entries ]] \
&& [[ $MACHINE_ID ]] \
&& [[ -d /boot/efi/${MACHINE_ID} || -L /boot/efi/${MACHINE_ID} ]]; then
image="/boot/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then
image="/lib/modules/${KERNEL_VERSION}/initrd"
elif [[ -f /lib/modules/${KERNEL_VERSION}/initramfs.img ]]; then
image="/lib/modules/${KERNEL_VERSION}/initramfs.img"
elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
image="/boot/initramfs-${KERNEL_VERSION}.img"
elif [[ $MACHINE_ID ]] \
&& mountpoint -q /efi; then
image="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
elif [[ $MACHINE_ID ]] \
&& mountpoint -q /boot/efi; then
image="/boot/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
else
image=""
fi
fi
@@ -154,6 +177,8 @@ extract_files() {
for f in "${!filenames[@]}"; do
[[ $nofileinfo ]] || echo "initramfs:/$f"
[[ $nofileinfo ]] || echo "========================================================================"
# shellcheck disable=SC2001
[[ $f == *"\\x"* ]] && f=$(echo "$f" | sed 's/\\x.\{2\}/????/g')
$CAT "$image" 2> /dev/null | cpio --extract --verbose --quiet --to-stdout "$f" 2> /dev/null
((ret += $?))
[[ $nofileinfo ]] || echo "========================================================================"
@@ -197,7 +222,9 @@ list_squash_content() {
unpack_files() {
if ((${#filenames[@]} > 0)); then
for f in "${!filenames[@]}"; do
$CAT "$image" 2> /dev/null | cpio -id --quiet $verbose $f
# shellcheck disable=SC2001
[[ $f == *"\\x"* ]] && f=$(echo "$f" | sed 's/\\x.\{2\}/????/g')
$CAT "$image" 2> /dev/null | cpio -id --quiet $verbose "$f"
((ret += $?))
done
else
@@ -268,8 +295,8 @@ case $bin in
echo "Early CPIO image"
list_files
fi
if [[ -d "$dracutbasedir/skipcpio" ]]; then
SKIP="$dracutbasedir/skipcpio/skipcpio"
if [[ -d "$dracutbasedir/src/skipcpio" ]]; then
SKIP="$dracutbasedir/src/skipcpio/skipcpio"
else
SKIP="$dracutbasedir/skipcpio"
fi
@@ -316,6 +343,11 @@ case $bin in
;;
esac
type "${CAT%% *}" > /dev/null 2>&1 || {
echo "Need '${CAT%% *}' to unpack the initramfs."
exit 1
}
skipcpio() {
$SKIP "$@" | $ORIG_CAT
}

View File

@@ -51,7 +51,7 @@ Harald Hoyer
AVAILABILITY
------------
The dracut-catimages command is part of the dracut package and is available from
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
link:$$https://github.com/dracutdevs/dracut$$[https://github.com/dracutdevs/dracut]
SEE ALSO
--------

View File

@@ -18,8 +18,13 @@ DESCRIPTION
Create an initramfs <image> for the kernel with the version <kernel version>.
If <kernel version> is omitted, then the version of the actual running
kernel is used. If <image> is omitted or empty, then the default location
/boot/initramfs-<kernel version>.img is used.
kernel is used. If <image> is omitted or empty, depending on bootloader
specification, the default location can be
_/efi/<machine-id>/<kernel-version>/initrd_,
_/boot/<machine-id>/<kernel-version>/initrd_,
_/boot/efi/<machine-id>/<kernel-version>/initrd_,
_/lib/modules/<kernel-version>/initrd_ or
_/boot/initramfs-<kernel-version>.img_.
dracut creates an initial image used by the kernel for preloading the block
device modules (such as IDE, SCSI or RAID) which are needed to access the root
@@ -48,22 +53,28 @@ include::dracut.usage.asc[]
OPTIONS
-------
**--kver** _<kernel version>_::
set the kernel version. This enables to specify the kernel version, without
Set the kernel version. This enables to specify the kernel version, without
specifying the location of the initramfs image. For example:
----
# dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64
----
**-f, --force**::
overwrite existing initramfs file.
Overwrite existing initramfs file.
_<output file>_ **--rebuild**::
Append the current arguments to those with which the input initramfs image
was built. This option helps in incrementally building the initramfs for
testing. If optional _<output file>_ is not provided, the input initramfs
provided to rebuild will be used as output file.
**-a, --add** _<list of dracut modules>_::
add a space-separated list of dracut modules to the default set of modules.
Add a space-separated list of dracut modules to the default set of modules.
This parameter can be specified multiple times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --add "module1 module2" ...
@@ -71,13 +82,13 @@ example:
===============================
**--force-add** _<list of dracut modules>_::
force to add a space-separated list of dracut modules to the default set of
Force to add a space-separated list of dracut modules to the default set of
modules, when -H is specified. This parameter can be specified multiple
times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --force-add "module1 module2" ...
@@ -85,12 +96,12 @@ example:
===============================
**-o, --omit** _<list of dracut modules>_::
omit a space-separated list of dracut modules. This parameter can be
Omit a space-separated list of dracut modules. This parameter can be
specified multiple times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --omit "module1 module2" ...
@@ -98,7 +109,7 @@ example:
===============================
**-m, --modules** _<list of dracut modules>_::
specify a space-separated list of dracut modules to call when building the
Specify a space-separated list of dracut modules to call when building the
initramfs. Modules are located in _/usr/lib/dracut/modules.d_. This
parameter can be specified multiple times.
This option forces dracut to only include the specified dracut modules.
@@ -106,7 +117,7 @@ example:
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --modules "module1 module2" ...
@@ -114,13 +125,13 @@ example:
===============================
**-d, --drivers** _<list of kernel modules>_::
specify a space-separated list of kernel modules to exclusively include
Specify a space-separated list of kernel modules to exclusively include
in the initramfs. The kernel modules have to be specified without the ".ko"
suffix. This parameter can be specified multiple times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --drivers "kmodule1 kmodule2" ...
@@ -128,13 +139,13 @@ example:
===============================
**--add-drivers** _<list of kernel modules>_::
specify a space-separated list of kernel modules to add to the initramfs.
Specify a space-separated list of kernel modules to add to the initramfs.
The kernel modules have to be specified without the ".ko" suffix. This
parameter can be specified multiple times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --add-drivers "kmodule1 kmodule2" ...
@@ -147,7 +158,7 @@ example:
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --force-drivers "kmodule1 kmodule2" ...
@@ -155,14 +166,14 @@ example:
===============================
**--omit-drivers** _<list of kernel modules>_::
specify a space-separated list of kernel modules not to add to the
Specify a space-separated list of kernel modules not to add to the
initramfs.
The kernel modules have to be specified without the ".ko" suffix. This
parameter can be specified multiple times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --omit-drivers "kmodule1 kmodule2" ...
@@ -170,13 +181,13 @@ example:
===============================
**--filesystems** _<list of filesystems>_::
specify a space-separated list of kernel filesystem modules to exclusively
Specify a space-separated list of kernel filesystem modules to exclusively
include in the generic initramfs. This parameter can be specified multiple
times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --filesystems "filesystem1 filesystem2" ...
@@ -184,51 +195,64 @@ example:
===============================
**-k, --kmoddir** _<kernel directory>_::
specify the directory, where to look for kernel modules
Specify the directory, where to look for kernel modules.
**--fwdir** _<dir>[:<dir>...]++_::
specify additional directories, where to look for firmwares. This parameter
Specify additional directories, where to look for firmwares. This parameter
can be specified multiple times.
**--kernel-cmdline <parameters>**::
specify default kernel command line parameters
**--kernel-only**::
only install kernel drivers and firmware files
**--no-kernel**::
do not install kernel drivers and firmware files
**--early-microcode**::
Combine early microcode with ramdisk
**--no-early-microcode**::
Do not combine early microcode with ramdisk
**--print-cmdline**::
print the kernel command line for the current disk layout
**--mdadmconf**::
include local _/etc/mdadm.conf_
**--nomdadmconf**::
do not include local _/etc/mdadm.conf_
**--lvmconf**::
include local _/etc/lvm/lvm.conf_
**--nolvmconf**::
do not include local _/etc/lvm/lvm.conf_
**--fscks** [LIST]::
add a space-separated list of fsck tools, in addition to _dracut.conf_'s
specification; the installation is opportunistic (non-existing tools are
ignored)
**--libdirs** _<list of directories>_::
Specify a space-separated list of directories to look for libraries to
include in the generic initramfs. This parameter can be specified multiple
times.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --libdirs "dir1 dir2" ...
----
===============================
**--kernel-cmdline <parameters>**::
Specify default kernel command line parameters.
**--kernel-only**::
Only install kernel drivers and firmware files.
**--no-kernel**::
Do not install kernel drivers and firmware files.
**--early-microcode**::
Combine early microcode with ramdisk.
**--no-early-microcode**::
Do not combine early microcode with ramdisk.
**--print-cmdline**::
Print the kernel command line for the current disk layout.
**--mdadmconf**::
Include local _/etc/mdadm.conf_ file.
**--nomdadmconf**::
Do not include local _/etc/mdadm.conf_ file.
**--lvmconf**::
Include local _/etc/lvm/lvm.conf_ file.
**--nolvmconf**::
Do not include local _/etc/lvm/lvm.conf_ file.
**--fscks** _<list of fsck tools>_::
Add a space-separated list of fsck tools, in addition to _dracut.conf_'s
specification; the installation is opportunistic (non-existing tools are
ignored).
+
[NOTE]
===============================
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --fscks "fsck.foo barfsck" ...
@@ -236,60 +260,65 @@ example:
===============================
**--nofscks**::
inhibit installation of any fsck tools
Inhibit installation of any fsck tools.
**--strip**::
strip binaries in the initramfs (default)
Strip binaries in the initramfs (default).
**--aggressive-strip**::
Strip more than just debug symbol and sections, for a smaller initramfs
build. The --strip option must also be specified.
**--nostrip**::
do not strip binaries in the initramfs
Do not strip binaries in the initramfs.
**--hardlink**::
hardlink files in the initramfs (default)
Hardlink files in the initramfs (default).
**--nohardlink**::
do not hardlink files in the initramfs
Do not hardlink files in the initramfs.
**--prefix** _<dir>_::
prefix initramfs files with the specified directory
Prefix initramfs files with the specified directory.
**--noprefix**::
do not prefix initramfs files (default)
Do not prefix initramfs files (default).
**-h, --help**::
display help text and exit.
Display help text and exit.
**--debug**::
output debug information of the build process
Output debug information of the build process.
**-v, --verbose**::
increase verbosity level (default is info(4))
Increase verbosity level (default is info(4)).
**--version**::
display version and exit
Display version and exit.
**-q, --quiet**:: decrease verbosity level (default is info(4))
**-q, --quiet**::
Decrease verbosity level (default is info(4)).
**-c, --conf** _<dracut configuration file>_::
specify configuration file to use.
Specify configuration file to use.
+
Default:
_/etc/dracut.conf_
**--confdir** _<configuration directory>_::
specify configuration directory to use.
Specify configuration directory to use.
+
Default:
_/etc/dracut.conf.d_
**--tmpdir** _<temporary directory>_::
specify temporary directory to use.
Specify temporary directory to use.
+
Default:
_/var/tmp_
**-r, --sysroot** _<sysroot directory>_::
specify the sysroot directory to collect files from.
Specify the sysroot directory to collect files from.
This is useful to create the initramfs image from
a cross-compiled sysroot directory. For the extra helper
variables, see *ENVIRONMENT* below.
@@ -297,22 +326,23 @@ Default:
Default:
_empty_
**--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.
**--sshkey** _<sshkey file>_::
SSH key file used with ssh-client module.
**--logfile** _<logfile>_:: logfile to use; overrides any setting from
the configuration files.
**--logfile** _<logfile>_::
Logfile to use; overrides any setting from the configuration files.
+
Default:
_/var/log/dracut.log_
**-l, --local**::
activates the local mode. dracut will use modules from the current working
Activates the local mode. dracut will use modules from the current working
directory instead of the system-wide installed modules in
_/usr/lib/dracut/modules.d_.
This is useful when running dracut from a git checkout.
**-H, --hostonly**::
Host-Only mode: Install only what is needed for booting the local host
Host-only mode: Install only what is needed for booting the local host
instead of a generic host and generate host-specific configuration.
+
[WARNING]
@@ -322,28 +352,47 @@ provide a valid _/etc/fstab_.
====
**-N, --no-hostonly**::
Disable Host-Only mode
Disable host-only mode.
**--hostonly-cmdline**:
Store kernel command line arguments needed in the initramfs
**--hostonly-mode _<mode>_**::
Specify the host-only mode to use. _<mode>_ could be one of "sloppy" or
"strict".
In "sloppy" host-only mode, extra drivers and modules will be installed, so
minor hardware change won't make the image unbootable (e.g. changed
keyboard), and the image is still portable among similar hosts.
With "strict" mode enabled, anything not necessary for booting the local
host in its current state will not be included, and modules may do some
extra job to save more space. Minor change of hardware or environment could
make the image unbootable.
+
Default:
_sloppy_
**--no-hostonly-cmdline**:
Do not store kernel command line arguments needed in the initramfs
**--hostonly-cmdline**::
Store kernel command line arguments needed in the initramfs.
**--no-hostonly-default-device**:
**--no-hostonly-cmdline**::
Do not store kernel command line arguments needed in the initramfs.
**--no-hostonly-default-device**::
Do not generate implicit host devices like root, swap, fstab, etc.
Use "--mount" or "--add-device" to explicitly add devices as needed.
**--hostonly-i18n**:
Install only needed keyboard and font files according to the host configuration (default).
**--hostonly-i18n**::
Install only needed keyboard and font files according to the host
configuration (default).
**--no-hostonly-i18n**:
**--no-hostonly-i18n**::
Install all keyboard and font files available.
**--hostonly-nics** _<list of nics>_::
Only enable listed NICs in the initramfs. The list can be empty, so other
modules can install only the necessary network drivers.
**--persistent-policy** _<policy>_::
Use _<policy>_ to address disks and partitions.
_<policy>_ can be any directory name found in /dev/disk.
E.g. "by-uuid", "by-label"
_<policy>_ can be any directory name found in /dev/disk (e.g. "by-uuid",
"by-label"), or "mapper" to use /dev/mapper device names (default).
**--fstab**::
Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
@@ -357,7 +406,7 @@ provide a valid _/etc/fstab_.
be specified, see fstab manpage for the details.
The default _<filesystem options>_ is "defaults".
The default _<dump frequency>_ is "0".
the default _<fsck order>_ is "2".
The default _<fsck order>_ is "2".
**--mount** "_<mountpoint>_"::
Like above, but _<device>_, _<filesystem type>_ and _<filesystem options>_
@@ -365,22 +414,22 @@ provide a valid _/etc/fstab_.
**--add-device** _<device>_ ::
Bring up _<device>_ in initramfs, _<device>_ should be the device name.
This can be useful in hostonly mode for resume support when your swap is on
This can be useful in host-only mode for resume support when your swap is on
LVM or an encrypted partition.
[NB --device can be used for compatibility with earlier releases]
**-i, --include** _<SOURCE>_ _<TARGET>_::
include the files in the SOURCE directory into the
Include the files in the SOURCE directory into the
TARGET directory in the final initramfs. If SOURCE is a file, it will be
installed to TARGET in the final initramfs. This parameter can be specified
multiple times.
**-I, --install** _<file list>_::
install the space separated list of files into the initramfs.
Install the space separated list of files into the initramfs.
+
[NOTE]
===============================
If [LIST] has multiple arguments, then you have to put these in quotes. For
If the list has multiple arguments, then you have to put these in quotes. For
example:
----
# dracut --install "/bin/foo /sbin/bar" ...
@@ -388,12 +437,12 @@ example:
===============================
**--install-optional** _<file list>_::
install the space separated list of files into the initramfs, if they exist.
Install the space separated list of files into the initramfs, if they exist.
**--gzip**::
Compress the generated initramfs using gzip. This will be done by default,
unless another compression option or --no-compress is passed. Equivalent to
"--compress=gzip -9"
"--compress=gzip -9".
**--bzip2**::
Compress the generated initramfs using bzip2.
@@ -401,7 +450,7 @@ example:
[WARNING]
====
Make sure your kernel has bzip2 decompression support compiled in, otherwise you
will not be able to boot. Equivalent to "--compress=bzip2"
will not be able to boot. Equivalent to "--compress=bzip2 -9".
====
**--lzma**::
@@ -410,7 +459,7 @@ will not be able to boot. Equivalent to "--compress=bzip2"
[WARNING]
====
Make sure your kernel has lzma decompression support compiled in, otherwise you
will not be able to boot. Equivalent to "lzma --compress=lzma -9"
will not be able to boot. Equivalent to "--compress=lzma -9 -T0".
====
**--xz**::
@@ -420,31 +469,34 @@ will not be able to boot. Equivalent to "lzma --compress=lzma -9"
====
Make sure your kernel has xz decompression support compiled in, otherwise you
will not be able to boot. Equivalent to
"lzma --compress=xz --check=crc32 --lzma2=dict=1MiB"
"--compress=xz --check=crc32 --lzma2=dict=1MiB -T0".
====
**--lzo**::
Compress the generated initramfs using lzop.
+
[WARNING]
====
Make sure your kernel has lzo decompression support compiled in, otherwise you
will not be able to boot.
will not be able to boot. Equivalent to "--compress=lzop -9".
====
**--lz4**::
Compress the generated initramfs using lz4.
+
[WARNING]
====
Make sure your kernel has lz4 decompression support compiled in, otherwise you
will not be able to boot.
will not be able to boot. Equivalent to "--compress=lz4 -l -9".
====
**--zstd**::
Compress the generated initramfs using Zstandard.
+
[WARNING]
====
Make sure your kernel has zstd decompression support compiled in, otherwise you
will not be able to boot.
will not be able to boot. Equivalent to "--compress=zstd -15 -q -T0".
====
**--compress** _<compressor>_::
@@ -453,7 +505,14 @@ will not be able to boot.
program with known-working arguments. If you pass a quoted string with
arguments, it will be called with exactly those arguments. Depending on what
you pass, this may result in an initramfs that the kernel cannot decompress.
The default value can also be set via the _INITRD_COMPRESS_ environment variable.
The default value can also be set via the _INITRD_COMPRESS_ environment
variable.
**--squash-compressor** _<compressor>_::
Compress the squashfs image using the passed compressor and compressor
specific options for mksquashfs. You can refer to mksquashfs manual for
supported compressors and compressor specific options. If squash module is
not called when building the initramfs, this option will not take effect.
**--no-compress**::
Do not compress the generated initramfs. This will override any other
@@ -475,16 +534,16 @@ will not be able to boot.
Keep the initramfs temporary directory for debugging purposes.
**--printsize**::
Print out the module install size
Print out the module install size.
**--profile**:
Output profile information of the build process
**--profile**::
Output profile information of the build process.
**--ro-mnt**:
**--ro-mnt**::
Mount / and /usr read-only by default.
**-L, --stdlog** _<level>_::
[0-6] Specify logging level (to standard error)
[0-6] Specify logging level (to standard error).
----
0 - suppress any messages
1 - only fatal errors
@@ -499,36 +558,57 @@ will not be able to boot.
Regenerate all initramfs images at the default location with the kernel
versions found on the system. Additional parameters are passed through.
**--loginstall _<DIR>_**::
Log all files installed from the host to _<DIR>_.
**-p, --parallel**::
Try to execute tasks in parallel. Currently only supported with
**--regenerate-all** (build initramfs images for all kernel
versions simultaneously).
**--noimageifnotneeded**::
Do not create an image in host-only mode, if no kernel driver is needed
and no /etc/cmdline/*.conf will be generated into the initramfs.
**--loginstall _<directory>_**::
Log all files installed from the host to _<directory>_.
**--uefi**::
Instead of creating an initramfs image, dracut will create an UEFI executable,
which can be executed by an UEFI BIOS. The default output filename is
_<EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi_. <EFI> might be
_/efi_, _/boot_ or _/boot/efi_ depending on where the ESP partition is mounted.
The <BUILD_ID> is taken from BUILD_ID in _/usr/lib/os-release_ or if it exists
_/etc/os-release_ and is left out, if BUILD_ID is non-existant or empty.
Instead of creating an initramfs image, dracut will create an UEFI
executable, which can be executed by an UEFI BIOS. The default output
filename is _<EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi_.
<EFI> might be _/efi_, _/boot_ or _/boot/efi_ depending on where the ESP
partition is mounted. The <BUILD_ID> is taken from BUILD_ID in
_/usr/lib/os-release_ or if it exists _/etc/os-release_ and is left out,
if BUILD_ID is non-existant or empty.
**--no-uefi**::
Disables UEFI mode.
**--no-machineid**::
affects the default output filename of **--uefi** and will discard the <MACHINE_ID>
part.
Affects the default output filename of **--uefi** and will discard the
<MACHINE_ID> part.
**--uefi-stub _<FILE>_**::
Specifies the UEFI stub loader, which will load the attached kernel, initramfs and
kernel command line and boots the kernel. The default is
_$prefix/lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_
**--uefi-stub _<file>_**::
Specifies the UEFI stub loader, which will load the attached kernel,
initramfs and kernel command line and boots the kernel. The default is
_$prefix/lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_.
**--uefi-splash-image _<FILE>_**::
Specifies the UEFI stub loader's splash image. Requires bitmap (**.bmp**) image
format.
**--uefi-splash-image _<file>_**::
Specifies the UEFI stub loader's splash image. Requires bitmap (**.bmp**)
image format.
**--kernel-image _<FILE>_**::
Specifies the kernel image, which to include in the UEFI executable. The default is
_/lib/modules/<KERNEL-VERSION>/vmlinuz_ or _/boot/vmlinuz-<KERNEL-VERSION>_
**--kernel-image _<file>_**::
Specifies the kernel image, which to include in the UEFI executable. The
default is _/lib/modules/<KERNEL-VERSION>/vmlinuz_ or
_/boot/vmlinuz-<KERNEL-VERSION>_.
**--enhanced-cpio**::
Attempt to use the dracut-cpio binary, which optimizes archive creation for
copy-on-write filesystems by using the copy_file_range(2) syscall via Rust's
io::copy(). When specified, initramfs archives are also padded to ensure
optimal data alignment for extent sharing. To retain reflink data
deduplication benefits, this should be used alongside the **--no-compress**
and **--nostrip** parameters, with initramfs source files, **--tmpdir**
staging area and destination all on the same copy-on-write capable
filesystem.
ENVIRONMENT
-----------
@@ -662,7 +742,7 @@ _/etc/cmdline.d/*.conf_::
AVAILABILITY
------------
The dracut command is part of the dracut package and is available from
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
link:$$https://github.com/dracutdevs/dracut$$[https://github.com/dracutdevs/dracut]
AUTHORS
-------

View File

@@ -1,7 +1,7 @@
dracut {mainversion}
====================
:author: Harald Hoyer
:email: harald@redhat.com
:email: harald@profian.com
:revnumber: {version}
:language: bash
@@ -50,7 +50,7 @@ computer. This can be:
* The root file system itself
* A boot image on an optical disc
* A small ext2/ext3 or FAT-formatted partition on a local disk
* A small ext2/ext3/ext4 or FAT-formatted partition on a local disk
(a _boot partition_)
* A TFTP server (on systems that can boot from Ethernet)

View File

@@ -56,7 +56,7 @@ root=PARTUUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7
[listing]
.Example
--
rootfstype=ext3
rootfstype=ext4
--
**rootflags=**__<mount options>__::
@@ -134,7 +134,7 @@ menuentry 'Live Fedora 20' --class fedora --class gnu-linux --class gnu --class
Misc
~~~~
**rd.emergency=**__[reboot|poweroff|halt]__::
specify, what action to execute in case of a critical failure. rd.shell=0 also
specify, what action to execute in case of a critical failure. rd.shell=0 must also
be specified.
**rd.driver.blacklist=**__<drivername>__[,__<drivername>__,...]::
@@ -151,7 +151,7 @@ Misc
**rd.retry=**__<seconds>__::
specify how long dracut should retry the initqueue to configure devices.
The default is 30 seconds. After 2/3 of the time, degraded raids are force
The default is 180 seconds. After 2/3 of the time, degraded raids are force
started. If you have hardware, which takes a very long time to announce its
drives, you might want to extend this value.
@@ -221,7 +221,7 @@ It should be attached to any report about dracut problems.
drop to a shell at the end
**rd.break=**__{cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot|cleanup}__::
drop to a shell on defined breakpoint
drop to a shell before the defined breakpoint starts
**rd.udev.info**::
set udev to loglevel info
@@ -453,6 +453,11 @@ it, e.g. `rd.luks.name=cccc=mykeys`, otherwise it gets closed
when not needed anymore.
===============================
**rd.luks.key.tout=0**::
specify how many times dracut will try to read the keys specified in in
rd.luk.key. This gives a chance to the removable device containing the key
to initialise.
MD RAID
~~~~~~~
**rd.md=0**::
@@ -575,6 +580,11 @@ USB Android phone::
* enp0s29u1u2
=====================
The following options are supported by the 'network-legacy' dracut
module. Other network modules might support a slightly different set of
options; refer to the documentation of the specific network module in use. For
NetworkManager, see *nm-initrd-generator*(8).
**ip=**__{dhcp|on|any|dhcp6|auto6|either6|link6|single-dhcp}__::
dhcp|on|any::: get ip from dhcp server from all interfaces. If netroot=dhcp,
loop sequentially through all interfaces (eth0, eth1, ...) and use the first
@@ -584,7 +594,7 @@ USB Android phone::
opposed to one after another. After the first DHCP response is received,
stop DHCP on all other interfaces. This gives the fastest boot time by
using the IP on interface for which DHCP succeeded first during early boot.
Caveat: Does not apply to Network Manager and to SUSE using wicked.
Caveat: Does not apply to Network Manager.
auto6::: IPv6 autoconfiguration
@@ -730,7 +740,7 @@ NFS
Default is 1.
**rd.net.timeout.dhcp=**__<arg>__::
If this option is set, dhclient is called with "-timeout <arg>".
If this option is set, dhclient is called with "--timeout <arg>".
**rd.net.timeout.iflink=**__<seconds>__::
Wait <seconds> until link shows up. Default is 60 seconds.
@@ -885,6 +895,18 @@ NOTE: letters in the MAC-address must be lowercase!
NVMf
~~~~
**rd.nonvmf**::
Disable NVMf
**rd.nvmf.nonbft**::
Disable connecting to targets from the NVMe Boot Firmware Table. Without
this parameter, NBFT connections will take precedence over _rd.nvmf.discover_.
**rd.nvmf.nostatic**::
Disable connecting to targets that have been statically configured when
the initramfs was built. Targets specified with rd.nvmf.discover on the
kernel command line will still be tried.
**rd.nvmf.hostnqn=**__<hostNQN>__::
NVMe host NQN to use
@@ -896,9 +918,19 @@ NVMf
_<traddr>_ and the optionally _<host_traddr>_ or _<trsvcid>_.
The first argument specifies the transport to use; currently only
'rdma', 'fc', or 'tcp' are supported.
The _<traddr>_ parameter can be set to 'auto' to select
autodiscovery; in that case all other parameters are ignored.
This parameter can be specified multiple times.
+
[listing]
.Examples
--
rd.nvmf.discover=tcp,192.168.10.10,,4420
rd.nvmf.discover=fc,nn-0x201700a05634f5bf:pn-0x201900a05634f5bf,nn-0x200000109b579ef3:pn-0x100000109b579ef3
--
**rd.nvmf.discover=fc,auto**::
This special syntax determines that Fibre Channel autodiscovery
is to be used rather than regular NVMe discovery. It takes precedence
over all other _rd.nvmf.discover=_ arguments.
NBD
~~~
@@ -918,6 +950,25 @@ NOTE:
If "exportname" instead of "port" is given the standard port is used.
Newer versions of nbd are only supported with "exportname".
VIRTIOFS
~~~~~~~~
**root=**virtiofs:__<mount-tag>__::
mount virtiofs share using the tag <mount-tag>.
The tag name is arbitrary and must match the tag given in the qemu '-device' command.
**rootfstype=**virtiofs **root=**__<mount-tag>__::
mount virtiofs share using the tag <mount-tag>.
The tag name is arbitrary and must match the tag given in the qemu '-device' command.
Both formats are supported by the 'virtiofs' dracut module.
See https://gitlab.com/virtio-fs/virtiofsd for more information.
[listing]
.Example
--
root=virtiofs:host rw
--
DASD
~~~~
**rd.dasd=**....::
@@ -1075,6 +1126,13 @@ NOTE: There must be enough free RAM available to hold the complete image.
+
This method is very suitable for diskless boots.
**rd.minmem=**__<megabyte>__::
Specify minimum free RAM in MB after copying a live disk image into memory.
The default is 1024.
+
This parameter only applies together with the parameters rd.writable.fsimg
or rd.live.ram.
**root=**live:__<url>__::
Boots a live image retrieved from __<url>__. Requires the dracut 'livenet'
module. Valid handlers: __http, https, ftp, torrent, tftp__.
@@ -1129,6 +1187,10 @@ rd.live.overlay=/dev/sdb1:persistent-overlay.img
rd.live.overlay=UUID=99440c1f-8daa-41bf-b965-b7240a8996f4
--
**rd.live.overlay.cowfs=**__[btrfs|ext4|xfs]__::
Specifies the filesystem to use when formatting the overlay partition.
The default is ext4.
**rd.live.overlay.size=**__<size_MiB>__::
Specifies a non-persistent Device-mapper overlay size in MiB. The default is
_32768_.
@@ -1235,8 +1297,8 @@ masterkey=/etc/keys/kmk-trusted.blob
masterkeytype=trusted
--
**evmkey=**__<EVM key path name>__::
Set the path name of the EVM key.
**evmkey=**__<EVM HMAC key path name>__::
Set the path name of the EVM HMAC key.
+
[listing]
.Example
@@ -1244,6 +1306,15 @@ masterkeytype=trusted
evmkey=/etc/keys/evm-trusted.blob
--
**evmx509=**__<EVM X.509 cert path name>__::
Set the path name of the EVM X.509 certificate.
+
[listing]
.Example
--
evmx509=/etc/keys/x509_evm.der
--
**ecryptfskey=**__<eCryptfs key path name>__::
Set the path name of the eCryptfs key.
+
@@ -1315,10 +1386,6 @@ rd_LVM_LV:: rd.lvm.lv
rd_NO_LVM:: rd.lvm=0
rd_LVM_SNAPSHOT:: rd.lvm.snapshot
rd_LVM_SNAPSIZE:: rd.lvm.snapsize
rd_LVM_VG:: rd.lvm.vg
rd_NO_MDADMCONF:: rd.md.conf=0

View File

@@ -36,20 +36,20 @@ Configuration files must have the extension .conf; other extensions are ignored.
Add a space-separated list of dracut modules to call when building the
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.
*dracutmodules+=*" __<dracut modules>__ "::
Specify a space-separated list of dracut modules to call when building the
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.
This option forces dracut to only include the specified dracut modules.
In most cases the "add_dracutmodules" option is what you want to use.
*force_add_dracutmodules+=*" __<dracut modules>__ "::
Force to add a space-separated list of dracut modules to the default set of
modules, when host-only mode is specified. This parameter can be specified
multiple times.
*omit_dracutmodules+=*" __<dracut modules>__ "::
Omit a space-separated list of dracut modules to call when building the
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.
*drivers+=*" __<kernel modules>__ "::
Specify a space-separated list of kernel modules to exclusively include in
the initramfs. The kernel modules have to be specified without the ".ko"
suffix.
*dracutmodules+=*" __<dracut modules>__ "::
Specify a space-separated list of dracut modules to call when building the
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.
This option forces dracut to only include the specified dracut modules.
In most cases the "add_dracutmodules" option is what you want to use.
*add_drivers+=*" __<kernel modules>__ "::
Specify a space-separated list of kernel modules to add to the initramfs.
@@ -63,15 +63,24 @@ Configuration files must have the extension .conf; other extensions are ignored.
Specify a space-separated list of kernel modules not to add to the
initramfs. The kernel modules have to be specified without the ".ko" suffix.
*drivers+=*" __<kernel modules>__ "::
Specify a space-separated list of kernel modules to exclusively include in
the initramfs. The kernel modules have to be specified without the ".ko"
suffix.
*filesystems+=*" __<filesystem names>__ "::
Specify a space-separated list of kernel filesystem modules to exclusively
include in the generic initramfs.
*drivers_dir=*"__<kernel modules directory>__"::
Specify the directory, where to look for kernel modules
Specify the directory where to look for kernel modules.
*fw_dir+=*" :__<dir>__[:__<dir>__ ...] "::
Specify additional directories, where to look for firmwares, separated by :
Specify additional colon-separated list of directories where to look for
firmware files.
*libdirs+=*" __<dir>__[ __<dir>__ ...] "::
Specify a space-separated list of directories where to look for libraries.
*install_items+=*" __<file>__[ __<file>__ ...] "::
Specify additional files to include in the initramfs, separated by spaces.
@@ -80,28 +89,61 @@ Configuration files must have the extension .conf; other extensions are ignored.
Specify additional files to include in the initramfs, separated by spaces,
if they exist.
*compress=*"__{cat|bzip2|lzma|xz|gzip|lzo|lz4|zstd|<compressor [args ...]>}__"::
*compress=*"__{cat|bzip2|lzma|xz|gzip|lzop|lz4|zstd|<compressor [args ...]>}__"::
Compress the generated initramfs using the passed compression program. If
you pass it just the name of a compression program, it will call that
program with known-working arguments. If you pass arguments, it will be called
with exactly those arguments. Depending on what you pass, this may result in
an initramfs that the kernel cannot decompress.
program with known-working arguments. If you pass arguments, it will be
called with exactly those arguments. Depending on what you pass, this may
result in an initramfs that the kernel cannot decompress.
To disable compression, use "cat".
*squash_compress=*"__{<compressor [args ...]>}__"::
Compress the squashfs image using the passed compressor and compressor
specific options for mksquashfs. You can refer to mksquashfs manual for
supported compressors and compressor specific options. If squash module is
not called when building the initramfs, this option will not take effect.
*do_strip=*"__{yes|no}__"::
Strip binaries in the initramfs (default=yes)
Strip binaries in the initramfs (default=yes).
*aggressive_strip=*"__{yes|no}__"::
Strip more than just debug symbol and sections, for a smaller initramfs
build. The "do_strip=yes" option must also be specified (default=no).
*do_hardlink=*"__{yes|no}__"::
Hardlink files in the initramfs (default=yes).
*prefix=*" __<directory>__ "::
Prefix initramfs files with __<directory>__.
*hostonly=*"__{yes|no}__"::
Host-Only mode: Install only what is needed for booting the local host
instead of a generic host and generate host-specific configuration.
Host-only mode: Install only what is needed for booting the local host
instead of a generic host and generate host-specific configuration
(default=no).
*hostonly_mode=*"__{sloppy|strict}__"::
Specify the host-only mode to use (default=sloppy).
In "sloppy" host-only mode, extra drivers and modules will be installed, so
minor hardware change won't make the image unbootable (e.g. changed
keyboard), and the image is still portable among similar hosts.
With "strict" mode enabled, anything not necessary for booting the local
host in its current state will not be included, and modules may do some
extra job to save more space. Minor change of hardware or environment could
make the image unbootable.
*hostonly_cmdline=*"__{yes|no}__"::
If set to "yes", store the kernel command line arguments needed in the initramfs
If set to "yes", store the kernel command line arguments needed in the
initramfs. If **hostonly="yes"** and this option is not configured, it's
automatically set to "yes".
*hostonly_nics+=*" [__<nic>__[ __<nic>__ ...]] "::
Only enable listed NICs in the initramfs. The list can be empty, so other
modules can install only the necessary network drivers.
*persistent_policy=*"__<policy>__"::
Use _<policy>_ to address disks and partitions.
_<policy>_ can be any directory name found in /dev/disk.
E.g. "by-uuid", "by-label"
_<policy>_ can be any directory name found in /dev/disk (e.g. "by-uuid",
"by-label"), or "mapper" to use /dev/mapper device names (default=mapper).
*tmpdir=*"__<temporary directory>__"::
Specify temporary directory to use.
@@ -113,21 +155,21 @@ provide a valid _/etc/fstab_.
====
*use_fstab=*"__{yes|no}__"::
Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
Use _/etc/fstab_ instead of _/proc/self/mountinfo_ (default=no).
*add_fstab+=*" __<filename>__ "::
Add entries of __<filename>__ to the initramfs /etc/fstab.
*add_device+=*" __<device>__ "::
Bring up _<device>_ in initramfs, _<device>_ should be the device name.
This can be useful in hostonly mode for resume support when your swap is on
This can be useful in host-only mode for resume support when your swap is on
LVM an encrypted partition.
*mdadmconf=*"__{yes|no}__"::
Include local _/etc/mdadm.conf_ (default=yes)
Include local _/etc/mdadm.conf_ (default=no).
*lvmconf=*"__{yes|no}__"::
Include local _/etc/lvm/lvm.conf_ (default=yes)
Include local _/etc/lvm/lvm.conf_ (default=no).
*fscks=*" __<fsck tools>__ "::
Add a space-separated list of fsck tools. If nothing is specified, the
@@ -136,19 +178,19 @@ provide a valid _/etc/fstab_.
(non-existing tools are ignored).
*nofscks=*"__{yes|no}__"::
If specified, inhibit installation of any fsck tools.
If specified, inhibit installation of any fsck tools (default=no).
*ro_mnt=*"__{yes|no}__"::
Mount _/_ and _/usr_ read-only by default.
Mount _/_ and _/usr_ read-only by default (default=no).
*kernel_cmdline=*"__parameters__"::
Specify default kernel command line parameters
Specify default kernel command line parameters.
*kernel_only=*"__{yes|no}__"::
Only install kernel drivers and firmware files. (default=no)
Only install kernel drivers and firmware files (default=no).
*no_kernel=*"__{yes|no}__"::
Do not install kernel drivers and firmware files (default=no)
Do not install kernel drivers and firmware files (default=no).
*acpi_override=*"__{yes|no}__"::
[WARNING] ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING! +
@@ -166,22 +208,40 @@ provide a valid _/etc/fstab_.
Directory to search for ACPI tables if acpi_override= is set to yes.
*early_microcode=*"{yes|no}"::
Combine early microcode with ramdisk (default=yes)
Combine early microcode with ramdisk (default=yes).
*stdloglvl*="__\{0-6\}__"::
Set logging to standard error level.
Specify logging level for standard error (default=4).
[NOTE]
===============================
Logging levels:
----
0 - suppress any messages
1 - only fatal errors
2 - all errors
3 - warnings
4 - info
5 - debug info (here starts lots of output)
6 - trace info (and even more)
----
===============================
*sysloglvl*="__\{0-6\}__"::
Set logging to syslog level.
Specify logging level for syslog (default=0).
*fileloglvl=*"__\{0-6\}__"::
Set logging to file level.
Specify logging level for logfile (default=4).
*logfile=*"__<file>__"::
Path to log file.
Path to logfile.
*sshkey=*"__<file>__"::
SSH key file used with ssh-client module.
*show_modules=*"__{yes|no}__"::
Print the name of the included modules to standard output during build.
Print the name of the included modules to standard output during build
(default=no).
*i18n_vars=*"__<variable mapping>__"::
Distribution specific variable mapping.
@@ -192,29 +252,68 @@ provide a valid _/etc/fstab_.
Default is "eurlatgr".
*i18n_install_all=*"__{yes|no}__"::
Install everything regardless of generic or hostonly mode.
Install everything regardless of generic or host-only mode (default=no).
*reproducible=*"__{yes|no}__"::
Create reproducible images.
Create reproducible images (default=no).
*loginstall=*"__<DIR>__"::
Log all files installed from the host to _<DIR>_.
*noimageifnotneeded=*"__{yes|no}__"::
Do not create an image in host-only mode, if no kernel driver is needed
and no /etc/cmdline/*.conf will be generated into the initramfs
(default=no).
*uefi_stub=*"_<FILE>_"::
Specifies the UEFI stub loader, which will load the attached kernel, initramfs and
kernel command line and boots the kernel. The default is
_/lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_
*loginstall=*"__<directory>__"::
Log all files installed from the host to _<directory>_.
*uefi_splash_image=*"_<FILE>_"::
Specifies the UEFI stub loader's splash image. Requires bitmap (**.bmp**) image format.
*uefi=*"__{yes|no}__"::
Instead of creating an initramfs image, dracut will create an UEFI
executable, which can be executed by an UEFI BIOS (default=no).
The default output filename is
_<EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi_.
<EFI> might be _/efi_, _/boot_ or _/boot/efi_ depending on where the ESP
partition is mounted. The <BUILD_ID> is taken from BUILD_ID in
_/usr/lib/os-release_ or if it exists _/etc/os-release_ and is left out,
if BUILD_ID is non-existant or empty.
*uefi_secureboot_cert=*"_<FILE>_", *uefi_secureboot_key=*"_<FILE>_"::
Specifies a certificate and corresponding key, which are used to sign the created UEFI executable.
Requires both certificate and key need to be specified and _sbsign_ to be installed.
*machine_id=*"__{yes|no}__"::
Affects the default output filename of the UEFI executable, including the
<MACHINE_ID> part (default=yes).
*kernel_image=*"_<FILE>_"::
Specifies the kernel image, which to include in the UEFI executable. The default is
_/lib/modules/<KERNEL-VERSION>/vmlinuz_ or _/boot/vmlinuz-<KERNEL-VERSION>_
*uefi_stub=*"_<file>_"::
Specifies the UEFI stub loader, which will load the attached kernel,
initramfs and kernel command line and boots the kernel. The default is
_/lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_.
*uefi_splash_image=*"_<file>_"::
Specifies the UEFI stub loader's splash image. Requires bitmap (**.bmp**)
image format.
*uefi_secureboot_cert=*"_<file>_", *uefi_secureboot_key=*"_<file>_"::
Specifies a certificate and corresponding key, which are used to sign the
created UEFI executable.
Requires both certificate and key need to be specified and _sbsign_ to be
installed.
*uefi_secureboot_engine=*"_parameter_"::
Specifies an engine to use when signing the created UEFI executable. E.g. "pkcs11"
*kernel_image=*"_<file>_"::
Specifies the kernel image, which to include in the UEFI executable. The
default is _/lib/modules/<KERNEL-VERSION>/vmlinuz_ or
_/boot/vmlinuz-<KERNEL-VERSION>_.
*enhanced_cpio=*"__{yes|no}__"::
Attempt to use the dracut-cpio binary, which optimizes archive creation for
copy-on-write filesystems (default=no).
When specified, initramfs archives are also padded to ensure optimal data
alignment for extent sharing. To retain reflink data deduplication benefits,
this should be used alongside the **compress="cat"** and **do_strip="no"**
parameters, with initramfs source files, **tmpdir** staging area and
destination all on the same copy-on-write capable filesystem.
*parallel=*"__{yes|no}__"::
If set to _yes_, try to execute tasks in parallel (currently only supported
for _--regenerate-all_).
Files
-----

View File

@@ -5,9 +5,13 @@ To create a initramfs image, the most simple command is:
This will generate a general purpose initramfs image, with all possible
functionality resulting of the combination of the installed dracut modules and
system tools. The image is /boot/initramfs-_++<kernel version>++_.img and
contains the kernel modules of the currently active kernel with version
_++<kernel version>++_.
system tools. The image, depending on bootloader specification, can be
_/efi/_++<machine-id>++_/_++<kernel-version>++_/initrd_,
_/boot/_++<machine-id>++_/_++<kernel-version>++_/initrd_,
_/boot/efi/_++<machine-id>++_/_++<kernel-version>++_/initrd_,
_/lib/modules/_++<kernel-version>++_/initrd_ or
_/boot/initramfs-_++<kernel-version>++_.img_ and contains the kernel modules of
the currently active kernel with version _++<kernel-version>++_.
If the initramfs image already exists, dracut will display an error message, and
to overwrite the existing image, you have to use the --force option.
@@ -103,7 +107,7 @@ The kernel command line can also be provided by the dhcp server with the
root-path option. See <<NetworkBoot>>.
For a full reference of all kernel command line parameters,
see *dracut.cmdline*(5).
see *dracut.cmdline*(7).
To get a quick start for the suitable kernel command line on your system,
use the __--print-cmdline__ option:
@@ -161,8 +165,8 @@ a modern init system, like systemd.
==== Blacklisting Kernel Modules
Sometimes it is required to prevent the automatic kernel module loading of a
specific kernel module. To do this, just add rd.blacklist=_++<kernel module
name>++_, with _++<kernel module name>++_ not containing the _.ko_
specific kernel module. To do this, just add rd.driver.blacklist=_++<kernel
module name>++_, with _++<kernel module name>++_ not containing the _.ko_
suffix, to the kernel command line. For example:
----
rd.driver.blacklist=mptsas rd.driver.blacklist=nouveau
@@ -228,10 +232,10 @@ creation time.
----
# dracut --install 'strace fsck.ext3 ssh' initramfs-dbg.img
# dracut --install 'strace fsck.ext4 ssh' initramfs-dbg.img
----
This will create an initramfs with the strace, fsck.ext3 and ssh executables,
This will create an initramfs with the strace, fsck.ext4 and ssh executables,
together with the libraries needed to start those. The --install option can be
specified multiple times.
@@ -279,10 +283,7 @@ This will reduce the size of the initramfs image significantly.
== Troubleshooting
If the boot process does not succeed, you have several options to debug the
situation. Some of the basic operations are covered here. For more information
you should also visit:
https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
situation.
[[identifying-your-problem-area]]
=== Identifying your problem area
@@ -467,7 +468,7 @@ any logical volumes.
/dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4"
/dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member"
/dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS"
/dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3"
/dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext4"
/dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap"
----
+

View File

@@ -13,12 +13,15 @@ SYNOPSIS
--------
*lsinitrd* ['OPTION...'] [<image> [<filename> [<filename> [...] ]]]
*lsinitrd* ['OPTION...'] -k <kernel-version>
*lsinitrd* ['OPTION...'] -k <kernel version>
DESCRIPTION
-----------
lsinitrd shows the contents of an initramfs image. if <image> is omitted, then
lsinitrd uses the default image _/boot/<machine-id>/<kernel-version>/initrd_ or
lsinitrd uses the default image _/efi/<machine-id>/<kernel-version>/initrd_,
_/boot/<machine-id>/<kernel-version>/initrd_,
_/boot/efi/<machine-id>/<kernel-version>/initrd_,
_/lib/modules/<kernel-version>/initrd_ or
_/boot/initramfs-<kernel-version>.img_.
OPTIONS
@@ -53,7 +56,7 @@ OPTIONS
AVAILABILITY
------------
The lsinitrd command is part of the dracut package and is available from
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
link:$$https://github.com/dracutdevs/dracut$$[https://github.com/dracutdevs/dracut]
AUTHORS
-------

View File

@@ -1,20 +1,32 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# called by dracut
# Prerequisite check(s) for module.
check() {
require_binaries /bin/bash
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries bash || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# called by dracut
# Module dependency requirements.
depends() {
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# called by dracut
# Install the required file(s) and directories for the module in the initramfs.
install() {
# If another shell is already installed, do not use bash
[[ -x $initdir/bin/sh ]] && return
# Prefer bash as /bin/sh if it is available.
inst /bin/bash && ln -sf bash "${initdir}/bin/sh"
inst /bin/bash
# Prefer bash as default shell if no other shell is preferred.
[[ -L $initdir/bin/sh ]] || ln -sf bash "${initdir}/bin/sh"
}

View File

@@ -1,20 +1,32 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# called by dracut
# Prerequisite check(s) for module.
check() {
require_binaries /bin/dash
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries dash || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# called by dracut
# Module dependency requirements.
depends() {
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# called by dracut
# Install the required file(s) and directories for the module in the initramfs.
install() {
# If another shell is already installed, do not use dash
[[ -x $initdir/bin/sh ]] && return
# Prefer dash as /bin/sh if it is available.
inst /bin/dash && ln -sf dash "${initdir}/bin/sh"
inst /bin/dash
# Prefer dash as default shell if no other shell is preferred.
[[ -L $initdir/bin/sh ]] || ln -sf dash "${initdir}/bin/sh"
}

View File

@@ -1,20 +1,34 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# called by dracut
# Prerequisite check(s) for module.
check() {
require_binaries /bin/mksh
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries mksh || return 1
require_binaries printf || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# called by dracut
# Module dependency requirements.
depends() {
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# called by dracut
# Install the required file(s) and directories for the module in the initramfs.
install() {
# If another shell is already installed, do not use mksh
[[ -x $initdir/bin/sh ]] && return
# Prefer mksh as /bin/sh if it is available.
inst /bin/mksh && ln -sf mksh "${initdir}/bin/sh"
inst /bin/mksh
inst printf
# Prefer mksh as default shell if no other shell is preferred.
[[ -L $initdir/bin/sh ]] || ln -sf mksh "${initdir}/bin/sh"
}

View File

@@ -43,10 +43,10 @@ install() {
"$systemdutildir"/systemd-modules-load \
"$systemdutildir"/systemd-vconsole-setup \
"$systemdutildir"/systemd-volatile-root \
"$systemdutildir"/systemd-sysroot-fstab-check \
"$systemdutildir"/system-generators/systemd-debug-generator \
"$systemdutildir"/system-generators/systemd-fstab-generator \
"$systemdutildir"/system-generators/systemd-gpt-auto-generator \
\
"$systemdsystemunitdir"/debug-shell.service \
"$systemdsystemunitdir"/cryptsetup.target \
"$systemdsystemunitdir"/cryptsetup-pre.target \
@@ -78,9 +78,8 @@ install() {
"$systemdsystemunitdir"/timers.target \
"$systemdsystemunitdir"/paths.target \
"$systemdsystemunitdir"/umount.target \
\
"$systemdsystemunitdir"/sys-kernel-config.mount \
\
"$systemdsystemunitdir"/modprobe@.service \
"$systemdsystemunitdir"/kmod-static-nodes.service \
"$systemdsystemunitdir"/systemd-tmpfiles-setup.service \
"$systemdsystemunitdir"/systemd-tmpfiles-setup-dev.service \
@@ -104,10 +103,7 @@ install() {
"$systemdsystemunitdir"/systemd-journald.service \
"$systemdsystemunitdir"/systemd-vconsole-setup.service \
"$systemdsystemunitdir"/systemd-volatile-root.service \
"$systemdsystemunitdir"/systemd-random-seed-load.service \
"$systemdsystemunitdir"/systemd-random-seed.service \
"$systemdsystemunitdir"/systemd-sysctl.service \
\
"$systemdsystemunitdir"/sysinit.target.wants/systemd-modules-load.service \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-ask-password-console.path \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-journald.service \
@@ -122,18 +118,14 @@ install() {
"$systemdsystemunitdir"/sysinit.target.wants/systemd-tmpfiles-setup.service \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-sysctl.service \
\
"$systemdsystemunitdir"/ctrl-alt-del.target \
"$systemdsystemunitdir"/reboot.target \
"$systemdsystemunitdir"/systemd-reboot.service \
"$systemdsystemunitdir"/syslog.socket \
\
"$systemdsystemunitdir"/slices.target \
"$systemdsystemunitdir"/system.slice \
"$systemdsystemunitdir"/-.slice \
\
"$tmpfilesdir"/systemd.conf \
\
journalctl systemctl \
echo swapoff \
kmod insmod rmmod modprobe modinfo depmod lsmod \
@@ -174,6 +166,8 @@ install() {
/etc/systemd/journald.conf.d/*.conf \
/etc/systemd/system.conf \
/etc/systemd/system.conf.d/*.conf \
"$systemdsystemconfdir"/modprobe@.service \
"$systemdsystemconfdir/modprobe@.service.d/*.conf" \
/etc/hosts \
/etc/hostname \
/etc/nsswitch.conf \
@@ -192,6 +186,7 @@ install() {
if ! [[ -e "$initdir/etc/machine-id" ]]; then
: > "$initdir/etc/machine-id"
chmod 444 "$initdir/etc/machine-id"
fi
# install adm user/group for journald
@@ -213,8 +208,23 @@ install() {
grep '^systemd-network:' "$dracutsysrootdir"/etc/group 2> /dev/null
} >> "$initdir/etc/group"
ln_r "$systemdutildir"/systemd "/init"
ln_r "$systemdutildir"/systemd "/sbin/init"
local _systemdbinary="$systemdutildir"/systemd
if ldd "$_systemdbinary" | grep -qw libasan; then
local _wrapper="$systemdutildir"/systemd-asan-wrapper
cat > "$initdir"/"$_wrapper" << EOF
#!/bin/sh
mount -t proc -o nosuid,nodev,noexec proc /proc
exec $_systemdbinary
EOF
chmod 755 "$initdir"/"$_wrapper"
_systemdbinary="$_wrapper"
unset _wrapper
fi
ln_r "$_systemdbinary" "/init"
ln_r "$_systemdbinary" "/sbin/init"
unset _systemdbinary
inst_binary true
ln_r "$(find_binary true)" "/usr/bin/loginctl"

32
modules.d/00warpclock/module-setup.sh Normal file → Executable file
View File

@@ -1,29 +1,39 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# called by dracut
# Prerequisite check(s) for module.
check() {
# hwclock does not exist on S390(x), bail out silently then
local _arch=${DRACUT_ARCH:-$(uname -m)}
[ "$_arch" = "s390" -o "$_arch" = "s390x" ] && return 1
[ -e /etc/localtime -a -e /etc/adjtime ] || return 1
require_binaries /sbin/hwclock || return 1
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries hwclock || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# called by dracut
# Module dependency requirements.
depends() {
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# called by dracut
# Install the required file(s) and directories for the module in the initramfs.
install() {
inst /usr/share/zoneinfo/UTC
inst /etc/localtime
inst /etc/adjtime
inst_hook pre-trigger 00 "$moddir/warpclock.sh"
inst /sbin/hwclock
inst_multiple -o \
/usr/share/zoneinfo/UTC \
/etc/localtime \
/etc/adjtime \
hwclock
}

5
modules.d/00warpclock/warpclock.sh Normal file → Executable file
View File

@@ -1,4 +1,9 @@
#!/bin/sh
# This file is part of dracut warpclock module.
# SPDX-License-Identifier: GPL-2.0-or-later
# Set the kernel's timezone and reset the system time
# if adjtime is set to LOCAL.
if test -e /etc/adjtime; then
while read -r line; do

View File

@@ -8,7 +8,9 @@ elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
elif getarg boot= > /dev/null; then
. /sbin/fips.sh
fips_info "fips-boot: start"
if mount_boot; then
do_fips || die "FIPS integrity test failed"
fi
fips_info "fips-boot: done!"
fi

2
modules.d/01fips/fips-load-crypto.sh Normal file → Executable file
View File

@@ -8,5 +8,7 @@ elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
else
. /sbin/fips.sh
fips_info "fips-load-crypto: start"
fips_load_crypto || die "FIPS integrity test failed"
fips_info "fips-load-crypto: done!"
fi

View File

@@ -1,11 +1,15 @@
#!/bin/sh
type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh
if ! fipsmode=$(getarg fips) || [ "$fipsmode" = "0" ]; then
rm -f -- /etc/modprobe.d/fips.conf > /dev/null 2>&1
elif [ -z "$fipsmode" ]; then
die "FIPS mode have to be enabled by 'fips=1' not just 'fips'"
elif ! [ -f /tmp/fipsdone ]; then
. /sbin/fips.sh
fips_info "fips-noboot: start"
mount_boot
do_fips || die "FIPS integrity test failed"
fips_info "fips-noboot: done!"
fi

View File

@@ -18,6 +18,15 @@ mount_boot() {
boot=$(getarg boot=)
if [ -n "$boot" ]; then
if [ -d /boot ] && ismounted /boot; then
boot_dev=
if command -v findmnt > /dev/null; then
boot_dev=$(findmnt -n -o SOURCE /boot)
fi
fips_info "Ignoring 'boot=$boot' as /boot is already mounted ${boot_dev:+"from '$boot_dev'"}"
return 0
fi
case "$boot" in
LABEL=* | UUID=* | PARTUUID=* | PARTLABEL=*)
boot="$(label_uuid_to_dev "$boot")"
@@ -47,10 +56,13 @@ mount_boot() {
mkdir -p /boot
fips_info "Mounting $boot as /boot"
mount -oro "$boot" /boot || return 1
elif [ -d "$NEWROOT/boot" ]; then
FIPS_MOUNTED_BOOT=1
elif ! ismounted /boot && [ -d "$NEWROOT/boot" ]; then
# shellcheck disable=SC2114
rm -fr -- /boot
ln -sf "$NEWROOT/boot" /boot
else
die "You have to specify boot=<boot device> as a boot option for fips=1"
fi
}
@@ -79,9 +91,10 @@ nonfatal_modprobe() {
fips_load_crypto() {
local _k
local _v
local _module
local _found
FIPSMODULES=$(cat /etc/fipsmodules)
read -d '' -r FIPSMODULES < /etc/fipsmodules
fips_info "Loading and integrity checking all crypto modules"
mv /etc/modprobe.d/fips.conf /etc/modprobe.d/fips.conf.bak
@@ -108,55 +121,75 @@ fips_load_crypto() {
}
do_fips() {
local _v
local _module
KERNEL=$(uname -r)
fips_info "Checking integrity of kernel"
if [ -e "/run/initramfs/live/vmlinuz0" ]; then
do_rhevh_check /run/initramfs/live/vmlinuz0 || return 1
elif [ -e "/run/initramfs/live/isolinux/vmlinuz0" ]; then
do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1
elif [ -e "/run/install/repo/images/pxeboot/vmlinuz" ]; then
# This is a boot.iso with the .hmac inside the install.img
do_rhevh_check /run/install/repo/images/pxeboot/vmlinuz || return 1
else
BOOT_IMAGE="$(getarg BOOT_IMAGE)"
if ! getarg rd.fips.skipkernel > /dev/null; then
# Trim off any leading GRUB boot device (e.g. ($root) )
BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')"
fips_info "Checking integrity of kernel"
if [ -e "/run/initramfs/live/vmlinuz0" ]; then
do_rhevh_check /run/initramfs/live/vmlinuz0 || return 1
elif [ -e "/run/initramfs/live/isolinux/vmlinuz0" ]; then
do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1
elif [ -e "/run/install/repo/images/pxeboot/vmlinuz" ]; then
# This is a boot.iso with the .hmac inside the install.img
do_rhevh_check /run/install/repo/images/pxeboot/vmlinuz || return 1
else
BOOT_IMAGE="$(getarg BOOT_IMAGE)"
BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}"
BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}"
if [ -z "$BOOT_IMAGE_NAME" ]; then
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
#if /boot is not a separate partition BOOT_IMAGE might start with /boot
BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"}
#on some achitectures BOOT_IMAGE does not contain path to kernel
#so if we can't find anything, let's treat it in the same way as if it was empty
if ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
BOOT_IMAGE_PATH=""
# On s390x, BOOT_IMAGE isn't a path but an integer representing the
# entry number selected. Let's try the root of /boot first, and
# otherwise fallback to trying to parse the BLS entries if it's a
# BLS-based system.
if [ "$(uname -m)" = s390x ]; then
if [ -e "/boot/vmlinuz-${KERNEL}" ]; then
BOOT_IMAGE="vmlinuz-${KERNEL}"
elif [ -d /boot/loader/entries ]; then
bls=$(find /boot/loader/entries -name '*.conf' | sort -rV | sed -n "$((BOOT_IMAGE + 1))p")
if [ -e "${bls}" ]; then
BOOT_IMAGE=$(grep ^linux "${bls}" | cut -d' ' -f2)
fi
fi
fi
fi
BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}/.${BOOT_IMAGE_NAME}.hmac"
if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then
warn "${BOOT_IMAGE_HMAC} does not exist"
return 1
fi
# Trim off any leading GRUB boot device (e.g. ($root) )
BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')"
(cd "${BOOT_IMAGE_HMAC%/*}" && sha512hmac -c "${BOOT_IMAGE_HMAC}") || return 1
BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}"
BOOT_IMAGE_PATH="${BOOT_IMAGE%"${BOOT_IMAGE_NAME}"}"
if [ -z "$BOOT_IMAGE_NAME" ]; then
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
#if /boot is not a separate partition BOOT_IMAGE might start with /boot
BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"}
#on some achitectures BOOT_IMAGE does not contain path to kernel
#so if we can't find anything, let's treat it in the same way as if it was empty
if ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
BOOT_IMAGE_PATH=""
fi
fi
BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}/.${BOOT_IMAGE_NAME}.hmac"
if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then
warn "${BOOT_IMAGE_HMAC} does not exist"
return 1
fi
(cd "${BOOT_IMAGE_HMAC%/*}" && sha512hmac -c "${BOOT_IMAGE_HMAC}") || return 1
fi
fi
fips_info "All initrd crypto checks done"
: > /tmp/fipsdone
umount /boot > /dev/null 2>&1
if [ "$FIPS_MOUNTED_BOOT" = 1 ]; then
fips_info "Unmounting /boot"
umount /boot > /dev/null 2>&1
else
fips_info "Not unmounting /boot"
fi
return 0
}

View File

@@ -14,7 +14,7 @@ depends() {
installkernel() {
local _fipsmodules _mod _bootfstype
if [[ -f "${srcmods}/modules.fips" ]]; then
_fipsmodules="$(cat "${srcmods}/modules.fips")"
read -d '' -r _fipsmodules < "${srcmods}/modules.fips"
else
_fipsmodules=""
@@ -62,12 +62,12 @@ installkernel() {
# called by dracut
install() {
inst_hook pre-mount 01 "$moddir/fips-boot.sh"
inst_hook pre-pivot 00 "$moddir/fips-boot.sh"
inst_hook pre-pivot 01 "$moddir/fips-noboot.sh"
inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh"
inst_script "$moddir/fips.sh" /sbin/fips.sh
inst_multiple sha512hmac rmmod insmod mount uname umount
inst_multiple sha512hmac rmmod insmod mount uname umount grep sed cut find sort
inst_simple /etc/system-fips
[ -c "${initdir}"/dev/random ] || mknod "${initdir}"/dev/random c 1 8 \
@@ -78,7 +78,7 @@ install() {
}
[ -c "${initdir}"/dev/urandom ] || mknod "${initdir}"/dev/urandom c 1 9 \
|| {
dfatal "Cannot create /dev/random"
dfatal "Cannot create /dev/urandom"
dfatal "To create an initramfs with fips support, dracut has to run as root"
return 1
}

View File

@@ -22,7 +22,7 @@ depends() {
install() {
inst_rules "$moddir/99-initrd-power-targets.rules"
inst_simple "$systemdutildir"/systemd-ac-power
inst systemd-ac-power
inst_simple "$moddir/initrd-on-ac-power.target" "$systemdsystemunitdir/initrd-on-ac-power.target"
inst_simple "$moddir/initrd-on-battery-power.target" "$systemdsystemunitdir/initrd-on-battery-power.target"

View File

@@ -20,7 +20,7 @@ check() {
depends() {
# This module has external dependency on the systemd module.
echo systemd-journald systemd-sysctl
echo systemd-journald systemd-sysctl systemd-sysusers
# Return 0 to include the dependent module(s) in the initramfs.
return 0
@@ -33,10 +33,11 @@ install() {
inst_multiple -o \
"$sysctld"/50-coredump.conf \
"$systemdutildir"/coredump.conf \
"$systemdsystemunitdir"/systemd-coredump \
"$systemdutildir"/systemd-coredump \
"$systemdsystemunitdir"/systemd-coredump.socket \
"$systemdsystemunitdir"/systemd-coredump@.service \
"$systemdsystemunitdir"/sockets.target.wants/systemd-coredump.socket \
"$sysusers"/systemd-coredump.conf \
coredumpctl
# Install the hosts local user configurations if enabled.
@@ -48,6 +49,7 @@ install() {
"$systemdsystemconfdir/systemd-coredump.socket.d/*.conf" \
"$systemdsystemconfdir"/systemd-coredump@.service \
"$systemdsystemconfdir/systemd-coredump@.service.d/*.conf" \
"$systemdsystemconfdir"/sockets.target.wants/systemd-coredump.socket
"$systemdsystemconfdir"/sockets.target.wants/systemd-coredump.socket \
"$sysusersconfdir"/systemd-coredump.conf
fi
}

View File

@@ -0,0 +1,46 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# Prerequisite check(s) for module.
check() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries systemd-creds || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# Module dependency requirements.
depends() {
local deps
# This module has external dependency on other module(s).
deps="systemd"
systemd-creds -q has-tpm2 && deps+=" tpm2-tss"
echo "$deps"
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# Install the required file(s) and directories for the module in the initramfs.
install() {
inst_multiple -o \
"/usr/lib/credstore/*" \
"/usr/lib/credstore.encrypted/*" \
"$tmpfilesdir/credstore.conf" \
systemd-creds
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"/etc/credstore/*" \
"/etc/credstore.encrypted/*"
fi
}

View File

@@ -39,6 +39,7 @@ install() {
"$systemdutildir"/systemd-hostnamed \
"$systemdsystemunitdir"/systemd-hostnamed.service \
"$systemdsystemunitdir/systemd-hostnamed.service.d/*.conf" \
"$systemdsystemunitdir"/dbus-org.freedesktop.hostname1.service \
hostnamectl
# Install the hosts local user configurations if enabled.

View File

@@ -1,2 +1,2 @@
# This file is part of dracut systemd-hostnamed module.
g systemd-hostname - "systemd hostname"
g systemd-hostname -

View File

@@ -0,0 +1,59 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# Prerequisite check(s) for module.
check() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries \
"$systemdutildir"/systemd-integritysetup \
"$systemdutildir"/system-generators/systemd-integritysetup-generator \
|| return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# Module dependency requirements.
depends() {
# This module has external dependency on other module(s).
echo systemd dm
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
installkernel() {
instmods dm-integrity
}
# Install the required file(s) and directories for the module in the initramfs.
install() {
inst_multiple -o \
"$systemdutildir"/systemd-integritysetup \
"$systemdutildir"/system-generators/systemd-integritysetup-generator \
"$systemdsystemunitdir"/integritysetup-pre.target \
"$systemdsystemunitdir"/integritysetup.target \
"$systemdsystemunitdir"/sysinit.target.wants/integritysetup.target
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
/etc/integritytab \
"$systemdsystemconfdir"/integritysetup.target \
"$systemdsystemconfdir/integritysetup.target.wants/*.target" \
"$systemdsystemconfdir"/integritysetup-pre.target \
"$systemdsystemconfdir/integritysetup-pre.target.wants/*.target" \
"$systemdsystemconfdir"/sysinit.target.wants/integritysetup.target \
"$systemdsystemconfdir/sysinit.target.wants/integritysetup.target.wants/*.target"
fi
# Install required libraries.
_arch=${DRACUT_ARCH:-$(uname -m)}
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libcryptsetup.so.*"
}

View File

@@ -40,13 +40,12 @@ install() {
"$systemdsystemunitdir"/systemd-journald-audit.socket \
"$systemdsystemunitdir"/systemd-journald-dev-log.socket \
"$systemdsystemunitdir"/systemd-journald-varlink@.socket \
"$systemdsystemunitdir"/systemd-journal-flush.service \
"$systemdsystemunitdir"/systemd-journal-catalog-update.service \
"$systemdsystemunitdir"/sockets.target.wants/systemd-journald-audit.socket \
"$systemdsystemunitdir"/sockets.target.wants/systemd-journald-dev-log.socket \
"$systemdsystemunitdir"/sockets.target.wants/systemd-journald.socket \
"$systemdsystemunitdir"/sockets.target.wants/systemd-journald-audit.socket \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-journald.service \
"$sysusers"/systemd-journal.conf \
journalctl
# Install library file(s)
@@ -63,10 +62,9 @@ install() {
"$systemdutilconfdir/journald.conf.d/*.conf" \
"$systemdsystemconfdir"/systemd-journald.service \
"$systemdsystemconfdir/systemd-journald.service.d/*.conf" \
"$systemdsystemconfdir"/systemd-journal-flush.service \
"$systemdsystemconfdir/systemd-journal-flush.service.d/*.conf" \
"$systemdsystemconfdir"/systemd-journal-catalog-update.service \
"$systemdsystemconfdir/systemd-journal-catalog-update.service.d/*.conf"
"$systemdsystemconfdir/systemd-journal-catalog-update.service.d/*.conf" \
"$sysusersconfdir"/systemd-journal.conf
fi
}

0
modules.d/01systemd-modules-load/module-setup.sh Normal file → Executable file
View File

View File

@@ -32,6 +32,7 @@ depends() {
install() {
inst_multiple -o \
"$tmpfilesdir"/systemd-network.conf \
"$dbussystem"/org.freedesktop.network1.conf \
"$dbussystemservices"/org.freedesktop.network1.service \
"$systemdutildir"/networkd.conf \
@@ -39,17 +40,21 @@ install() {
"$systemdutildir"/systemd-networkd \
"$systemdutildir"/systemd-network-generator \
"$systemdutildir"/systemd-networkd-wait-online \
"$systemdutildir"/network/80-container-host0.network \
"$systemdutildir"/network/80-container-ve.network \
"$systemdutildir"/network/80-container-vz.network \
"$systemdutildir"/network/80-vm-vt.network \
"$systemdutildir"/network/80-wifi-adhoc.network \
"$systemdutildir"/network/99-default.link \
"$systemdnetwork"/80-6rd-tunnel.network \
"$systemdnetwork"/80-container-host0.network \
"$systemdnetwork"/80-container-vb.network \
"$systemdnetwork"/80-container-ve.network \
"$systemdnetwork"/80-container-vz.network \
"$systemdnetwork"/80-vm-vt.network \
"$systemdnetwork"/80-wifi-adhoc.network \
"$systemdnetwork"/99-default.link \
"$systemdsystemunitdir"/systemd-networkd.service \
"$systemdsystemunitdir"/systemd-networkd.socket \
"$systemdsystemunitdir"/systemd-network-generator.service \
"$systemdsystemunitdir"/systemd-networkd-wait-online.service \
"$systemdsystemunitdir"/systemd-networkd-wait-online@.service \
"$systemdsystemunitdir"/systemd-network-generator.service \
"$sysusers"/systemd-network.conf \
networkctl ip
# Enable systemd type units
@@ -66,14 +71,17 @@ install() {
inst_multiple -H -o \
"$systemdutilconfdir"/networkd.conf \
"$systemdutilconfdir/networkd.conf.d/*.conf" \
"$systemdutilconfdir/network/*" \
"$systemdnetworkconfdir/*" \
"$systemdsystemconfdir"/systemd-networkd.service \
"$systemdsystemconfdir/systemd-networkd.service/*.conf" \
"$systemdsystemunitdir"/systemd-networkd.socket \
"$systemdsystemunitdir/systemd-networkd.socket/*.conf" \
"$systemdsystemconfdir/systemd-networkd.service.d/*.conf" \
"$systemdsystemconfdir"/systemd-networkd.socket \
"$systemdsystemconfdir/systemd-networkd.socket.d/*.conf" \
"$systemdsystemconfdir"/systemd-network-generator.service \
"$systemdsystemconfdir/systemd-network-generator.service/*.conf" \
"$systemdsystemconfdir/systemd-network-generator.service.d/*.conf" \
"$systemdsystemconfdir"/systemd-networkd-wait-online.service \
"$systemdsystemconfdir/systemd-networkd-wait-online.service/*.conf"
"$systemdsystemconfdir/systemd-networkd-wait-online.service.d/*.conf" \
"$systemdsystemconfdir"/systemd-networkd-wait-online@.service \
"$systemdsystemconfdir/systemd-networkd-wait-online@.service.d/*.conf" \
"$sysusersconfdir"/systemd-network.conf
fi
}

View File

@@ -0,0 +1,43 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# Prerequisite check(s) for module.
check() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries "$systemdutildir"/systemd-pcrphase || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# Module dependency requirements.
depends() {
# This module has external dependency on other module(s).
echo systemd tpm2-tss
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# Install the required file(s) and directories for the module in the initramfs.
install() {
inst_multiple -o \
"$systemdutildir"/systemd-pcrphase \
"$systemdsystemunitdir"/systemd-pcrphase-initrd.service \
"$systemdsystemunitdir/systemd-pcrphase-initrd.service.d/*.conf" \
"$systemdsystemunitdir"/initrd.target.wants/systemd-pcrphase-initrd.service
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"$systemdsystemconfdir"/systemd-pcrphase-initrd.service \
"$systemdsystemconfdir/systemd-pcrphase-initrd.service.d/*.conf" \
"$systemdsystemconfdir"/initrd.target.wants/systemd-pcrphase-initrd.service
fi
}

View File

@@ -0,0 +1,82 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# Prerequisite check(s) for module.
check() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries \
portablectl \
"$systemdutildir"/systemd-portabled \
|| return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# Module dependency requirements.
depends() {
# This module has external dependency on other module(s).
echo dbus
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# Install kernel module(s).
installkernel() {
instmods loop squashfs
}
# Install the required file(s) and directories for the module in the initramfs.
install() {
# It's intended to work only with raw binary disk images contained in
# regular files, but not with directory trees.
local _nonraw
_nonraw=$(portablectl --no-pager --no-legend list | grep -v " raw " | cut -d ' ' -f1 | tr '\n' ' ')
if [ -n "$_nonraw" ]; then
dwarn "systemd-portabled: this module only installs raw disk images in the initramfs; skipping: $_nonraw"
fi
inst_multiple -o \
"/var/lib/portables/*.raw" \
"/usr/lib/portables/*.raw" \
"$tmpfilesdir/portables.conf" \
"$dbussystem"/org.freedesktop.portable1.conf \
"$dbussystemservices"/org.freedesktop.portable1.service \
"$systemdutildir"/systemd-portabled \
"$systemdutildir/portable/profile/default/*.conf" \
"$systemdutildir/portable/profile/nonetwork/*.conf" \
"$systemdutildir/portable/profile/strict/*.conf" \
"$systemdutildir/portable/profile/trusted/*.conf" \
"$systemdsystemunitdir"/systemd-portabled.service \
"$systemdsystemunitdir/systemd-portabled.service.d/*.conf" \
"$systemdsystemunitdir"/dbus-org.freedesktop.portable1.service \
portablectl
# The existence of this file is required
touch "$initdir"/etc/resolv.conf
# Enable systemd type unit(s)
$SYSTEMCTL -q --root "$initdir" add-wants initrd.target systemd-portabled.service
$SYSTEMCTL -q --root "$initdir" enable systemd-portabled.service
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"/etc/portables/*.raw" \
"$systemdutilconfdir/system.attached/*" \
"$systemdutilconfdir/system.attached/*/*" \
"$systemdutilconfdir/portable/profile/default/*.conf" \
"$systemdutilconfdir/portable/profile/nonetwork/*.conf" \
"$systemdutilconfdir/portable/profile/strict/*.conf" \
"$systemdutilconfdir/portable/profile/trusted/*.conf" \
"$systemdsystemconfdir"/systemd-portabled.service \
"$systemdsystemconfdir/systemd-portabled.service.d/*.conf"
fi
}

View File

@@ -0,0 +1,53 @@
#!/bin/bash
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later
# Prerequisite check(s) for module.
check() {
# If the binary(s) requirements are not fulfilled the module can't be installed.
require_binaries "$systemdutildir"/systemd-pstore || return 1
# Return 255 to only include the module, if another module requires it.
return 255
}
# Module dependency requirements.
depends() {
# This module has external dependency on other module(s).
echo systemd
# Return 0 to include the dependent module(s) in the initramfs.
return 0
}
# Install kernel module(s).
installkernel() {
instmods efi-pstore
}
# Install the required file(s) and directories for the module in the initramfs.
install() {
inst_dir /var/lib/systemd/pstore
inst_multiple -o \
"$tmpfilesdir/systemd-pstore.conf" \
"$systemdutildir"/systemd-pstore \
"$systemdsystemunitdir"/systemd-pstore.service \
"$systemdsystemunitdir/systemd-pstore.service.d/*.conf"
# Enable systemd type unit(s)
$SYSTEMCTL -q --root "$initdir" enable systemd-pstore.service
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"$systemdutilconfdir"/pstore.conf \
"$systemdutilconfdir/pstore.conf.d/*.conf" \
"$systemdsystemconfdir"/systemd-pstore.service \
"$systemdsystemconfdir/systemd-pstore.service.d/*.conf"
fi
}

View File

@@ -40,6 +40,7 @@ install() {
"$systemdutildir"/systemd-resolved \
"$systemdsystemunitdir"/systemd-resolved.service \
"$systemdsystemunitdir/systemd-resolved.service.d/*.conf" \
"$sysusers"/systemd-resolve.conf \
resolvectl
# Enable systemd type unit(s)
@@ -51,6 +52,7 @@ install() {
"$systemdutilconfdir"/resolved.conf \
"$systemdutilconfdir/resolved.conf.d/*.conf" \
"$systemdsystemconfdir"/systemd-resolved.service \
"$systemdsystemconfdir/systemd-resolved.service/*.conf"
"$systemdsystemconfdir/systemd-resolved.service.d/*.conf" \
"$sysusersconfdir"/systemd-resolve.conf
fi
}

View File

@@ -24,6 +24,8 @@ depends() {
# Install the required file(s) and directories for the module in the initramfs.
install() {
inst_simple "$moddir/sysusers-dracut.conf" "$systemdsystemunitdir/systemd-sysusers.service.d/sysusers-dracut.conf"
inst_multiple -o \
"$sysusers"/basic.conf \
"$sysusers"/systemd.conf \

View File

@@ -0,0 +1,2 @@
[Unit]
ConditionNeedsUpdate=

View File

@@ -34,12 +34,13 @@ install() {
"$dbussystemservices"/org.freedesktop.timedate1.service \
"$systemdutildir"/systemd-timedated \
"$systemdsystemunitdir"/systemd-timedated.service \
"$systemdsystemunitdir"/dbus-org.freedesktop.timedate1.service \
timedatectl
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"$systemdsystemconfdir"/systemd-timedated.service \
"$systemdsystemconfdir/systemd-timedated.service/*.conf"
"$systemdsystemconfdir/systemd-timedated.service.d/*.conf"
fi
}

View File

@@ -20,7 +20,7 @@ check() {
depends() {
# This module has external dependency on other module(s).
echo dbus systemd-timedated
echo dbus systemd-sysusers systemd-timedated
# Return 0 to include the dependent module(s) in the initramfs.
return 0
@@ -35,14 +35,15 @@ install() {
inst_multiple -o \
"$dbussystem"/org.freedesktop.timesync1.conf \
"$dbussystemservices"/org.freedesktop.timesync1.service \
"$systemdutildir/ntp-units.d/*.list" \
"$systemdntpunits/*.list" \
"$systemdutildir"/systemd-timesyncd \
"$systemdutildir"/systemd-time-wait-sync \
"$systemdutildir/timesyncd.conf.d/*.conf" \
"$systemdsystemunitdir"/systemd-timesyncd.service \
"$systemdsystemunitdir/systemd-timesyncd.service.d/*.conf" \
"$systemdsystemunitdir"/systemd-time-wait-sync.service \
"$systemdsystemunitdir/systemd-time-wait-sync.service.d/*.conf"
"$systemdsystemunitdir/systemd-time-wait-sync.service.d/*.conf" \
"$sysusers"/systemd-timesync.conf
# Enable systemd type unit(s)
for i in \
@@ -54,12 +55,13 @@ install() {
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"$systemdutilconfdir/ntp-units.d/*.list" \
"$systemdntpunitsconfdir/*.list" \
"$systemdutilconfdir"/timesyncd.conf \
"$systemdutilconfdir/timesyncd.conf.d/*.conf" \
"$systemdsystemconfdir"/systemd-timesyncd.service \
"$systemdsystemconfdir/systemd-timesyncd.service.d/*.conf" \
"$systemdsystemunitdir"/systemd-time-wait-sync.service \
"$systemdsystemunitdir/systemd-time-wait-sync.service.d/*.conf"
"$systemdsystemconfdir"/systemd-time-wait-sync.service \
"$systemdsystemconfdir/systemd-time-wait-sync.service.d/*.conf" \
"$sysusersconfdir"/systemd-timesync.conf
fi
}

View File

@@ -25,12 +25,10 @@ depends() {
install() {
# Excluding "$tmpfilesdir/home.conf", sets up /home /srv
# Excluding "$tmpfilesdir/portables.conf", belongs in seperated portables module
# Excluding "$tmpfilesdir/journal-nocow.conf", requires spesific btrfs setup
# Excluding "$tmpfilesdir/legacy.conf", belongs in seperated legacy module
# Excluding "$tmpfilesdir/systemd-nologin.conf", belongs in seperated pam module
# Excluding "$tmpfilesdir/systemd-nspawn.conf", belongs in seperated machined module
# Excluding "$tmpfilesdir/systemd-pstore.conf", belongs in seperated pstore module
# Excluding "$tmpfilesdir/x11.conf", belongs in seperated x11 module
inst_multiple -o \
@@ -47,8 +45,6 @@ install() {
"$systemdsystemunitdir/systemd-tmpfiles-setup.service.d/*.conf" \
"$systemdsystemunitdir"/systemd-tmpfiles-setup-dev.service \
"$systemdsystemunitdir/systemd-tmpfiles-setup-dev.service.d/*.conf" \
"$systemdsystemunitdir"/systemd-tmpfiles-clean.timer \
"$systemdsystemunitdir"/timers.target.wants/systemd-tmpfiles-clean.timer \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
"$systemdsystemunitdir"/sysinit.target.wants/systemd-tmpfiles-setup.service \
systemd-tmpfiles

View File

@@ -7,5 +7,5 @@
for x in /lib/modules/keys/*; do
[ "${x}" = "/lib/modules/keys/*" ] && break
keyctl padd asymmetric "" @s < "${x}"
keyctl padd asymmetric "" %:.secondary_trusted_keys < "${x}"
done

View File

@@ -33,6 +33,6 @@ install() {
for x in "$dracutsysrootdir"/lib/modules/keys/*; do
[[ ${x} == "$dracutsysrootdir/lib/modules/keys/*" ]] && break
inst_simple "${x#$dracutsysrootdir}"
inst_simple "${x#"$dracutsysrootdir"}"
done
}

View File

@@ -54,6 +54,8 @@ install() {
"$systemduser"/dbus-broker.service \
"$systemdsystemunitdir"/dbus.socket \
"$systemduser"/dbus.socket \
"$systemdsystemunitdir"/sockets.target.wants/dbus.socket \
"$systemduser"/sockets.target.wants/dbus.socket \
"$systemdsystemunitdir"/dbus.target.wants \
busctl dbus-broker dbus-broker-launch
@@ -77,7 +79,8 @@ install() {
"$systemdsystemconfdir"/dbus.socket \
"$systemdsystemconfdir"/dbus.socket.d/*.conf \
"$systemdsystemconfdir"/dbus-broker.service \
"$systemdsystemconfdir"/dbus-broker.service.d/*.conf
"$systemdsystemconfdir"/dbus-broker.service.d/*.conf \
"$systemdsystemconfdir"/sockets.target.wants/dbus.socket
fi
# We need to make sure that systemd-tmpfiles-setup.service->dbus.socket

0
modules.d/06rngd/module-setup.sh Normal file → Executable file
View File

View File

@@ -19,7 +19,7 @@ depends() {
fi
done
if find_binary dbus-broker &> /dev/null; then
if check_module "dbus-broker"; then
echo "dbus-broker"
return 0
else

View File

@@ -19,7 +19,7 @@ set_keyboard() {
}
set_terminal() {
local dev=$1
local dev="$1"
if [ "${UNICODE}" = 1 ]; then
printf '\033%%G' >&7
@@ -58,7 +58,7 @@ dev_close() {
}
dev_open() {
local dev=$1
local dev="$1"
exec 6< "${dev}" \
&& exec 7>> "${dev}"

View File

@@ -31,10 +31,6 @@ install() {
VCONFIG_CONF="/etc/vconsole.conf"
findkeymap() {
# shellcheck disable=SC2064
trap "$(shopt -p nullglob globstar)" RETURN
shopt -q -s nullglob globstar
local -a MAPS
local MAPNAME
local INCLUDES
@@ -46,7 +42,10 @@ install() {
MAPS=("$1")
else
MAPNAME=${1%.map*}
MAPS=("$dracutsysrootdir""${kbddir}"/keymaps/**/"${MAPNAME}"{,.map{,.*}})
mapfile -t -d '' MAPS < <(
find "${dracutsysrootdir}${kbddir}"/keymaps/ -type f \( -name "${MAPNAME}" -o -name "${MAPNAME}.map*" \) -print0
)
fi
for MAP in "${MAPS[@]}"; do
@@ -64,7 +63,9 @@ install() {
readarray -t INCLUDES < <("$CMD" '^include ' "$MAP" | while read -r _ a _ || [ -n "$a" ]; do echo "${a//\"/}"; done)
for INCL in "${INCLUDES[@]}"; do
for FN in "$dracutsysrootdir""${kbddir}"/keymaps/**/"$INCL"*; do
local -a FNS
mapfile -t -d '' FNS < <(find "${dracutsysrootdir}${kbddir}"/keymaps/ -type f -name "${INCL}*" -print0)
for FN in "${FNS[@]}"; do
[[ -f $FN ]] || continue
[[ -v KEYMAPS["$FN"] ]] || findkeymap "$FN"
done
@@ -221,8 +222,12 @@ install() {
inst_opt_decompress "${kbddir}"/consolefonts/"${DEFAULT_FONT}".*
if [[ ${FONT} ]] && [[ ${FONT} != "${DEFAULT_FONT}" ]]; then
FONT=${FONT%.psf*}
inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}".*
if [[ -f "${kbddir}"/consolefonts/"${FONT}" ]]; then
inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}"
else
FONT=${FONT%.psf*}
inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}".*
fi
fi
if [[ ${FONT_MAP} ]]; then

View File

@@ -1,5 +1,7 @@
#!/bin/bash
type ismounted > /dev/null 2>&1 || . /lib/dracut-lib.sh
ROOT="$1"
if [[ ! -d $ROOT ]]; then
@@ -79,26 +81,6 @@ find_mount() {
return 1
}
# usage: ismounted <mountpoint>
# usage: ismounted /dev/<device>
if command -v findmnt > /dev/null; then
ismounted() {
findmnt "$1" > /dev/null 2>&1
}
else
ismounted() {
if [ -b "$1" ]; then
find_mount "$1" > /dev/null && return 0
return 1
fi
while read -r _ m _ || [ -n "$m" ]; do
[ "$m" = "$1" ] && return 0
done < /proc/mounts
return 1
}
fi
# clean up after ourselves no matter how we die.
cleanup() {
echo "Something failed. Move back to the original state"

View File

@@ -8,8 +8,7 @@ check() {
# called by dracut
depends() {
echo bash
return 0
echo base bash
}
# called by dracut

View File

@@ -0,0 +1,24 @@
#!/bin/sh
type cm_generate_connections > /dev/null 2>&1 || . /lib/cm-lib.sh
if [ -n "$netroot" ] || [ -e /tmp/net.ifaces ]; then
echo rd.neednet >> /etc/cmdline.d/connman.conf
fi
if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
if [ -n "$DRACUT_SYSTEMD" ]; then
# Enable tty output if a usable console is found
# shellcheck disable=SC2217
if [ -w /dev/console ] && (echo < /dev/console) > /dev/null 2> /dev/null; then
mkdir -p /run/systemd/system/cm-initrd.service.d
cat << EOF > /run/systemd/system/cm-initrd.service.d/tty-output.conf
[Service]
StandardOutput=tty
EOF
systemctl --no-block daemon-reload
fi
fi
fi
cm_generate_connections

View File

@@ -0,0 +1,24 @@
[Unit]
DefaultDependencies=no
Wants=systemd-udev-trigger.service
After=systemd-udev-trigger.service
After=dracut-cmdline.service
Wants=network.target
Before=network.target
RequiresMountsFor=/var/lib/connman
After=dbus.service
ConditionPathExists=/run/connman/initrd/neednet
[Service]
Type=dbus
BusName=net.connman
Restart=on-failure
ExecStart=/usr/sbin/connmand -n
StandardOutput=null
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_ADMIN
ProtectHome=true
ProtectSystem=full
[Install]
WantedBy=initrd.target
Also=cm-wait-online-initrd.service

12
modules.d/35connman/cm-lib.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
type getcmdline > /dev/null 2>&1 || . /lib/dracut-lib.sh
cm_generate_connections() {
if getargbool 0 rd.neednet; then
mkdir -p "$hookdir"/initqueue/finished
echo '[ -f /tmp/cm.done ]' > "$hookdir"/initqueue/finished/cm.sh
mkdir -p /run/connman/initrd
: > /run/connman/initrd/neednet # activate ConnMan services
fi
}

15
modules.d/35connman/cm-run.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
type source_hook > /dev/null 2>&1 || . /lib/dracut-lib.sh
if [ -e /tmp/cm.done ]; then
return
fi
while read -r _serv; do
ifname=$(connmanctl services "$_serv" | grep Interface= | sed 's/^.*Interface=\([^,]*\).*$/\1/')
source_hook initqueue/online "$ifname"
/sbin/netroot "$ifname"
done < <(connmanctl services | grep -oE '[^ ]+$')
: > /tmp/cm.done

View File

@@ -0,0 +1,16 @@
[Unit]
DefaultDependencies=no
Requires=cm-initrd.service
After=cm-initrd.service
Before=network-online.target
Before=dracut-initqueue.service
ConditionPathExists=/run/connman/initrd/neednet
[Service]
Type=oneshot
ExecStart=/usr/sbin/connmand-wait-online
RemainAfterExit=yes
[Install]
WantedBy=initrd.target
WantedBy=network-online.target

View File

@@ -0,0 +1,47 @@
#!/bin/bash
# called by dracut
check() {
require_binaries sed grep connmand connmanctl connmand-wait-online || return 1
# do not add this module by default
return 255
}
# called by dracut
depends() {
echo dbus systemd bash
return 0
}
# called by dracut
installkernel() {
return 0
}
# called by dracut
install() {
# We don't need `ip` but having it is *really* useful for people debugging
# in an emergency shell.
inst_multiple ip sed grep
inst_script "$moddir/netroot.sh" "/sbin/netroot"
inst connmand
inst connmanctl
inst connmand-wait-online
inst "$dbussystem"/connman.conf
[[ $hostonly ]] && [[ -f $dracutsysrootdir/etc/connman/main.conf ]] && inst /etc/connman/main.conf
inst_dir /usr/lib/connman/plugins
inst_dir /var/lib/connman
inst_hook cmdline 99 "$moddir/cm-config.sh"
inst_simple "$moddir"/cm-initrd.service "$systemdsystemunitdir"/cm-initrd.service
inst_simple "$moddir"/cm-wait-online-initrd.service "$systemdsystemunitdir"/cm-wait-online-initrd.service
$SYSTEMCTL -q --root "$initdir" enable cm-initrd.service
inst_hook initqueue/settled 99 "$moddir/cm-run.sh"
inst_simple "$moddir/cm-lib.sh" "/lib/cm-lib.sh"
}

92
modules.d/35connman/netroot.sh Executable file
View File

@@ -0,0 +1,92 @@
#!/bin/sh
PATH=/usr/sbin:/usr/bin:/sbin:/bin
command -v getarg > /dev/null || . /lib/dracut-lib.sh
command -v setup_net > /dev/null || . /lib/net-lib.sh
# Huh? Empty $1?
[ -z "$1" ] && exit 1
# [ ! -z $2 ] means this is for manually bringing up network
# instead of real netroot; If It's called without $2, then there's
# no sense in doing something if no (net)root info is available
# or root is already there
[ -d "$NEWROOT"/proc ] && exit 0
if [ -z "$netroot" ]; then
netroot=$(getarg netroot=)
fi
[ -z "$netroot" ] && exit 1
# Set or override primary interface
netif=$1
[ -e "/tmp/net.bootdev" ] && read -r netif < /tmp/net.bootdev
case "$netif" in
??:??:??:??:??:??) # MAC address
for i in /sys/class/net/*/address; do
read -r mac < "$i"
if [ "$mac" = "$netif" ]; then
i=${i%/address}
netif=${i##*/}
break
fi
done ;;
esac
# Figure out the handler for root=dhcp by recalling all netroot cmdline
# handlers when this is not called from manually network bringing up.
if [ -z "$2" ]; then
if getarg "root=dhcp" || getarg "netroot=dhcp" || getarg "root=dhcp6" || getarg "netroot=dhcp6"; then
# Load dhcp options
# shellcheck disable=SC1090
[ -e /tmp/dhclient."$netif".dhcpopts ] && . /tmp/dhclient."$netif".dhcpopts
# If we have a specific bootdev with no dhcpoptions or empty root-path,
# we die. Otherwise we just warn
if [ -z "$new_root_path" ]; then
[ -n "$BOOTDEV" ] && die "No dhcp root-path received for '$BOOTDEV'"
warn "No dhcp root-path received for '$netif' trying other interfaces if available"
exit 1
fi
rm -f -- "$hookdir"/initqueue/finished/dhcp.sh
# Set netroot to new_root_path, so cmdline parsers don't call
netroot=$new_root_path
# FIXME!
unset rootok
for f in "$hookdir"/cmdline/90*.sh; do
# shellcheck disable=SC1090
[ -f "$f" ] && . "$f"
done
else
rootok="1"
fi
# Check: do we really know how to handle (net)root?
if [ -z "$root" ]; then
root=$(getarg root=)
fi
[ -z "$root" ] && die "No or empty root= argument"
[ -z "$rootok" ] && die "Don't know how to handle 'root=$root'"
handler=${netroot%%:*}
handler=${handler%%4}
handler=$(command -v "${handler}"root)
if [ -z "$netroot" ] || [ ! -e "$handler" ]; then
die "No handler for netroot type '$netroot'"
fi
fi
# Source netroot hooks before we start the handler
source_hook netroot "$netif"
# Run the handler; don't store the root, it may change from device to device
# XXX other variables to export?
[ -n "$handler" ] && "$handler" "$netif" "$netroot" "$NEWROOT"
save_netinfo "$netif"
exit 0

View File

@@ -72,7 +72,7 @@ setup_interface() {
fi
# Note: hostname can be fqdn OR short hostname, so chop off any
# trailing domain name and explicity add any domain if set.
[ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
[ -n "$hostname" ] && echo "echo ${hostname%."$domain"}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
}
setup_interface6() {
@@ -105,7 +105,7 @@ setup_interface6() {
# Note: hostname can be fqdn OR short hostname, so chop off any
# trailing domain name and explicity add any domain if set.
[ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
[ -n "$hostname" ] && echo "echo ${hostname%."$domain"}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
}
parse_option_121() {

View File

@@ -21,6 +21,13 @@ do_dhclient() {
_timeout=$(getarg rd.net.timeout.dhcp=)
_DHCPRETRY=$(getargnum 1 1 1000000000 rd.net.dhcp.retry=)
if [ -n "$_timeout" ]; then
if ! (dhclient --help 2>&1 | grep -q -F -- '--timeout' 2> /dev/null); then
warn "rd.net.timeout.dhcp has no effect because dhclient does not implement the --timeout option"
unset _timeout
fi
fi
while [ $_COUNT -lt "$_DHCPRETRY" ]; do
info "Starting dhcp for interface $netif"
dhclient "$arg" \
@@ -51,7 +58,7 @@ do_dhclient() {
# or it finished execution but failed dhcp on that interface.
if [ $retv -eq 127 ]; then
pid=$(cat /tmp/dhclient."$netif".pid)
read -r pid < /tmp/dhclient."$netif".pid
info "PID $pid was not found by wait for $netif"
if [ -e /tmp/dhclient."$netif".lease ]; then
info "PID $pid not found but DHCP successful on $netif"
@@ -109,7 +116,7 @@ if [ $ret -eq 0 ]; then
# Kill all existing dhclient calls for other interfaces, since we
# already got one successful interface
npid=$(cat /tmp/dhclient."$netif".pid)
read -r npid < /tmp/dhclient."$netif".pid
pidlist=$(pgrep dhclient)
for pid in $pidlist; do
[ "$pid" -eq "$npid" ] && continue

View File

@@ -73,6 +73,13 @@ do_dhcp() {
return 1
fi
if [ -n "$_timeout" ]; then
if ! (dhclient --help 2>&1 | grep -q -F -- '--timeout' 2> /dev/null); then
warn "rd.net.timeout.dhcp has no effect because dhclient does not implement the --timeout option"
unset _timeout
fi
fi
if [ ! -e /run/NetworkManager/conf.d/10-dracut-dhclient.conf ]; then
mkdir -p /run/NetworkManager/conf.d
echo '[main]' > /run/NetworkManager/conf.d/10-dracut-dhclient.conf
@@ -377,7 +384,7 @@ if [ -z "$NO_TEAM_MASTER" ]; then
ip link set dev "$slave" down
(
unset TEAM_PORT_CONFIG
_hwaddr=$(cat "/sys/class/net/$slave/address")
read -r _hwaddr < "/sys/class/net/$slave/address"
_subchannels=$(iface_get_subchannels "$slave")
if [ -n "$_hwaddr" ] && [ -e "/etc/sysconfig/network-scripts/mac-${_hwaddr}.conf" ]; then
# shellcheck disable=SC1090
@@ -446,7 +453,11 @@ for p in $(getargs ip=); do
# If this option isn't directed at our interface, skip it
if [ -n "$dev" ]; then
[ "$dev" != "$netif" ] && continue
if [ "$dev" != "$netif" ]; then
[ ! -e "/sys/class/net/$dev" ] \
&& warn "Network interface '$dev' does not exist!"
continue
fi
else
iface_is_enslaved "$netif" && continue
fi
@@ -508,10 +519,6 @@ for p in $(getargs ip=); do
fi
fi
if command -v wicked > /dev/null && [ -z "$manualup" ]; then
/sbin/netroot "$netif"
fi
exit $ret
fi
done
@@ -520,7 +527,7 @@ done
if [ -z "$NO_AUTO_DHCP" ] && [ ! -e "/tmp/net.${netif}.up" ]; then
ret=1
if [ -e /tmp/net.bootdev ]; then
BOOTDEV=$(cat /tmp/net.bootdev)
read -r BOOTDEV < /tmp/net.bootdev
if [ "$netif" = "$BOOTDEV" ] || [ "$BOOTDEV" = "$(cat "/sys/class/net/${netif}/address")" ]; then
do_dhcp
ret=$?

View File

@@ -15,7 +15,8 @@ depends() {
# called by dracut
installkernel() {
return 0
# arping depends on af_packet
hostonly='' instmods af_packet
}
# called by dracut
@@ -24,8 +25,8 @@ install() {
#Adding default link
if dracut_module_included "systemd"; then
inst_multiple -o "${systemdutildir}/network/99-default.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
inst_multiple -o "${systemdnetwork}/99-default.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
fi
inst_multiple ip dhclient sed awk grep pgrep tr expr

View File

@@ -67,7 +67,7 @@ command -v fix_bootif > /dev/null || . /lib/net-lib.sh
fi
if [ -e /tmp/net.bootdev ]; then
bootdev=$(cat /tmp/net.bootdev)
read -r bootdev < /tmp/net.bootdev
fi
# shellcheck disable=SC2016

View File

@@ -15,7 +15,7 @@
# We translate list of slaves to space-separated here to make it easier to loop over them in ifup
# Ditto for bonding options
parsebond() {
local v=${1}:
local v="${1}":
set --
while [ -n "$v" ]; do
set -- "$@" "${v%%:*}"

View File

@@ -8,7 +8,7 @@
#
parsebridge() {
local v=${1}:
local v="${1}":
set --
while [ -n "$v" ]; do
set -- "$@" "${v%%:*}"

View File

@@ -12,6 +12,9 @@
# routing,dns,dhcp-options,etc.
#
# we really need to use `expr substr` with dash
# shellcheck disable=SC2003 disable=SC2308
command -v getarg > /dev/null || . /lib/dracut-lib.sh
if [ -n "$netroot" ] && [ -z "$(getarg ip=)" ] && [ -z "$(getarg BOOTIF=)" ]; then
@@ -69,7 +72,7 @@ for p in $(getargs ip=); do
for autoopt in $(str_replace "$autoconf" "," " "); do
case $autoopt in
error) die "Error parsing option 'ip=$p'" ;;
bootp | rarp | both) die "Sorry, ip=$autoopt is currenty unsupported" ;;
bootp | rarp | both) die "Sorry, ip=$autoopt is currently unsupported" ;;
none | off)
[ -z "$ip" ] \
&& die "For argument 'ip=$p'\nValue '$autoopt' without static configuration does not make sense"
@@ -97,6 +100,11 @@ for p in $(getargs ip=); do
fi
# IFACES list for later use
IFACES="$IFACES $dev"
# Interface should exist
if [ ! -e "/sys/class/net/$dev" ]; then
warn "Network interface '$dev' does not exist"
fi
fi
# Do we need to check for specific options?
@@ -134,7 +142,7 @@ fi
# This ensures that BOOTDEV is always first in IFACES
if [ -n "$BOOTDEV" ] && [ -n "$IFACES" ]; then
IFACES="${IFACES%$BOOTDEV*} ${IFACES#*$BOOTDEV}"
IFACES="${IFACES%"$BOOTDEV"*} ${IFACES#*"$BOOTDEV"}"
IFACES="$BOOTDEV $IFACES"
fi

View File

@@ -10,7 +10,7 @@
#
parseteam() {
local v=${1}:
local v="${1}":
set --
while [ -n "$v" ]; do
set -- "$@" "${v%%:*}"

View File

@@ -5,7 +5,7 @@
#
parsevlan() {
local v=${1}:
local v="${1}":
set --
while [ -n "$v" ]; do
set -- "$@" "${v%%:*}"

View File

@@ -2,7 +2,7 @@
# called by dracut
check() {
require_binaries sed grep || return 1
require_binaries sed grep NetworkManager || return 1
# do not add this module by default
return 255
@@ -10,7 +10,7 @@ check() {
# called by dracut
depends() {
echo dbus
echo dbus bash
return 0
}
@@ -31,6 +31,7 @@ install() {
inst NetworkManager
inst_multiple -o /usr/{lib,libexec}/nm-initrd-generator
inst_multiple -o /usr/{lib,libexec}/nm-daemon-helper
inst_multiple -o teamd dhclient
inst_hook cmdline 99 "$moddir/nm-config.sh"
if dracut_module_included "systemd"; then
@@ -38,6 +39,11 @@ install() {
inst "$dbussystem"/org.freedesktop.NetworkManager.conf
inst_multiple nmcli nm-online
# teaming support under systemd+dbus
inst_multiple -o \
"$dbussystem"/teamd.conf \
"$dbussystemconfdir"/teamd.conf
# Install a configuration snippet to prevent the automatic creation of
# "Wired connection #" DHCP connections for Ethernet interfaces
inst_simple "$moddir"/initrd-no-auto-default.conf /usr/lib/NetworkManager/conf.d/
@@ -46,8 +52,8 @@ install() {
inst_simple "$moddir"/nm-wait-online-initrd.service "$systemdsystemunitdir"/nm-wait-online-initrd.service
# Adding default link
inst_multiple -o "${systemdutildir}/network/99-default.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdsystemconfdir}/network/*.link"
inst_multiple -o "${systemdnetwork}/99-default.link"
[[ $hostonly ]] && inst_multiple -H -o "${systemdnetworkconfdir}/*.link"
$SYSTEMCTL -q --root "$initdir" enable nm-initrd.service
fi
@@ -55,6 +61,7 @@ install() {
inst_hook initqueue/settled 99 "$moddir/nm-run.sh"
inst_rules 85-nm-unmanaged.rules
inst_libdir_dir "NetworkManager/$_nm_version"
inst_libdir_file "NetworkManager/$_nm_version/libnm-device-plugin-team.so"
inst_simple "$moddir/nm-lib.sh" "/lib/nm-lib.sh"

View File

@@ -16,6 +16,20 @@ if getargbool 0 rd.debug -d -y rdinitdebug -d -y rdnetdebug; then
echo '[logging]'
echo 'level=TRACE'
) > /run/NetworkManager/conf.d/initrd-logging.conf
if [ -n "$DRACUT_SYSTEMD" ]; then
# Enable tty output if a usable console is found
# See https://github.com/coreos/fedora-coreos-tracker/issues/943
# shellcheck disable=SC2217
if [ -w /dev/console ] && (echo < /dev/console) > /dev/null 2> /dev/null; then
mkdir -p /run/systemd/system/nm-initrd.service.d
cat << EOF > /run/systemd/system/nm-initrd.service.d/tty-output.conf
[Service]
StandardOutput=tty
EOF
systemctl --no-block daemon-reload
fi
fi
fi
nm_generate_connections

Some files were not shown because too many files have changed in this diff Show More