Skip to content

Initramfs generation prints warning about errors happened, but no output available what went wrong

I'm sorry for this title, but I currently don't know how to describe it better.
After the v38.x releases I noticed that mkinitcpio prints the following statement when building the initramfs for a custom kernel:

==> WARNING: errors were encountered during the build. The image may not be complete.

But during the complete run there is no warning or error visible that isn't also there when building the initramfs for the Arch kernel. I did notice some missing output though:
Run with the repo linux package:

# mkinitcpio -p linux       
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img
==> Starting build: '6.8.2-arch2-1'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [keymap]
  -> Running build hook: [block]
  -> 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

compared to my differently named kernel:

# mkinitcpio -p linux-Hekate   
==> Building image from preset: /etc/mkinitcpio.d/linux-Hekate.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux-Hekate -g /boot/initramfs-linux-Hekate.img
==> Starting build: '6.7.9-arch1-8-Hekate'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [keymap]
  -> Running build hook: [block]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-Hekate.img'
==> WARNING: errors were encountered during the build. The image may not be complete.

So apparantly something went awry at the early cpio stuff as -> Early uncompressed CPIO image generation successful is missing. But there is no real error message. Even with -v there is no helpful additional output.
Looking via lsinitcpio --early I spot no difference:

Arch kernel:

$ lsinitcpio initramfs-linux.img --early  
early_cpio
kernel/
kernel/x86/
kernel/x86/microcode/
kernel/x86/microcode/GenuineIntel.bin

Custom kernel:

$ lsinitcpio initramfs-linux-Hekate.img --early 
early_cpio
kernel/
kernel/x86/
kernel/x86/microcode/
kernel/x86/microcode/GenuineIntel.bin

At first I tried it the cumbersome way and tried to find the culprit via adjusting my kernel config (or more like: replicating my config from a good one (Arch config)) which partially worked. But I'm at a stage where one config is good and the next stage produces the warning/error again and I don't understand why as I only disabled stuff which should be unrelated.

Therefore the question: Is it possible to enhance the output of mkinitcpio at that stage? Or is there a more descriptive output than -v?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information