package linux-image-5.11.0-38-generic 5.11.0-38.42~20.04.1 failed to install/upgrade: run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1

Bug #1947871 reported by Alistair
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

System error reported - while reading webpage. last login in last 10 minutes, so possibly an auto update.
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
uname -a
Linux alistair-HP-EliteBook-8470p 5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64 x86_64 x86_64

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: linux-image-5.11.0-38-generic 5.11.0-38.42~20.04.1
ProcVersionSignature: Ubuntu 5.11.0-37.41~20.04.2-generic 5.11.22
Uname: Linux 5.11.0-37-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27.20
Architecture: amd64
CasperMD5CheckResult: skip
Date: Wed Oct 20 13:55:09 2021
ErrorMessage: run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
InstallationDate: Installed on 2020-11-12 (342 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python3.8, Python 3.8.10, python-is-python3, 3.8.2-4
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.6
SourcePackage: initramfs-tools
Title: package linux-image-5.11.0-38-generic 5.11.0-38.42~20.04.1 failed to install/upgrade: run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Alistair (aa-sithlord) wrote :
Revision history for this message
Alistair (aa-sithlord) wrote :

Identified that the command :

update-initramfs: Generating /boot/initrd.img-5.11.0-38-generic

required approx 88M of disk space on /boot, but I only had 73M:
df -h /boot
bpool/BOOT/ubuntu_l3g9y7 286M 213M 73M 75% /boot

Problem resolved by manually running zsys garbage collection (laptop, so scheduled jobs are unable to run when the laptop is off/hybernating.

To demonstrate, use "zsysctl machine show to list the ZFS snapshots that are part of zsys. Use with wc to show the number of snapshots before garbage collection and after, hopefully with a reduction:

zsysctl machine show|wc
    127 468 7959
zsysctl service gc
zsysctl machine show|wc
    105 381 6350

Free space after this has run:
df -lh /boot
Filesystem Size Used Avail Use% Mounted on
bpool/BOOT/ubuntu_l3g9y7 375M 202M 174M 54% /boot

Monitoring the Avail space for boot while re-running apt upgrade :
 df -h /boot
Filesystem Size Used Avail Use% Mounted on
bpool/BOOT/ubuntu_l3g9y7 375M 289M 86M 78% /boot
before returning to 174M available.
zfs list -r bpool
NAME USED AVAIL REFER MOUNTPOINT
bpool 1.58G 174M 96K /boot
bpool/BOOT 1.58G 174M 96K none
bpool/BOOT/ubuntu_l3g9y7 1.58G 174M 201M /boot

The used space in this case is in zfs snapshots, hence zsys garbage collection resolved this.

Where zfs and zsys are installed, checking free space and "bloat" required space, with the option/suggestion to run "zsysctl service gc".

tags: removed: need-duplicate-check
Revision history for this message
Benjamin Drung (bdrung) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 798414, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.