Suppress boot messages

Hi there,

finally I switched my daily driver from Manjaro to EOS. By following this great tutorial I installed a LVM on LUKS system. As a small deviation I switched from udev to systemd in mkinitcpio, so the relevant parts of mkinitcpio.conf and grub reads as

HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt sd-lvm2 filesystems fsck)

and

GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3"type or paste code here
GRUB_CMDLINE_LINUX="rd.luks.name=18719858-aebe-48ae-8e63-8c09f3b90489=cryptlvm root=/dev/vgEOS/lvroot"

I would like to see only error messages on boot, despite my setting in grub I still get all messages. Is there any setting to suppress the “OK”-messages completely?

Thanks in advance,

Christoph

as the loglevel in grub only show boot messages when you have some issues

systemctl --failed ? i think it show, otherwise i think loglevel 2 , but first look what the issues are if that fixed your boot is quiet.

You mean the OK messages that can be shown, after you unlocked your LUKS LVM?
I only see those OK messages when there was one error message or a delay during the startup. Normally I do not see these messages in my 5 PCs with EOS that are all LUKS LVM.
Check if there is a error message or a delay in your startup and try to solve this problem.

There is short “a start job is running” message for the cryptography setup after unlocking the LUKS. Could this already mean a delay?

Yes, that could be a delay.
Try to read the message and then find out what the problem is.

The message is approximately “A start job for Cryptography setup for cryptlvm” and “A start job for … /dev/mapper/lvroot”. The relevant (?) part of journalctl reads

Feb 25 18:04:59 archlinux kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/vgEOS-lvroot rw rd.luks.name=18719858-aebe-48ae-8e63-8c09f3b90489=cryptlvm root=/dev/vgEOS/lvroot quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3
Feb 25 18:04:59 archlinux kernel: Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/vgEOS-lvroot rw rd.luks.name=18719858-aebe-48ae-8e63-8c09f3b90489=cryptlvm root=/dev/vgEOS/lvroot quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3
Feb 25 18:05:00 archlinux systemd[1]: Starting Cryptography Setup for cryptlvm...
Feb 25 18:05:10 archlinux systemd[1]: Started Cryptography Setup for cryptlvm.
Feb 25 18:05:10 archlinux audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-cryptsetup@cryptlvm comm="systemd" exe="/init" hostname=? addr=? terminal=? res=success'
Feb 25 18:05:10 archlinux kernel: audit: type=1130 audit(1582650310.539:5): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-cryptsetup@cryptlvm comm="systemd" exe="/init" hostname=? addr=? terminal=? res=success'
Feb 25 18:05:12 E530 systemd[1]: systemd-cryptsetup@cryptlvm.service: Succeeded.
Feb 25 18:05:12 E530 systemd[1]: Stopped systemd-cryptsetup@cryptlvm.service.
Feb 25 18:05:11 E530 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-cryptsetup@cryptlvm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

Is there somewhere else I may need to look?

Thanks in advance,

Christoph

The line with the stop looks strange.
Please check /etc/fstab, /etc/crypttab, /etc/mkinitcpio.conf and /etc/default/grub
Maybe you try to open the encrypted disk twice.
After changing something in these files you may need to rebuild kernel and grub.

Please apologize if I’m a little bit irritating on this, but I cannot find anything which may be wrong. Here are the relevant files:

[csteinforth@E530 ~]$ more /etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=""

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
# HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 resume filesystems fsck)
HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt sd-lvm2 filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
[csteinforth@E530 ~]$ more /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=6EEE-D591                            /boot/efi      vfat    umask=0077 0 2
UUID=e157abf3-301b-44d1-892f-b3e62a9a2429 /boot          ext4    defaults,noatime,discard 0 2
#
UUID=85d44e7f-df08-4c71-961f-c4583c9f2011 / ext4 defaults,acl,noatime,discard 0 0
#
UUID=cacbdd09-4441-4b4d-81ac-a57f2c8abd55 /home ext4 defaults,acl,noatime,discard 0 0
#
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
#
/swapfile none swap defaults,pri=-2 0 0
[csteinforth@E530 ~]$ more /etc/default/grub 
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3"
GRUB_CMDLINE_LINUX="rd.luks.name=18719858-aebe-48ae-8e63-8c09f3b90489=cryptlvm root=/dev/vgEOS/lvroot"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
GRUB_THEME=/boot/grub/themes/EndeavourOS/theme.txt

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"
GRUB_DISABLE_SUBMENU=y
GRUB_ENABLE_CRYPTODISK=y

The crypttab is basically empty since I thought that this is already covered by the line

GRUB_CMDLINE_LINUX="rd.luks.name=18719858-aebe-48ae-8e63-8c09f3b90489=cryptlvm root=/dev/vgEOS/lvroot"

in the grub.

[csteinforth@E530 ~]$ lsblk
NAME               MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0                7:0    0 163,7M  1 loop  /var/lib/snapd/snap/spotify/41
loop1                7:1    0  24,7M  1 loop  /var/lib/snapd/snap/snapd/6434
loop2                7:2    0  54,7M  1 loop  /var/lib/snapd/snap/core18/1668
loop3                7:3    0  91,4M  1 loop  /var/lib/snapd/snap/core/8689
sda                  8:0    0 931,5G  0 disk  
├─sda1               8:1    0  1000M  0 part  
├─sda2               8:2    0   260M  0 part  /boot/efi
├─sda3               8:3    0   128M  0 part  
├─sda4               8:4    0 140,8G  0 part  
├─sda5               8:5    0   815M  0 part  
├─sda6               8:6    0  19,5G  0 part  
├─sda7               8:7    0     1G  0 part  /boot
├─sda8               8:8    0 757,7G  0 part  
│ └─cryptlvm       254:0    0 757,7G  0 crypt 
│   ├─vgEOS-lvroot 254:1    0   125G  0 lvm   /
│   └─vgEOS-lvhome 254:2    0   575G  0 lvm   /home
└─sda9               8:9    0  10,4G  0 part  
sdb                  8:16   0 465,8G  0 disk  
├─sdb1               8:17   0     1G  0 part  
└─sdb2               8:18   0 464,8G  0 part  
sr0                 11:0    1  1024M  0 rom 
[csteinforth@E530 ~]$ sudo blkid
/dev/sdb1: UUID="b9e20945-ac18-4cde-bc7f-56ee1c1469d6" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="d44d223e-18b9-4065-b898-9da6e30c7657"
/dev/sdb2: UUID="59616220-dcbd-4edc-b5e9-647f02630cbf" TYPE="crypto_LUKS" PARTUUID="25baad21-5b80-234a-8e7a-2e5b54fe7ff2"
/dev/sda1: LABEL="WINRE_DRV" BLOCK_SIZE="512" UUID="AA9290D99290AAF9" TYPE="ntfs" PARTUUID="35ae9c9e-c4ae-4d10-98d5-8e0c1bec3ebd"
/dev/sda2: LABEL_FATBOOT="ESP" LABEL="ESP" UUID="6EEE-D591" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="c2297e12-9152-421b-8e9d-b37009f670ce"
/dev/sda3: UUID="DB23-BF0F" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="Microsoft reserved partition" PARTUUID="bb9bf758-b8e2-498c-b21e-a3c6ef505230"
/dev/sda4: LABEL="Windows8_OS" BLOCK_SIZE="512" UUID="BC869897869853AC" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="58a244dc-7cfb-48e4-af9b-3244cb160add"
/dev/sda5: BLOCK_SIZE="512" UUID="0402C6B402C6AA4E" TYPE="ntfs" PARTUUID="77a87cac-6f15-4d46-bf10-fa7e39107a78"
/dev/sda6: UUID="15ab90c1-303e-4446-a5c0-d72d8fd9c753" TYPE="swap" PARTUUID="0630053d-c075-4e96-8d67-1c7c00fbf666"
/dev/sda7: UUID="e157abf3-301b-44d1-892f-b3e62a9a2429" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="d1fd2afb-11d3-054f-a525-68759882234b"
/dev/sda8: UUID="18719858-aebe-48ae-8e63-8c09f3b90489" TYPE="crypto_LUKS" PARTUUID="d14e6289-ac0f-d34f-a561-0d8e55d6eeeb"
/dev/sda9: LABEL="Lenovo_Recovery" BLOCK_SIZE="512" UUID="588C8ADD8C8AB552" TYPE="ntfs" PARTUUID="e700ac73-43c2-4871-8b77-380a764ec123"
/dev/mapper/cryptlvm: UUID="36ChPG-neGZ-iCEj-K0fe-Y4b0-UaoC-HgoBOE" TYPE="LVM2_member"
/dev/mapper/vgEOS-lvroot: LABEL="root" UUID="85d44e7f-df08-4c71-961f-c4583c9f2011" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mapper/vgEOS-lvhome: LABEL="root" UUID="cacbdd09-4441-4b4d-81ac-a57f2c8abd55" BLOCK_SIZE="4096" TYPE="ext4"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"

I really do appreciate any hints on this,

Cristoph

I saw that there is an uncommented entry

GRUB_ENABLE_CRYPTODISK=y

but removing does no change.

This is what Arch says about it: https://wiki.archlinux.org/index.php/Silent_boot
but you probably have seen it?

Yes, I saw this. I got the

GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 rd.systemd.show_status=auto rd.udev.log_priority=3"

from there.

1 Like

If I look in your fstab you have a swap file configured. But if I look in your mkinitcpio.conf and defautl/grub I do not see how you configured resume, like it is described in the mentioned tutorial.
Maybe this is your problem. I remember that I have had the message about missing resume right after unlocking my cryptdisk before I configured a swap partition. After that message I have had all the OK messages.

Hope it helps.

Because at the bottom of your default/grub there is already this entry active.

Since I switched to the systemd hook in mkinicpio.conf as far as I understood there is no need for the resume due to this hint

When an initramfs with the systemd hook is used, a resume mechanism is already provided, and no further hooks need to be added.

in the arch wiki.

If I enter the line

cryptlvm UUID=18719858-aebe-48ae-8e63-8c09f3b90489 /crypto_keyfile.bin luks

to the /etc/crypttab the

Feb 25 23:06:06 E530 systemd[1]: Stopped systemd-cryptsetup@cryptlvm.service.
Feb 25 23:06:06 E530 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-cryptsetup@cryptlvm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success

messages in journalctl a no longer there. Do you use the crypttab in your setup?

Christoph

BTW all of this is not a big problem, because the system boots up just fine and the timeout is about a second or two. But, of course, I’d like to learn something on this.

Ok, my bad. After changing the grub concerning resume

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 systemd.show_status=auto rd.udev.log_priority=3 resume=UUID=85d44e7f-df08-4c71-961f-c4583c9f2011 resume_offset=688128"
GRUB_CMDLINE_LINUX="rd.luks.name=18719858-aebe-48ae-8e63-8c09f3b90489=cryptlvm root=/dev/vgEOS/lvroot rd.luks.options=timeout=0 rootflags=x-systemd.device-timeout=0"

hibernation works. But still I get the (rather short) “start job” messages. Any ideas?

see this line

You can pass rd.systemd.show_status=false to disable them, or rd.systemd.show_status=auto to only suppress successful messages (so in case of errors you can still see them). Actually, auto is already passed to systemd.show_status=auto when quiet is used, however for some motive sometimes

https://wiki.archlinux.org/index.php/Silent_boot#Kernel_parameters

if it is in auto state is supres succesfull messages…, less succesfull messages it shows always. further i dont know deeply …

also supressed also in sysctl messages?