system-cleaner - should not offer or warn when removing one of the last two installed kernel versions

Bug #285657 reported by Savvas Radevic
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
system-cleaner (Ubuntu)
Fix Released
High
Unassigned
Intrepid
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: system-cleaner

Ubuntu Intrepid Ibex 8.10

$ apt-cache policy system-cleaner-gtk
system-cleaner-gtk:
  Installed: 1.10.3-0ubuntu1
  Candidate: 1.10.3-0ubuntu1
  Version table:
 *** 1.10.3-0ubuntu1 0
        500 http://archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

People when uninstalling stuff, should not be offered or at least *warned* when removing one of the last two installed kernel versions. It's really critical they know that when removing such packages, means that they won't be able to boot to an older kernel if anything goes bad (and sometimes it does go bad!).
The last two kernels may be or may not be in the ubuntu repositories, so the only way I can think of solving this is comparing linux-image-*-generic with the installed kernels in /boot/grub/menu.lst
As you say in your wiki homepage: "This affects especially people participating in the development of Ubuntu." - what I'm explaining stands for development release testers.

SUMMARY FOR SRU: system-cleaner may remove the running kernel. This has been fixed by explicitly checking for the running kernel. update-manager uses a similar check.

PATCH: http://bazaar.launchpad.net/~systemcleaner-hackers/systemcleaner/intrepid-sru-1-proposal/changes (revision 110).

TEST CASE: Install system without networking. Install system-cleaner. Verify that "sudo system-cleaner find" shows the currently running kernel. Upgrade to fixed system-cleaner. Verify that "sudo system-cleaner find" no longer shows the currently running kernel.

description: updated
to be removed (liw)
Changed in system-cleaner:
status: New → In Progress
Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

in my case it tried to remove kernel 2.6.25. I dont use it much, but its the only one I cna use with my webcam.

to be removed (liw)
Changed in system-cleaner:
assignee: nobody → liw
status: In Progress → Confirmed
Revision history for this message
Henrik Nilsen Omma (henrik) wrote :

This should probably be implemented along with heuristics that perform extra checks relating to key packages, including the kernel.

Changed in system-cleaner:
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
Savvas Radevic (medigeek) wrote : Re: [Bug 285657] Re: system-cleaner - should not offer or warn when removing one of the last two installed kernel versions

I wouldn't mind if this isn't fixed, but it should be until jaunty
jackalope alphas.
I have a bash script I'll upload later, maybe a developer can get
something out of it!

Revision history for this message
Savvas Radevic (medigeek) wrote :

As promised, I hope it is helpful :)
The part about the kernel check should be something I use at part: if [ "$i" = "50" ]
Note that part 50 doesn't actually remove the kernel images, but it uses aptitude -s (just simulation)

Revision history for this message
Dimitrios Symeonidis (azimout) wrote :

a clarification: doesn't the "last good boot" solve your problem?

Revision history for this message
Savvas Radevic (medigeek) wrote :

> a clarification: doesn't the "last good boot" solve your problem?

Probably, never had to try it, we'll see in alpha testing :)

Revision history for this message
Fernando Miguel (fernandomiguel) wrote :

Olá Dimitrios e a todos.

On Saturday 01 November 2008 12:32:50 Dimitrios Symeonidis wrote:
> a clarification: doesn't the "last good boot" solve your problem?

didnt "last good boot" disappear?
Mine did between beta and RC...

--
BUGabundo :o)
(``-_-´´) http://LinuxNoDEI.BUGabundo.net
Linux user #443786 GPG key 1024D/A1784EBB
My new micro-blog @ http://BUGabundo.net

Revision history for this message
Dimitrios Symeonidis (azimout) wrote :

bugabundo: in fact, you're right, i hadn't noticed...
see bug #284210
https://bugs.launchpad.net/ubuntu/+source/grub/+bug/284210

Revision history for this message
to be removed (liw) wrote :

I've made new packages available at

http://code.liw.fi/ubuntu/pool/main/s/system-cleaner/

These should never remove the running kernel. I did not make it preserve the two newest kernels, as requested by the bug reporter, since update-manager doesn't do that either, and two might still not be the right number for some people, whereas one is probably the right number for most people.

I would appreciate testing of these new packages. If you have feedback on whether more kernels should be saved, I would appreciate that, too.

Changed in system-cleaner:
status: Triaged → In Progress
Revision history for this message
Shirish Agarwal (shirishag75) wrote :

Lars,
 If its possible please make a PPA repository if you can make on
launchpad. It would make testing new packages easier for people who
are interested in the same. As it is everything is available and if
you need help there's always #launchpad there on IRC. It would just
make things easier for people (like me) who just like to edit and/or
use the software sources rather than remembering (what URL was from
which I downloaded this newest package? ) . Also possibility of a
wider testing group .
--
          Regards,
          Shirish Agarwal
  This email is licensed under http://creativecommons.org/licenses/by-nc/3.0/
http://flossexperiences.wordpress.com
065C 6D79 A68C E7EA 52B3 8D70 950D 53FB 729A 8B17

Revision history for this message
to be removed (liw) wrote :

Shirish,

I have a PPA; but I cannot upload version 1.10.4 to it, because the PPA thinks the .orig.tar.gz should be different from the one that actually exists. That is my fault, and the problem will go away with the next version. Sorry about the hassle.

to be removed (liw)
Changed in system-cleaner:
status: In Progress → Fix Committed
to be removed (liw)
description: updated
to be removed (liw)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in system-cleaner:
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-cleaner - 1.10.4-0ubuntu2

---------------
system-cleaner (1.10.4-0ubuntu2) intrepid-proposed; urgency=low

  * The "viime tingan pakettilisäykset ovat huono idea" release.
  * Added Polish translation from Piotr Makowski. (LP: #290196)
  * The apt Packages list is now checked for sanity. (LP: #290024)
  * Icon is now shown in menu, and by the window manager.
    (LP: #274714)
  * The current kernel will now never be considered cruft.
    (LP: #285657)
  * Now asks user to confirm that they want to remove packages or remove
    other cruft. (LP: #285888)
  * Package short description is now shown in the user interface.
    (LP: #286394)
  * The GTK UI now shows column headers, so that it is clear what the
    tick column means. (No bug reported about this explicitly, but it
    has come up repeatedly.)
  * Support for whitelists in /etc/cruft-remover.d/*.whitelist added.
    See the cruft-remover(8) manual page for details. This can later be
    seeded with the most common third-party packages, until dpkg+apt
    get sufficient meta data to deal with this in a better way.
    (Does not quite close LP: 285746.)

 -- Lars Wirzenius <email address hidden> Fri, 07 Nov 2008 15:58:25 +0200

Changed in system-cleaner:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Copied intrepid-proposed update to jaunty.

Changed in system-cleaner:
status: Fix Committed → Fix Released
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.