Skip to content

fix: add cpio#24

Open
fizzyizzy05 wants to merge 1 commit intobootcrew:mainfrom
fizzyizzy05:add-cpio
Open

fix: add cpio#24
fizzyizzy05 wants to merge 1 commit intobootcrew:mainfrom
fizzyizzy05:add-cpio

Conversation

@fizzyizzy05
Copy link

@fizzyizzy05 fizzyizzy05 commented Feb 16, 2026

The cpio package is no longer automatically installed with the base packages, causing dracut to fail to build the initramfs, and causing image builds to fail. This PR explicitly adds it as a base package, making builds work again.

@saminaltamimi
Copy link
Contributor

I see this in my builds too:

--> Building initramfs for linux-hardened (6.17.13-hardened1-3-hardened)
dracut[E]: Module 'systemd-pcrphase' cannot be found.
(13/13) Reloading system bus configuration...
  Skipped: Current root is not booted.

Cache directory: /usr/lib/sysimage/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N] 

Database directory: /usr/lib/sysimage/lib/pacman/
:: Do you want to remove unused repositories? [Y/n] 
removing unused sync repositories...
/usr/sbin/dracut: line 3107: cpio: command not found
/usr/sbin/dracut: line 3328: cpio: command not found
dracut[F]: Creation of /usr/lib/modules/6.17.13-hardened1-3-hardened/initramfs.img failed
Error: building at STEP "RUN for dir in $(grep "= */var" /etc/pacman.conf | sed 's/.*= *//; s/ //g'); do         target="/usr/lib/sysimage/$(echo "$dir" | sed 's@/var/@@')" &&         mkdir -p "$(dirname "$target")" &&         mv -v "$dir" "$target";     done &&     sed -i -e "/= *\\/var/ s/^#//"            -e "s@= */var@= /usr/lib/sysimage@g"            -e "/DownloadUser/d" /etc/pacman.conf &&     pacman -Syu --noconfirm         base systemd dracut linux-hardened linux-firmware         ostree btrfs-progs e2fsprogs xfsprogs dosfstools         skopeo tpm2-tss tpm2-tools libfido2 polkit &&     pacman -Scc --noconfirm &&     kver=$(find /usr/lib/modules -maxdepth 1 -mindepth 1 -type d ! -name "*.img" -printf '%f\n' | tail -n1) &&     dracut --force --omit "systemd-pcrphase" "/usr/lib/modules/${kver}/initramfs.img" "${kver}" &&     mkdir -p /boot/staging &&     mv /usr/lib/modules/${kver}/vmlinuz /boot/staging/vmlinuz &&     mv /usr/lib/modules/${kver}/initramfs.img /boot/staging/initramfs.img &&     sed -i 's|^HOME=.*|HOME=/var/home|' /etc/default/useradd &&     rm -rf /run/* /tmp/* /home /root /usr/local /srv /opt /mnt /var            /usr/lib/sysimage/log /usr/lib/sysimage/cache/pacman/pkg &&     mkdir -p /sysroot /usr/lib/ostree /var &&     ln -sT sysroot/ostree /ostree &&     ln -sT var/roothome /root &&     ln -sT var/srv /srv &&     ln -sT var/opt /opt &&     ln -sT var/mnt /mnt &&     ln -sT var/home /home &&     ln -sT ../var/usrlocal /usr/local &&     bootc container lint": while running runtime: exit status 1
error: Recipe `build-containerfile` failed with exit code 1

I am also seeing pcrphase module not being detected @fizzyizzy05 do you happen to know why?

@saminaltamimi
Copy link
Contributor

saminaltamimi commented Feb 16, 2026

Nevermind, per dracut-ng/dracut-ng#2066, it was renamed to systemd-pcrextend.

But the cpio issue is still there and this PR fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments