New options for dracut

Ya that’s what i sorta thought.

Just a heads up: My system complains that nbd depends on network which can’t be addded when applying that config. Might be a good idea to add nbd to the default omit list, too (unless there are reasons why it should not be added - at least on my system, it has no negative consequences ).

2 Likes

yes, this:

[2023-02-08T19:30:52-0500] [ALPM-SCRIPTLET] dracut: dracut module 'cifs' depends on 'network', which can't be installed
[2023-02-08T19:30:52-0500] [ALPM-SCRIPTLET] dracut: dracut module 'nfs' depends on 'network', which can't be installed

Yeah, that will be fixed in the next ISO but the small change to make those messages go away is above.

2 Likes

I have noticed I get this message even on systems where cifs is installed and actively in use in fstab mounts. The mounts work fine even though dracut appears to not be able to install the modules.

I’m wondering what the significance of these modules is, since it kind of seems like they don’t do anything. :thinking:

cifs is for mounting windows shares as far as i know. So it’s just another module that allows this option if the proper packages are installed i guess. NFS is protocol for Network File Sharing. So these modules would be required for the purposes they are needed. I wouldn’t be too concerned about it, The messages are more informational than errors.

That is because you probably don’t need cifs support in your initrd. That is why we disable network by default. Most people don’t need any kind of network support in the initrd.

Oooh, gotcha. The modules would be for if you needed a resource on the network…before systemd is even up? That seems like it is probably very uncommon. Or maybe I am misunderstanding/having a hard time imagining a possible use case.

1 Like

The obvious use case would be that you need a network volume to boot the system. As you say, this would be highly atypical. On the other hand, excluding it can reduce the size of the initrd by 20+ MB so it seems worth it to exclude it by default.

2 Likes

It seems odd that this one does not count as one of the “quiet” outputs that can be automatically silenced.

I think I understand it. In this case, it is telling you it wants to add a module but something is blocking it.

So it is a real warning as opposed to an informational message.

Well it’s a warning sure. But only in sense that it’s informational because you don’t need it. :wink:

I was really scratching my head to understand your meaning, but I finally get it after looking in /etc/dracut.conf.d/eos-defaults.conf. The network module is blocked by default (as you mentioned–because it adds 20 megs to the image size)–and that’s why the cifs and nfs modules fail. :bulb:

1 Like

@dalto
Maybe slightly off-topic but what is the difference between:
/etc/dracut.conf.d/eos-defaults.conf
&
/etc/kernel-install-for-dracut.conf?

I tried to set DRACUT_QUIET="true" in /etc/dracut.conf.d/eos-defaults.conf in the past but it had absolutely no effect.


But when I installed /etc/kernel-install-for-dracut.conf today and used DRACUT_QUIET="true" it worked.

I am using systemd-boot btw.

Thanks for the help!

The files in /etc/dracut.conf.d are the actual dracut config files.

/etc/kernel-install-for-dracut.conf is a config file that controls things in the automation surrounding dracut and systemd-boot.

The reason that the quiet flag is in the file is that I could not find a way to control it through the dracut config. I could, however, control it via the command line arguments to dracut. So that config file gets read when our automation runs dracut and passes the appropriate option based on the config.

Because that is not a valid setting for dracut.

2 Likes

Thank you for this explanation!

1 Like

@dalto
I just want to say that since dracut was added i have not had a single issue with updating or installing. For me it’s worked flawless on my btrfs install or other with grub. Although i know very little about it’s inner workings I’m quite happy with it. This is both on dual boot or single installs also with nvidia or amd.

3 Likes

When I updated today, I noticed the dracut output had reverted to full verbosity despite the DRACUT_QUIET="true" option being set. It hasn’t been recently set, it has been set for some time and has worked fine until now as far as I can remember.

❯ cat /etc/kernel-install-for-dracut.conf
File: /etc/kernel-install-for-dracut.conf
# This config file controls the automation provided by kernel-install-for-dracut

# When DRACUT_QUIET is set to true, dracut will operate with quiet flag set suppressing most output
DRACUT_QUIET="true"

# When NO_FALLBACK is set to true, no fallback initrd will be generated
#NO_DRACUT_FALLBACK="false"
❯ cat /etc/dracut.conf
File: /etc/dracut.conf
# PUT YOUR CONFIG IN separate files
# in /etc/dracut.conf.d named "<name>.conf"
# SEE man dracut.conf(5) for options

❯ cat /etc/dracut.conf.d/eos-defaults.conf
File: /etc/dracut.conf.d/eos-defaults.conf
omit_dracutmodules+=" network cifs nfs brltty "
compress="zstd"

Here is the output from the update if that is useful: http://ix.io/4HL5

Interesting, I don’t see anything obvious that has changed.

Can you run this command:

sudo dracut --hostonly --no-hostonly-cmdline --quiet ~/initrd 6.1.51-1-lts
sudo rm ~/initrd

You might need to change the kernel name to match your installed kernel.

This ran with no output.

❯ sudo dracut --hostonly --no-hostonly-cmdline --quiet ~/initrd 6.1.55-1-lts

~ took 5s
❯ sudo rm ~/initrd

So it seems to honor the --quiet flag when run like that.

If I reinstall the kernel, it’s still the verbose output.

Summary
sudo pacman -S linux-lts
warning: linux-lts-6.1.55-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)     Old Version  New Version  Net Change

core/linux-lts  6.1.55-1     6.1.55-1       0.00 MiB

Total Installed Size:  116.17 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                  [-----------------------------------] 100%
(1/1) checking package integrity                                [-----------------------------------] 100%
(1/1) loading package files                                     [-----------------------------------] 100%
(1/1) checking for file conflicts                               [-----------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 63
:: Processing package changes...
(1/1) reinstalling linux-lts                                    [-----------------------------------] 100%
:: Running post-transaction hooks...
(1/8) Arming ConditionNeedsUpdate...
(2/8) Updating module dependencies...
(3/8) Updating initramfs...
:: Building initramfs for linux-lts (6.1.55-1-lts)
dracut: Executing: /usr/bin/dracut --force --hostonly --no-hostonly-cmdline /usr/lib/modules/6.1.55-1-lts/initrd 6.1.55-1-lts
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmanctl' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand-wait-online' could not be found!
dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmanctl' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand-wait-online' could not be found!
dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: i18n ***
dracut: *** Including module: btrfs ***
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: Skipping udev rule: 70-persistent-net.rules
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: Mode:                     real
dracut: Method:                   sha256
dracut: Files:                    751
dracut: Linked:                   1 files
dracut: Compared:                 0 xattrs
dracut: Compared:                 19 files
dracut: Saved:                    690 B
dracut: Duration:                 0.002595 seconds
dracut: *** Hardlinking files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/usr/lib/modules/6.1.55-1-lts/initrd' ***
dracut: *** Creating initramfs image file '/usr/lib/modules/6.1.55-1-lts/initrd' done ***
:: Building fallback initramfs for linux-lts (6.1.55-1-lts)
dracut: Executing: /usr/bin/dracut --force --no-hostonly /boot/initramfs-linux-lts-fallback.img 6.1.55-1-lts
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmanctl' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand-wait-online' could not be found!
dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'multipath' will not be installed, because command 'multipath' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoemon' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoeadm' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nbd' will not be installed, because command 'nbd-client' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: modsign ***
dracut: *** Including module: i18n ***
dracut: *** Including module: btrfs ***
dracut: *** Including module: crypt ***
dracut: *** Including module: dm ***
dracut: Skipping udev rule: 64-device-mapper.rules
dracut: Skipping udev rule: 60-persistent-storage-dm.rules
dracut: Skipping udev rule: 55-dm.rules
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: lvm ***
dracut: Skipping udev rule: 64-device-mapper.rules
dracut: Skipping udev rule: 56-lvm.rules
dracut: Skipping udev rule: 60-persistent-storage-lvm.rules
dracut: *** Including module: mdraid ***
dracut: Skipping udev rule: 64-md-raid.rules
dracut: *** Including module: nvdimm ***
dracut: *** Including module: qemu ***
dracut: *** Including module: qemu-net ***
dracut: *** Including module: lunmask ***
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: *** Including module: virtiofs ***
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: Mode:                     real
dracut: Method:                   sha256
dracut: Files:                    2207
dracut: Linked:                   8 files
dracut: Compared:                 0 xattrs
dracut: Compared:                 462 files
dracut: Saved:                    1.42 MiB
dracut: Duration:                 0.020528 seconds
dracut: *** Hardlinking files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Constructing AuthenticAMD.bin ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/boot/initramfs-linux-lts-fallback.img' ***
dracut: *** Creating initramfs image file '/boot/initramfs-linux-lts-fallback.img' done ***
(4/8) Running kernel-install...
:: kernel-install installing kernel 6.1.55-1-lts
(5/8) Check if user should be informed about rebooting after certain system package upgrades.
(6/8) Keep the last cache and the currently installed.
==> no candidate packages found for pruning
(7/8) Checking which packages need to be rebuilt
(8/8) Performing snapper post snapshots for the following configurations...
==> root: 64