Error on update: Failed to install initrd ///usr/lib/initrd.d/00-early-ucode.cpio

I get these details the last few times I tried to update.

External command: [FATAL] cbm (../src/bootman/bootman.c:L967): Failed to install initrd ///usr/lib/initrd.d/00-early-ucode.cpio -> /boot/EFI/org.clearlinux/freestanding-00-early-ucode.cpio: No space left on device
External command: [ERROR] cbm (../src/bootman/update.c:L210): Failed to copying freestanding initrd

What does this mean and how can I start to debug?

AMD Threadripper Pro 5995WX system, from version 41230.

Okay it really was out of space. Claude Sonnet 3.5 rescued me here.

Here’s what is going on.

  1. Clear Linux installs WAY too small of an EFI partition. Definitely the core problem.
  2. Clear Linux is poor at cleaning up some of its packages
  3. Clear Linux assumes no dual booting
  4. Complex updates (that have intermediate kernels) don’t erase the intermediates automatically after the update process, polluting the EFI partition further
  5. A couple new changes caused the copying of stuff into the efi partition including a "freestanding-i915-firmware.cpi and a “freestanding-00-early-ucode.cpio” file.

This totally exhausts the space.

Finally:
6. Clear linux does not check the status of these operations and reports success even though the update was a terrible failure and left the system unbootable.

$ sudo clr-boot-manager update
[FATAL] cbm (../src/bootman/bootman.c:L969): Failed to install initrd ///usr/lib/initrd.d/i915-firmware.cpio -> /boot/EFI/org.clearlinux/freestanding-i915-firmware.cpio: No space left on device
[ERROR] cbm (../src/bootman/update.c:L210): Failed to copying freestanding initrd

$ sudo umount /boot
$ sudo mount /dev/nvme0n1p1 /boot

$ df -h | grep boot
/dev/nvme0n1p1  147M  143M  4.6M  97% /boot

$ ls /boot
EFI   loader   RECOVERY.CAP  'System Volume Information'

$ sudo du -sh /boot/EFI/*
127K    /boot/EFI/BOOT
512     /boot/EFI/Linux
28M     /boot/EFI/Microsoft
83M     /boot/EFI/org.clearlinux
127K    /boot/EFI/systemd

$ sudo clr-boot-manager list-kernels
  org.clearlinux.native.6.9.5-1441
  org.clearlinux.native.6.8.8-1430
* org.clearlinux.native.6.8.4-1422
  org.clearlinux.native.6.7.9-1414

$ uname -a
Linux Hostname 6.7.9-1414.native #1 SMP Wed Mar  6 07:24:36 PST 2024 x86_64 GNU/Linux

$ sudo clr-boot-manager remove-kernel org.clearlinux.native.6.8.4-1422
$ sudo clr-boot-manager remove-kernel org.clearlinux.native.6.8.8-1430

$ sudo clr-boot-manager update
[FATAL] cbm (../src/bootman/bootman.c:L969): Failed to install initrd ///usr/lib/initrd.d/i915-firmware.cpio -> /boot/EFI/org.clearlinux/freestanding-i915-firmware.cpio: No space left on device
[ERROR] cbm (../src/bootman/update.c:L210): Failed to copying freestanding initrd

$ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p1  147M  127M   20M  87% /boot

$ sudo du -sh /boot/EFI/*
127K    /boot/EFI/BOOT
512     /boot/EFI/Linux
28M     /boot/EFI/Microsoft
68M     /boot/EFI/org.clearlinux
127K    /boot/EFI/systemd

$ ls /boot/EFI/org.clearlinux
bootloaderx64.efi                 freestanding-i915-firmware.cpio             kernel-org.clearlinux.native.6.7.9-1414
freestanding-00-early-ucode.cpio  kernel-org.clearlinux.current.6.0.0.rc7-52  loaderx64.efi

$ ls -lhSr /boot/EFI/org.clearlinux
total 68M
-rwxr-xr-x 1 root root 127K Jun 20 19:10 loaderx64.efi
-rwxr-xr-x 1 root root 915K Jun 20 19:10 bootloaderx64.efi
-rwxr-xr-x 1 root root  13M Jun 20 19:36 freestanding-00-early-ucode.cpio
-rwxr-xr-x 1 root root  14M Sep 27  2022 kernel-org.clearlinux.current.6.0.0.rc7-52
-rwxr-xr-x 1 root root  16M Mar 16 14:31 kernel-org.clearlinux.native.6.7.9-1414
-rwxr-xr-x 1 root root  26M Jun 20 18:33 freestanding-i915-firmware.cpio

$ sudo rm /boot/EFI/org.clearlinux/kernel-org.clearlinux.current.6.0.0.rc7-52

$ sudo clr-boot-manager update

$ df -h /boot
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p1  147M  130M   17M  89% /boot

$ sudo du -sh /boot/EFI/*
127K    /boot/EFI/BOOT
512     /boot/EFI/Linux
28M     /boot/EFI/Microsoft
71M     /boot/EFI/org.clearlinux
127K    /boot/EFI/systemd

$ sudo clr-boot-manager list-kernels
* org.clearlinux.native.6.9.5-1441
  org.clearlinux.native.6.7.9-1414

$ sudo swupd update
Update started
Version on server (41900) is not newer than system version (41900)
Update complete - System already up-to-date at version 41900

$ sudo clr-boot-manager update

$ ls -lh /boot/EFI/org.clearlinux
total 71M
-rwxr-xr-x 1 root root 915K Jun 20 19:10 bootloaderx64.efi
-rwxr-xr-x 1 root root  13M Jun 20 19:36 freestanding-00-early-ucode.cpio
-rwxr-xr-x 1 root root  26M Jun 20 19:39 freestanding-i915-firmware.cpio
-rwxr-xr-x 1 root root  16M Mar 16 14:31 kernel-org.clearlinux.native.6.7.9-1414
-rwxr-xr-x 1 root root  17M Jun 20 19:39 kernel-org.clearlinux.native.6.9.5-1441
-rwxr-xr-x 1 root root 127K Jun 20 19:10 loaderx64.efi

Still happening.

When multiple updates happen in a row you need better handling to not fill up the /boot device with temp files you don’t remove.

Also a critical failure != “Update successful”

This whole “sideload things into /boot” really needs serious work.

Please file a github issue - New Issue · clearlinux/distribution (github.com)

Thanks

Thanks! xref: Security/Critical bug: “Error on update: Failed to install initrd ///usr/lib/initrd.d/00-early-ucode.cpio” · Issue #3192 · clearlinux/distribution (github.com)