Purging the custom kernel does not remove initramfs

Bug #1793290 reported by Robert C Jennings
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-aws (Ubuntu)
Expired
Undecided
Unassigned
linux-kvm (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Purge the kernel and you will be left with the initramfs in /boot and /var/lib/initramfs-tools. This is handled correctly for linux-generic/linux-virtual.

* Launch a bionic/cosmic AWS image
* Purge the kernel
$ sudo apt-get purge --assume-yes '^linux-.*' 'linux-base+' initramfs*

$ ls /boot/
grub initrd.img-4.15.0-1021-aws

$ ls /var/lib/initramfs-tools/
4.15.0-1021-aws

This was seen with Bionic and Cosmic with linux-aws and linux-kvm

Impact: during cloud image builds we remove one kernel and install the optimized kernel like linux-aws. The missing cleanup consumes disk space for images that are meant to be small; it also surfaces a latent bug in initramfs-tools where mkinitramfs will attempt to run to update every initramfs in /var/lib/initramfs-tools/ when it is only half-configured and it falls over. We'll work around this but the kernels should clean up when purged.

Robert C Jennings (rcj)
summary: - Purging the kernel does not remove initramfs
+ Purging the custom kernel does not remove initramfs
Revision history for this message
Tiago Stürmer Daitx (tdaitx) wrote :

A few questions:
- Could you please provide the output of the apt-get purge call?
- If update-initramfs is called in it, could you please manually call it with the verbose flag (-v) and attach the output?
- Does this only happen on the half-configured scenario?

I'm moving the status to Incomplete. Please feel free to move it back to New as soon as new information is available.

Changed in linux-aws (Ubuntu):
status: New → Incomplete
Changed in linux-kvm (Ubuntu):
status: New → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1793290] Re: Purging the custom kernel does not remove initramfs

On Wed, Sep 19, 2018 at 02:02:36PM -0000, Tiago Stürmer Daitx wrote:
> A few questions:
> - Could you please provide the output of the apt-get purge call?
> - If update-initramfs is called in it, could you please manually call it with the verbose flag (-v) and attach the output?
> - Does this only happen on the half-configured scenario?

I have hypothesized that this is because these custom kernels only recommend
initramfs-tools rather than depending on it, which allows the
initramfs-tools package to be removed before the kernel image package is
removed, and initramfs-tools does not consider itself responsible for
removing the initramfs from disk on package purge.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux-aws (Ubuntu) because there has been no activity for 60 days.]

Changed in linux-aws (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux-kvm (Ubuntu) because there has been no activity for 60 days.]

Changed in linux-kvm (Ubuntu):
status: Incomplete → Expired
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.