You are not logged in.

#1 2024-05-26 21:16:00

scott_fakename
Member
Registered: 2012-08-15
Posts: 123

[Solved]Initramfs uncompressed despite COMPRESSION= in mkinitcpio,conf

My mkinitcpio.conf looks like this (comments removed):

$ sed '/^#/d' /etc/mkinitcpio.conf
MODULES=()

BINARIES=()

FILES=()

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

COMPRESSION="xz"

COMPRESSION_OPTIONS=(-9e)

After upgrading the kernel pacman's mkinitcpio hook looks like this:

==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'                                                                 14:01:54 [45/100]
==> Using default configuration file: '/etc/mkinitcpio.conf'                                                                                                   
  -> -k /boot/vmlinuz-linux-lts -g /boot/initramfs-linux-lts.img
==> Starting build: '6.6.32-1-lts'
  -> Running build hook: [base]   
  -> Running build hook: [systemd]  
  -> 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: [sd-vconsole]
  -> Running build hook: [block]                                               
  -> Running build hook: [sd-encrypt]                                          
  -> Running build hook: [lvm2]                                                
  -> Running build hook: [filesystems]                                         
  -> Running build hook: [fsck]                                                
==> Generating module dependencies                                             
==> Creating xz-compressed initcpio image: '/boot/initramfs-linux-lts.img'
  -> Early uncompressed CPIO image generation successful      
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux-lts -g /boot/initramfs-linux-lts-fallback.img -S autodetect
==> Starting build: '6.6.32-1-lts'                                                                                                                             
  -> Running build hook: [base]                                                
  -> Running build hook: [systemd]                                             
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> 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: [sd-vconsole]                                         
  -> 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: 'qla1280'             
==> WARNING: Possibly missing firmware for module: 'qla2xxx'          
==> WARNING: Possibly missing firmware for module: 'wd719x'               
  -> Running build hook: [sd-encrypt]
  -> Running build hook: [lvm2]                                                
  -> Running build hook: [filesystems]                                         
  -> Running build hook: [fsck]                                                
==> Generating module dependencies                                             
==> Creating xz-compressed initcpio image: '/boot/initramfs-linux-lts-fallback.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: '6.9.2-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [systemd]
  -> 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: [sd-vconsole]
  -> 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 xz-compressed initcpio image: '/boot/initramfs-linux.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: '6.9.2-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [systemd]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> 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: [sd-vconsole]
  -> 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: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> 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 xz-compressed initcpio image: '/boot/initramfs-linux-fallback.img' 
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful

During update, `top` showed that `xz` did indeed run as `xz -T0 -9e`, and looking at it I determined it was writing to a temp file in /boot/:

# for fd in /proc/$(pidof xz)/fd/*; do echo "${fd##*/}: $(readlink -f "${fd}")"; done | sort -n
0: /proc/37923/fd/pipe:[63612]
1: /boot/initramfs-linux-lts.img.tmp
2: /dev/pts/2
3: /proc/37923/fd/pipe:[43591]
4: /proc/37923/fd/pipe:[43591]
5: /proc/37923/fd/anon_inode:[landlock-ruleset]
6: /proc/37923/fd/anon_inode:[landlock-ruleset]
7: /proc/37923/fd/anon_inode:[landlock-ruleset]

And yet nothing in boot is an xz compressed file:

$ find /boot/ -type f -exec file {} +
/boot/amd-ucode.img:                         ASCII cpio archive (SVR4 with no CRC)
/boot/vmlinuz-linux-lts:                     Linux kernel x86 boot executable bzImage, version 6.6.32-1-lts (linux-lts@archlinux) #1 SMP PREEMPT_DYNAMIC Sat, 25 May 2024 20:20:51 +0000, RO-rootFS, swap_dev 0XC, Normal VGA
/boot/vmlinuz-linux:                         Linux kernel x86 boot executable bzImage, version 6.9.2-arch1-1 (linux@archlinux) #1 SMP PREEMPT_DYNAMIC Sun, 26 May 2024 01:30:29 +0000, RO-rootFS, swap_dev 0XC, Normal VGA
/boot/EFI/systemd/systemd-bootx64.efi:       PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows, 9 sections
/boot/EFI/BOOT/BOOTX64.EFI:                  PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows, 9 sections
/boot/loader/entries/arch.conf:              ASCII text
/boot/loader/entries/arch-fallback.conf:     ASCII text
/boot/loader/entries/arch-fsck.conf:         ASCII text
/boot/loader/entries/arch-lts.conf:          ASCII text
/boot/loader/entries/arch-lts-fallback.conf: ASCII text
/boot/loader/entries/arch-lts-fsck.conf:     ASCII text
/boot/loader/loader.conf:                    ASCII text
/boot/loader/random-seed:                    data
/boot/loader/entries.srel:                   ASCII text
/boot/initramfs-linux-lts.img:               ASCII cpio archive (SVR4 with no CRC)
/boot/initramfs-linux-lts-fallback.img:      ASCII cpio archive (SVR4 with no CRC)
/boot/initramfs-linux.img:                   ASCII cpio archive (SVR4 with no CRC)
/boot/initramfs-linux-fallback.img:          ASCII cpio archive (SVR4 with no CRC)

(If I do `xzcat /boot/vmlinus-linux >/dev/null` it just says it's not an xz compressed stream)

Did I misconfigure something? Or am I just misunderstanding something?

Last edited by scott_fakename (2024-05-30 05:40:08)

Offline

#2 2024-05-27 03:38:47

just4arch
Member
Registered: 2023-01-07
Posts: 114

Re: [Solved]Initramfs uncompressed despite COMPRESSION= in mkinitcpio,conf

lsinitcpio -a /boot/initramfs-linux.img

There are uncompressed and compressed parts.

Offline

#3 2024-05-27 04:30:06

scott_fakename
Member
Registered: 2012-08-15
Posts: 123

Re: [Solved]Initramfs uncompressed despite COMPRESSION= in mkinitcpio,conf

Oh, yep, so there is; I was misunderstanding it.

Thanks!

Offline

#4 2024-05-27 07:50:21

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,024

Re: [Solved]Initramfs uncompressed despite COMPRESSION= in mkinitcpio,conf

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB