clear_partitions doesn't clear /boot

Bug #1586303 reported by Jarno Suni
28
This bug affects 15 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Won't Fix
Low
Unassigned

Bug Description

Steps to reproduce: use an installation media to upgrade from 15.10 to 16.04.

Expected result: no kernels of older release remain in /boot

Actual results:

Illustrated in shell:

$ ls -l /boot/vmlinuz-*
-rw------- 1 root root 6808720 helmi 26 05:17 /boot/vmlinuz-4.2.0-30-generic
-rw------- 1 root root 6808528 maali 11 02:11 /boot/vmlinuz-4.2.0-34-generic
-rw------- 1 root root 6829104 maali 16 02:45 /boot/vmlinuz-4.2.0-35-generic
-rw-r--r-- 1 root root 7013984 huhti 28 16:03 /boot/vmlinuz-4.4.0-21-generic
-rw------- 1 root root 7015440 touko 13 02:55 /boot/vmlinuz-4.4.0-22-generic
$ linux-version list
4.2.0-30-generic
4.2.0-34-generic
4.2.0-35-generic
4.4.0-21-generic
4.4.0-22-generic
$ dpkg -l linux-image-4'*' |grep .
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-============================-============-============-======================================================
ii linux-image-4.4.0-21-generic 4.4.0-21.37 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-22-generic 4.4.0-22.40 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP

Workaround; How to remove the kernels: http://askubuntu.com/q/779031/21005
linux-purge from https://launchpad.net/linux-purge with --clear-boot option should work, too.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: dpkg 1.18.4ubuntu1.1
ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: XFCE
Date: Fri May 27 11:31:51 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2016-04-28 (28 days ago)
InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: dpkg
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jarno Suni (jarnos) wrote :
Revision history for this message
Jarno Suni (jarnos) wrote :
Revision history for this message
Jarno Suni (jarnos) wrote :

Due to this bug, purge-old-kernels script in byobu and (for older releases) in bikeshed fails to remove the kernels of the older release.

Revision history for this message
Brian Murray (brian-murray) wrote :

How did you go about upgrading to Xenial? This indicates that it was a fresh installation.

InstallationDate: Installed on 2016-04-28 (28 days ago)
InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)

Changed in dpkg (Ubuntu):
status: New → Incomplete
Revision history for this message
Jarno Suni (jarnos) wrote :

Then why there are old kernels in /boot, if it is fresh install? I used Installation media that was in an USB key drive to save me from downloading the release each time for various computers I want to install/upgrade 16.04 to. There was 15.10 installed in the hard disk, and my intent was to upgrade to 16.04 so that packages that I had installed manually would remain (but get updated) and my other customizations would be there.

Revision history for this message
Brian Murray (brian-murray) wrote :

So it sounds like you choose the upgrade option in ubiquity (the Live CD installer) is that correct?

Revision history for this message
Jarno Suni (jarnos) wrote :

Yes, IIRC.

Jarno Suni (jarnos)
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

Could you add the file /var/log/installer/syslog to this bug report?

Revision history for this message
Jarno Suni (jarnos) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

In the attached ubiquity upgrade log file we can see the following:

Apr 28 12:59:19 xubuntu kernel: [ 821.820380] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
Apr 28 12:59:19 xubuntu clear_partitions: Removing bin from / (/dev/sda2).
Apr 28 12:59:19 xubuntu clear_partitions: Removing dev from / (/dev/sda2).
Apr 28 12:59:20 xubuntu clear_partitions: Removing etc from / (/dev/sda2).
Apr 28 12:59:21 xubuntu clear_partitions: Removing lib from / (/dev/sda2).
Apr 28 12:59:21 xubuntu clear_partitions: Removing lib64 from / (/dev/sda2).
Apr 28 12:59:21 xubuntu clear_partitions: Removing proc from / (/dev/sda2).
Apr 28 12:59:21 xubuntu clear_partitions: Removing sbin from / (/dev/sda2).
Apr 28 12:59:21 xubuntu clear_partitions: Removing sys from / (/dev/sda2).
Apr 28 12:59:21 xubuntu clear_partitions: Removing usr/bin from / (/dev/sda2).
Apr 28 12:59:21 xubuntu clear_partitions: Removing usr/games from / (/dev/sda2).
Apr 28 12:59:21 xubuntu clear_partitions: Removing usr/include from / (/dev/sda2).
Apr 28 12:59:23 xubuntu clear_partitions: Removing usr/lib from / (/dev/sda2).
Apr 28 12:59:23 xubuntu clear_partitions: Removing usr/sbin from / (/dev/sda2).
Apr 28 12:59:26 xubuntu ubiquity: WARNING: Unknown X keysym "permille"

summary: - After upgrade from Xubuntu 15.10 to 16.04, old kenrels are on /boot but
- not shown by `dpkg -l`
+ clear_partitions doesn't clear /boot
affects: dpkg (Ubuntu) → ubiquity (Ubuntu)
Changed in ubiquity (Ubuntu):
status: Incomplete → Confirmed
Changed in bikeshed (Ubuntu):
status: New → Invalid
Changed in byobu (Ubuntu):
status: New → Invalid
Changed in ubiquity (Ubuntu):
importance: Undecided → Medium
Jarno Suni (jarnos)
description: updated
Revision history for this message
Phillip Susi (psusi) wrote :

This was probably intentional since you wouldn't want to delete the kernels belonging to other installs in a multi boot system with a single common /boot.

Jarno Suni (jarnos)
description: updated
Revision history for this message
Jarno Suni (jarnos) wrote :

Phillip Susi, alternatively the kernels may be broken, see Bug #690911

Mathew Hodson (mhodson)
no longer affects: bikeshed (Ubuntu)
no longer affects: byobu (Ubuntu)
tags: added: full-boot rls-aa-incoming
Revision history for this message
Brian Murray (brian-murray) wrote :

While I admit that this is a problem, I don't believe many people use this feature of ubiquity but I'm happy to proved wrong. I have a local cache of all open ubiquity bug reports of which there are about 3000, of those 3000 only 180 include the string "clear_partitions: Removing" so I'm inclined to think not many people use ubiquity to upgrade.

Changed in ubiquity (Ubuntu):
importance: Medium → Low
Revision history for this message
Jarno Suni (jarnos) wrote :

It is handy, if you have many computers to upgrade, and slow or expensive internet use.

description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

The option to upgrade using ubiquity has been removed so this is no longer an issue.

ubiquity (18.04.6) bionic; urgency=medium

  [ Steve Langasek ]
  * If we are running ubiquity-dm on VT1, we must conflict with
    <email address hidden> and not rely on some other display manager to do
    this for us.

  [ Brian Murray ]
  * Drop the option to upgrade from an old release using ubiquity as it is
    crashing and leaves users in a broken state. (LP: #1756862)

Changed in ubiquity (Ubuntu):
status: Confirmed → Won't Fix
tags: removed: rls-aa-incoming
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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