Installation without formatting fails to remove old kernels

Bug #690911 reported by Phillip Susi
This bug report is a duplicate of:  Bug #1586303: clear_partitions doesn't clear /boot. Edit Remove
60
This bug affects 13 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: ubiquity

When installing without formatting the target partition, the installer deletes various system files to avoid conflicts, including /lib, however it leaves existing kernels in /boot. These should also be removed since they become broken when their corresponding modules in /lib are deleted, and if they are newer than the ones being reinstalled ( likely ) they will become the default kernel leaving you with an unbootable system.

Revision history for this message
Peter Lemieux (seijisensei) wrote :

An ever bigger problem is that the installer leaves behind all the stale kernels in /boot. I can see keeping the most recent good kernel, and even perhaps the next-oldest version, but kernels older than that should be removed by ubiquity. If you allocate /boot to a separate partition, as I do, even a reasonably-sized boot partition (say 256 MB) can fill up if you're running a development release. I've been running Kubuntu 12.04b2 for a while now, and this morning had half-a-dozen kernel images in /boot. All the space was consumed, and the installer was unable to build a matching initrd image.

It would also result in a much cleaner set of options in the list at boot.

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
Peter Lemieux (seijisensei) wrote :
Revision history for this message
Otto Kekäläinen (otto) wrote :

I regularly install security updates. As I've now been running 12.04 for over a year, I have now 24 old kernel versions (in series 3.2.x) taking up to 1,7 gigabytes of disk space.

I did now run the spell
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

..but I hope Ubuntu would have some built-in mechanism to remove old kernels, since regular users are not likely to do this kind of maintenance manually.

Revision history for this message
pabouk (pabouk) wrote :

Please see a related bug:
Bug #1089195 linux-headers will eat your inodes on LTS.
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1089195

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.