You are not logged in.

#1 2019-05-24 19:39:10

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

[Solved] dracut does not respect "quiet" on cmdline

I have been experimenting with dracut now it is slated to replace mkinitcpio. It works fine, but for one annoying issue: all boot messages are printed during boot.

The machine I am testing on is LVM on LUKS and has two kernels, although I am only playing with vanilla Arch: 5.1.4-1

The cmdline is:

options rd.luks.uuid=XXXXXX root=UUID=XXXXXXX rd.lvm.vg=vgroup init=/usr/lib/systemd/systemd quiet rw

and dracut is invoked with:

dracut -H -f --no-hostonly-cmdline /boot/initramfs-dracut.img

Dropping --no-hostonly-cmdline has no effect.

dracut is 049-3 systemd is 242.29-1 and the only conf file I have is to include the i915 driver for early KMS.


Can anyone else reproduce/confirm?

Last edited by jasonwryan (2019-05-24 21:14:46)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#2 2019-05-25 12:32:10

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,857
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

FWIW, I don't think this is due to dracut. I have the same problem with mkinitcpio configured to use systemd.

If systemd encounters a priority 0 - 3 message during the boot process, it automatically switches to non-quiet mode. In my case, I get "dw_dmac INTL9C60:00: Missing DT data" error very early in the boot process, and it switches to shouty mode. The workaround I use to counter that is to append "systemd.show_status=false" to the kernel command line. It's not a great solution, because you don't get any feedback if something *actually* goes wrong, but I figure I can just check the journal in that situation.

EDIT: just tested on my LVM on LUKS laptop, and dracut boots silently with the aforementioned kernel option.

Last edited by WorMzy (2019-05-25 12:59:46)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2019-05-25 18:52:20

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

Thanks WorMzy. If I boot with mkinitcpio, I do get a silent boot, so systemd is not reporting any errors. With dracut it is all green.

I'm reluctant to suppress errors for the same reasons.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2019-05-25 22:41:46

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,857
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

I can only guess that something in the mkinitcpio setup is overriding the systemd behaviour, but I couldn't find any other way of doing that than suppressing all status output. Please post your mkinitcpio.conf and corresponding kernel cmdline.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2019-05-25 22:44:56

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

mkinitcpio.conf:

MODULES=(vfat ext4 dm_mod dm_crypt i915)
BINARIES=()
FILES=()
HOOKS=(base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck consolefont)

kernel command line:

options cryptdevice=/dev/sda2:vgroup:allow-discards root=/dev/mapper/vgroup-lvroot init=/usr/lib/systemd/systemd quiet loglevel=3 rw

#edit Interestingly, I just ran --print-cmdline and even though it is specified in my options line, quiet is not printed (neither is loglevel):

root=/dev/mapper/vgroup-lvroot rootfstype=ext4 rootflags=rw,relatime

Last edited by jasonwryan (2019-05-25 22:50:47)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2019-05-25 23:05:53

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,857
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

You're not using systemd in your mkinitcpio setup, that's a busybox init setup. tongue


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2019-05-26 00:44:28

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

Because it's not using systemd hooks? How does that impact dracut/quiet? I'm lost...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2019-05-26 07:49:49

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,857
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

It means that this isn't a dracut fault -- you only get a silent boot with the mkinitcpio image because systemd isn't started until after the root partition is mounted. If you switched to systemd hooks in mkinitcpio (and updated the cmdline to compensate), you'd (probably) get the same behavior.

Unfortunately this means you're in the same situation as me, but check your journal for early priority 3/2/1/0 (journalctl -b -p3) messages, perhaps yours are more easily fixed.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#9 2019-05-26 08:17:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

Gotcha: that makes sense.

Switched to systemd hooks and, yep, noisy boot tongue

Thanks for the pointers!


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2019-05-26 08:37:13

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [Solved] dracut does not respect "quiet" on cmdline

I'm thinking the problem isn't busybox/udev vs. systemd. Things are quiet for me using systemd (but with mkinitcpio, not dracut). Systemd is supposed to listen to the "quiet" parameter and this seems to work for me here. The screen stays black until the display manager shows up.

Offline

#11 2019-05-26 16:34:11

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

Has anyone (WormZy) tried using

rd.systemd.show_status=auto to only suppress successful messages (so in case of errors you can still see them)

for the mkinitcpio systemd boot? That seemed to work for me when I was using and I was able to get a slient boot but would allow for errors to be displayed when they existed.

I'm also playing with dracut and I've been able to have a completely silent boot as well (albeit just a tad longer than mkinitcpio boot, avgs. ~14-18 seconds with dracut, was averaging ~8-12 seconds with mkinitcpio). Didn't seem to have to do anything special for silent dracut boot though. Here's my cmdline when booted using dracut.

$ cat /proc/cmdline
initrd=\intel-ucode.img initrd=\initramfs-linux-dracut.img root=UUID=cb215580-917a-4370-88cb-0415b7e62c99 rw quiet sysrq_always_enabled=1 intel_pstate=disable nowatchdog

Here's the build of the initramrfs by dracut:

$ sudo dracut -H -f /boot/initramfs-linux-dracut.img
dracut: Executing: /usr/bin/dracut -H -f /boot/initramfs-linux-dracut.img
dracut: dracut module 'bootchart' will not be installed, because command '/sbin/bootchartd' could not be found!
dracut: dracut module 'dash' will not be installed, because command '/bin/dash' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut: dracut module 'network' depends on 'network-legacy', which can't be installed
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'stratis' will not be installed, because command 'stratisd-init' 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 'nfs' will not be installed, because command 'rpc.statd' could not be found!
dracut: dracut module 'nfs' will not be installed, because command 'mount.nfs' could not be found!
dracut: dracut module 'nfs' will not be installed, because command 'mount.nfs4' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'dash' will not be installed, because command '/bin/dash' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'stratis' will not be installed, because command 'stratisd-init' 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 'nfs' will not be installed, because command 'rpc.statd' could not be found!
dracut: dracut module 'nfs' will not be installed, because command 'mount.nfs' could not be found!
dracut: dracut module 'nfs' will not be installed, because command 'mount.nfs4' could not be found!
dracut: *** Including module: bash ***
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: i18n ***
dracut: i18n_vars not set!  Please set up i18n_vars in  configuration file.
dracut: No KEYMAP configured.
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: kernel-network-modules ***
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: 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: 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: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Store current command line parameters ***
dracut: Stored kernel commandline:
dracut:  rd.lvm.lv=vg/root 
dracut:  root=/dev/mapper/vg-root rootfstype=ext4 rootflags=rw,relatime
dracut: *** Creating image file '/boot/initramfs-linux-dracut.img' ***
dracut: *** Creating initramfs image file '/boot/initramfs-linux-dracut.img' done ***

And here's the  systemd-analyze blame when booting with dracut:

systemd-analyze blame
          1.521s lvm2-pvscan@8:2.service
           702ms dracut-initqueue.service
           597ms systemd-logind.service
           591ms lvm2-monitor.service
           457ms systemd-resolved.service
           356ms initrd-switch-root.service
           300ms systemd-udevd.service
           262ms systemd-networkd.service
           246ms swapfile.swap
           236ms systemd-journald.service
           197ms systemd-machined.service
           193ms systemd-journal-flush.service
           164ms udisks2.service
           106ms iwd.service
            84ms initrd-parse-etc.service
            83ms systemd-rfkill.service
            76ms sysroot.mount
            74ms polkit.service
            73ms systemd-udev-trigger.service
            60ms user@976.service
            58ms systemd-tmpfiles-clean.service
            58ms upower.service
            57ms dracut-cmdline.service
            57ms boot.mount
            55ms user@1000.service
            38ms systemd-fsck@dev-disk-by\x2duuid-A5C3\x2d02E1.service
            36ms dracut-pre-udev.service
            34ms systemd-tmpfiles-setup.service
            33ms systemd-fsck@dev-disk-by\x2duuid-fb822821\x2df4d2\x2d4553\x2d8ad8\x2d6b8e186af1c0.service
            31ms systemd-fsck@dev-disk-by\x2duuid-c2f9af45\x2d775e\x2d4cd6\x2da391\x2d73c8ed8bbfdd.service
            31ms systemd-fsck@dev-disk-by\x2duuid-979c96e5\x2d7dcd\x2d4564\x2d8a19\x2d72d6e8094b63.service
            29ms kvm.mount
            26ms systemd-tmpfiles-setup-dev.service
            24ms initrd-cleanup.service
            23ms systemd-backlight@leds:dell::kbd_backlight.service
            22ms systemd-random-seed.service
            20ms systemd-fsck-root.service
            18ms home.mount
            18ms systemd-sysctl.service
            17ms systemd-backlight@backlight:intel_backlight.service
            15ms systemd-modules-load.service
            15ms user-runtime-dir@1000.service
            14ms systemd-update-utmp.service
            13ms systemd-remount-fs.service
            12ms dev-mqueue.mount
            11ms dev-hugepages.mount
            10ms kmod-static-nodes.service
             8ms user-runtime-dir@976.service
             8ms sys-kernel-debug.mount
             7ms systemd-user-sessions.service
             7ms dracut-shutdown.service
             5ms initrd-udevadm-cleanup-db.service
             5ms systemd-vconsole-setup.service
             5ms rtkit-daemon.service
             4ms var.mount
             2ms tmp.mount
             1ms sys-kernel-config.mount

"the wind-blown way, wanna win? don't play"

Offline

#12 2019-05-26 22:43:04

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,857
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

CarbonChauvinist wrote:

Has anyone (WormZy) tried using

rd.systemd.show_status=auto to only suppress successful messages (so in case of errors you can still see them)

for the mkinitcpio systemd boot? That seemed to work for me when I was using and I was able to get a slient boot but would allow for errors to be displayed when they existed.

I didn't see that page, but I did test that option. However, it should be noted that 1) "auto" is the default if "quiet" is included on the kernel command line (otherwise it defaults to "true"), and 2) 'man systemd | less -p "KERNEL COMMAND LINE"' doesn't prefix the command line options with "rd.", and in my experiments including it caused the declaration to be ignored. Maybe that's a recent change?

It'd be interesting to see if you have any early high priority messages. I can't find any documentation supporting my claim that high priority log messages cause systemd to switch to verbose mode (just unit failures or "significant delays"), so I might be mistaken about the cause of the switch.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#13 2019-05-27 05:54:16

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

OK. I have had a chance to test this some more...

Ensuring there are no errors:

┌─[Shiv ~]
└─╼ systemctl --state=failed
0 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
┌─[Shiv ~]
└─╼ journalctl -b -p3                                                                                                                                         
-- Logs begin at Thu 2019-04-11 06:12:07 NZST, end at Mon 2019-05-27 17:50:49 NZST. --
-- No entries --

And with a dracut boot, I still get the wall of green...

I'll give a systemd boot a shot directly.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#14 2019-05-27 08:13:42

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,857
Website

Re: [Solved] dracut does not respect "quiet" on cmdline

Okay, my only remaining theory is that systemd interprets the 'wait for password' prompt as a "significant delay". It might be worth testing how it does if you use a key file to decrypt and/or checking whether "significant delay" is defined anywhere and is tunable.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB