#1135141 please be more careful with available disk space on /boot

#1135141#5
Date:
2026-04-28 07:54:56 UTC
From:
To:
Using update-initramfs -k all -c:

AFAICT the new initrd.img is constructed on /boot, while
the previous initrd is still in place. There is a high
risk of filling up all disk space, esp since zstd creates
a 3rd image at run time. If you are not careful, you
might end up with an error message at boot time, saying

initramfs unpacking failed: ZSTD-compressed data is corrupt

I would suggest to create the new initrd either on a
dedicated tmpfs or in /tmp, to move it to /boot as a final
step. You could check in advance if there is enough disk
space to hold the new initrd, and you would avoid temporary
data on /boot, making better use of the available disk
space.


Just a suggestion, of course.

Regards
Harri

#1135141#10
Date:
2026-04-28 10:18:50 UTC
From:
To:
Control: tag -1 moreinfo

That is intentional and not a bug.

This is the real problem and is difficult to solve.  It can't be solved
in initramfs-tools alone.

The compressor runs as part of a pipeline.  No intermediate files are
created in /boot.

I would very much like to know how that happened.  update-initramfs
creates the new image under a temporary name and then renames it over
the old image (on success) or deletes it (on failure).  So it should not
be possible for the boot loader to pick up an incomplete image.

Do you have any log or other information about the sequence of events
leading to this?

What problem does that solve?  The copy can also be interrupted and
truncated.

As explained, there are no intermediate files on /boot.  There can be 1
incomplete new image, but that is necessary for atomically (so far as
possible) replacing images.

If there is not enough disk space to hold the new image, update-
initramfs must fail.  I don't see the value of trying to detect that
failure very slightly earlier.

Ben.

#1135141#17
Date:
2026-04-29 19:59:09 UTC
From:
To:
On Tue, 2026-04-28 at 12:18 +0200, Ben Hutchings wrote:
[...]
[...]

Also which filesystem is used for /boot?

Ben.

#1135141#22
Date:
2026-06-24 12:46:07 UTC
From:
To:
Forwarding Harri's reply to the BTS: