[Bug 1678187] Re: Removing a linux-image-extra package fails, if /boot is about full
Jarno Suni
1678187 at bugs.launchpad.net
Sat Sep 4 07:23:52 UTC 2021
Please check out
https://help.ubuntu.com/community/ReportingBugs#Filing_a_general_bug_against_no_particular_package
(and the document in general). Please tell me the URL of the report
thereafter.
You told in #23 that you "Just ran in to this on Ubuntu 20.04", but to
be precise it is not even possible, as Ubuntu 20.04 does not have linux-
image-extra packages. Do linux-modules packages have some similar
effect? Did you even try to remove a kernel by dpkg without running
"update-initramfs -d"? Or did you even try removing a kernel by apt
before that? It would be helpful if you provided the output of such
commands that fail. You also told "The /boot partition is 732Mb, but is
filled with initrd.img* files." Still there were no more of those than
e.g. vmlinuz-* files in the listings you gave.
I have contributed to
https://help.ubuntu.com/community/RemoveOldKernels, authored the linux-
purge tool, made this bug report and provided the patch. Please follow
some accuracy and relevancy in comments.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1678187
Title:
Removing a linux-image-extra package fails, if /boot is about full
Status in initramfs-tools package in Ubuntu:
Confirmed
Bug description:
System calls /etc/kernel/postinst.d/initramfs-tools when
purging/removing a linux-image-extra package. That calls "update-
initramfs -c" which needs significant amount of additional disk space
in /boot temporarily. But there is no space left, if /boot is full.
Likewise /etc/kernel/postinst.d/dkms may call "update-initramfs -u".
The fix could be to create the new initrg.img file in different partition before replacing the old one by it in update-initramfs. So the update-initramfs script should be fixed. But there may not be such a partition..
Anyway the likely case when space runs out is when there is a separate /boot partition.
Alternatively the init scripts should remove the respective /boot/initrd.img-<version> file when removing/installing the linux-image-extra package. That could also be done by
update-initramfs -d -k <version>
That may be worse way, as then initrd.img file is missing for longer period of time and system integrity may suffer in case of e.g. power cut.
Related question: http://askubuntu.com/q/898499/21005
The output of 'dpkg --purge' presented there shows that corresponding linux-image package may get successfully removed while the linux-image-extra is left broken. If the linux-image-extra package will be removed later, the post-installation script will create an initrd.img file for a non-installed kernel! Same would happen, if removing would be done by apt-get purge.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: initramfs-tools 0.103ubuntu4.7
ProcVersionSignature: Ubuntu 4.4.0-71.92~14.04.1-generic 4.4.49
Uname: Linux 4.4.0-71-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.23
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri Mar 31 17:42:35 2017
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-09-21 (922 days ago)
InstallationMedia: Ubuntu-Studio 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.1)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1678187/+subscriptions
More information about the foundations-bugs
mailing list