I think check for enough space could be done in dpkg. It might be just hard to estimate what is enough space, since the required space for initrd.img files depends on whether linux-image-extra packages are used, whether dkms is used and whether backup initrd.img files are generated. Maybe some environment variable could be used for the limit.
** Also affects: dpkg (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to initramfs-tools in Ubuntu. https://bugs.launchpad.net/bugs/798414 Title: update-initramfs should produce a more helpful error when there isn't enough free space Status in initramfs-tools: Confirmed Status in dpkg package in Ubuntu: New Status in initramfs-tools package in Ubuntu: In Progress Bug description: Binary package hint: initramfs-tools When generating a new initramfs there is no check for available free space, subsequently its possible for update-initramfs to fail due to a lack of free space. This is resulting in package installation failures for initramfs-tools. For example: Setting up initramfs-tools (0.98.8ubuntu3) ... update-initramfs: deferring update (trigger activated) Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-2.6.38-8-generic gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-2.6.38-8-generic dpkg: error processing initramfs-tools (--configure): subprocess installed post-installation script returned error exit status 1 WORKAROUND: Remove unused kernels using computer janitor (not in repositories for 14.04 or later) or manually free space on your partition containing the /boot file system. See instructions here https://help.ubuntu.com/community/RemoveOldKernels To manage notifications about this bug go to: https://bugs.launchpad.net/initramfs-tools/+bug/798414/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp