You are not logged in.

#1 2024-05-01 12:12:43

Elliu
Member
Registered: 2024-05-01
Posts: 2

[SOLVED] mkinitcpio: no logs with rd.debug on cmdline

Hello,
I feel kinda dumb with this problem I have as I spent the day on it and I still have no clue what is causing it.

I wanted to add a custom initramfs hook, and it didn't work as expected (it doesn't seem to be called), so now I'm trying to enable debugging information in the initramfs, so I added the `rd.debug rd.log=all` in the kernel cmdline. However, I can't find any log, be it in /run/initramfs/init.log, in journalctl, dmesg, or anywhere else...

/etc/kernel/cmdline (confirmed used with /proc/cmdline after rebooting)

rd.luks.name=d9d0f5bc-b15c-41ac-9375-04483e87ddcd=cryptlvm rd.luks.name=9d2c82d0-7f07-40c2-b8ba-50e1c34f3ecc=home root=/dev/sysdisk/root rd.debug rd.log=all

/etc/mkinitcpio.conf:

MODULES=()
BINARIES=()
FILES=()
HOOKS=(base udev autodetect microcode modconf systemd kms keyboard keymap sd-vconsole consolefont block sd-encrypt lvm2 filesystems fsck)

/etc/mkinitcpio.d/linux.preset

ALL_kver="/boot/vmlinuz-linux"

PRESETS=('default' 'fallback')

default_uki=/efi/EFI/BOOT/BOOTX64.EFI
fallback_uki=/efi/EFI/BOOT/BOOTX64FALLBACK.EFI

default_image="/boot/initramfs-linux.img"
fallback_image="/boot/initramfs-linux-fallback.img"

fallback_options="-S autodetect"

I didn't see any errors in the mkinitcpio:

==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -U /efi/EFI/BOOT/BOOTX64.EFI -g /boot/initramfs-linux.img
==> Starting build: '6.8.8-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [systemd]
  -> Running build hook: [kms]
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [keymap]
  -> Running build hook: [sd-vconsole]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
  -> Running build hook: [sd-encrypt]
==> WARNING: Possibly missing firmware for module: 'qat_420xx'
  -> Running build hook: [lvm2]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Creating unified kernel image: '/efi/EFI/BOOT/BOOTX64.EFI'
  -> Using cmdline file: '/etc/kernel/cmdline'
==> Unified kernel image generation successful
==> Running post hooks
  -> Running post hook: [sbctl]
Signing EFI binaries...
Generating EFI bundles....
File has already been signed /efi/EFI/BOOT/BOOTX64FALLBACK.EFI
✓ Signed /efi/EFI/BOOT/BOOTX64.EFI
==> Post processing done
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -U /efi/EFI/BOOT/BOOTX64FALLBACK.EFI -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: '6.8.8-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [systemd]
  -> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: 'ast'
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [keymap]
  -> Running build hook: [sd-vconsole]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'wd719x'
  -> Running build hook: [sd-encrypt]
==> WARNING: Possibly missing firmware for module: 'qat_420xx'
  -> Running build hook: [lvm2]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-fallback.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Creating unified kernel image: '/efi/EFI/BOOT/BOOTX64FALLBACK.EFI'
  -> Using cmdline file: '/etc/kernel/cmdline'
==> Unified kernel image generation successful
==> Running post hooks
  -> Running post hook: [sbctl]
Signing EFI binaries...
Generating EFI bundles....
File has already been signed /efi/EFI/BOOT/BOOTX64.EFI
✓ Signed /efi/EFI/BOOT/BOOTX64FALLBACK.EFI
==> Post processing done
(4/4) Signing EFI binaries...
Generating EFI bundles....
File has already been signed /efi/EFI/BOOT/BOOTX64.EFI
File has already been signed /efi/EFI/BOOT/BOOTX64FALLBACK.EFI

I'm using secure boot with luks and lvm, if that may matter

Is there something else needed for enabling debugging that I am missing?

Any help appreciated, thanks

Last edited by Elliu (2024-05-13 14:36:08)

Offline

#2 2024-05-05 14:48:06

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 714

Re: [SOLVED] mkinitcpio: no logs with rd.debug on cmdline

Elliu wrote:
HOOKS=(base udev autodetect microcode modconf systemd kms keyboard keymap sd-vconsole consolefont block sd-encrypt lvm2 filesystems fsck)

rd.debug and rd.log are specific to busybox-based mkinitcpio hooks, but you're using the using the systemd hook (you're actually using a mix of both busybox-based and systemd-based hooks for whatever reason). For systemd-based hooks, you debug the early userspace just like any other systemd system. E.g. with systemd.log_level=debug and similar.

Offline

#3 2024-05-13 14:32:59

Elliu
Member
Registered: 2024-05-01
Posts: 2

Re: [SOLVED] mkinitcpio: no logs with rd.debug on cmdline

Oh right, thank you. That also explains why it didn't listen to "break=postmount" cmdline argument too.

The fact that the mkinitcpio man doesn't mention at all that when using the systemd hook, none of the "EARLY INIT ENVIRONMENT" arguments are read, or that none of the runtime hooks will be run is kinda confusing...

Anyway, thank you for the help, I ended up moving to (hopefully) full systemd hooks except for "base", and moved the hook I wanted to run in a systemd service:

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

Thank you for the help

Last edited by Elliu (2024-05-13 14:33:23)

Offline

Board footer

Powered by FluxBB