1039
votes
|
|
1177
0
138
|
|
|
|
|
Attachments
Duplicates
Comments

cheesehead
(Brainstorm admin)
wrote on the 1 Mar 08 at 17:34
|
|
|
Remove them by hand after yo know you won't need them any more.
Better yet, write a script to do it for you - then submit it.
|
|
dino99
wrote on the 1 Mar 08 at 17:44
|
|
|
in menu.lst you have the choice of choosing the number you want: default is set to "all", so you can put it on 1 or 2 or what you want !!!
Every body have to look at documentation instead of asking about basic tweaks: search on forums and google !!!
|
|
|
|
startupmanager is also capable of this
|
|
probono
wrote on the 1 Mar 08 at 17:49
|
|
|
|
While "search on forums and google" will certainly work, is not what Ubuntu is all about: It should behave sensibly out of the box.
|
|
blablum
wrote on the 1 Mar 08 at 18:39
|
|
|
|
Sometimes a kernel update messes up your system, it's good that you can still easily boot into the older one. Besides, as already pointed, you can choose how many different kernels are show on grub. I vote -.
|
|
probono
wrote on the 1 Mar 08 at 18:44
|
|
|
|
blablum, I guess that GRUB option only _hides_ the other kernels. This means that a lot of disk space is still wasted, and an installed Ubuntu system mysteriously grows in disk space over time without the (casual) user knowing why.
|
|
|
|
I agree. A couple weeks ago, I went through Synaptic and deleted all the old kernels, which was sorta scary in case I accidentally removed the wrong kernel.
|
|
deadowl
wrote on the 1 Mar 08 at 18:55
|
|
|
|
I'd say this could be most effectively addressed by providing a GUI frontend for editing grub.
|
|
probono
wrote on the 1 Mar 08 at 18:58
|
|
|
|
deadbowl, that would only hide things and obscure the fact even more that the list of installed kernels keeps growing and growing over time.
|
|
Ansible
wrote on the 1 Mar 08 at 19:14
|
|
|
Maybe what is needed is not preventing the list from growing, but providing an easy and obvious way to remove the old stuff.
The grub menu is manually configged item; perhaps a GUI grub menu editor would provide the option to remove the old kernels along with their grub entries.
|
|
probono
wrote on the 1 Mar 08 at 19:25
|
|
|
Ansible, that would still mean the user has to do something actively. Which is bad. If I _automatically_ get new kernels, i don't want to have to remove old ones _manually_. It should not be a "one way street". (By keeping recent-1 as well, that would take care of any potential issues.)
Of course you should be able to change this standard behavior if you like. But normal users shouldn't have to worry about this at all.
|
|
bgfeldm
wrote on the 1 Mar 08 at 19:37
|
|
|
|
Every time MS Windows has a kernel fix, Windows replace the kernel. On Linux the kernel stays encase something breaks, or some users like having a second kernel encase one becomes corrupt. Another difference to note from windows kernel and the linux kernel is that the linux kernel contains most of the software drivers, windows kernel does not. There could be a user configurable setting to keep no more then two kernel instances.
|
|
vron
wrote on the 1 Mar 08 at 19:44
|
|
|
I would agree and I will vote for that but:
- the default setting should be: "keep (at least) one older kernel,
- you should be able to set the number of preserved kernels manually,
- you should be able to set a rule for given kernel not to be deleted under no circumstances - on my second machine I have actually older kernel which works perfectly and newer which fails when it comes to mounting USB drives. Guess which I'd like to keep when I decide to update the system?
- it could be put under consideration to bound the number of kernels listed in grub AND number of kernels kept in the system,
I'd say that the first three options are "must have".
regards,
vron
|
|
probono
wrote on the 1 Mar 08 at 20:19
|
|
|
Vron, I agree. Also, Ubuntu should ONLY upgrade the kernel IF it can assure that ALL kernel extensions can be upgraded/still work after the upgrade.
E.g., IF Ubuntu cannot ensure that after the upgrade, my 3rd-party installed VMware still works, then it should NOT automatically attempt to update my kernel.
(But this is really a separate issue...)
|
|
|
Regarding space issues....
If I remember correctly, a Linux kernel is what... A 40 MB archive. I don't guess freeing this much space would help when the older kernel might save you from incompatibilities and all...
|
|
probono
wrote on the 2 Mar 08 at 12:11
|
|
|
|
That adds up quickly... after only 10 kernel updates, 400 MB wasted... which is a lot if you have only a 3 GB system partition
|
|
|
hmm, interesting brainstorming
a tool for removing old kernel versions in Ubuntu unstable would be very nice but in stable Ubuntu I do not see any need as there are no kernel updates every day.
|
|
|
@mysticmatrix: my /boot partitions are usually less than 100MB (they used to be 25-40MB, but after repeatedly getting burnt by Ubuntu they have now been resized to at least 60MB).
So yes, keeping useless kernels around is an issue. I cannot keep more than 3 kernels around, and I shouldn't have to. I usually keep the latest (distro-1) kernel, and I remove the (latest-1) kernel after a few boots. If I forget to do that twice, the next kernel update will cause dpkg to fail with "No space left on device".
At the very least, I'd like apt-get autoremove to warn about stale (superseded) kernel images still on the system.
|
|
buggin
wrote on the 4 Mar 08 at 14:10
|
|
|
I think there should be a program that can detect a new kernel installation, then monitor the system to check for stability, and after a certain number of reboots and successful logins (or days) it could offer to remove old kernels. I first discussed this idea in this post http://ubuntuforums.org/showthread.php?t=554849 on the Ubuntu Forums and more detailed information can be found there.
The idea is to clean up the GRUB menu list to make it less confusing on users (mainly switching from Windows... generally dual-boot systems). There are a lot of posts referring to the long list of kernels and in almost every one of them someone asks "What is a kernel?"
Please see the post on the forum for more information.
|
|
|
My problem was that I suddenly could not update the system.
Without the help of an Ubuntu expert, I would be in the blind. Trying to "empty the trash" and running "sudo apt-get clean" as Update Manager kept telling me.
This is a bug, since many of us has really small /boot drives. And it gives non geeks problems, that they can not themselves fix. Keep the system clean!
|
|
|
I was going to post this in ideastorm, but ironically, the kernel upgrades came up on the repos this morning, and I got a failed upgrade, due to lack of space.
So I vote +, but keep the latest old module in case of a problem.
|
|
pHr34kY
wrote on the 11 Jun 08 at 11:32
|
|
|
I'm thinking this can be done through apt. By memory, packages can be marked as 'conflicting' with other packages. You could have a dummy package called 'linux-image-latest' (or something similar), which basically automatically installs the latest kernel, and is marked as incompatible with all previous versions. For example, the package will depend on linux-image 2.2.24-18, but conflict with linux-image-2.6.24-17.
I have no idea if apt will remove the old kernel automatically or simply break and throw errors, but it's an idea - even if I haven't really explored it.
This will also allow the user to turn the functionality off my installing/removing the package.
|
|
florus
wrote on the 22 Jun 08 at 16:37
|
|
|
|
I think most users want a minimum of 2 kernels, and a maximum of 3. Synaptic is fine, but there are a lot of entries for some kernels.
|
|
pyrates
wrote on the 26 Jun 08 at 02:14
|
|
|
I want one kernel and that's it. The end user does not care nor even know what a kernel is. Anyone that does is obviously a linux enthusiast or a programmer. There's no real good reason to keep an older kernel version around and if you have a good reason because the newer version is buggy, submit the bugs so they can be fixed.
Windows replaces the kernel but does keep a last known good option for the previous kernel that booted well just in case, but it's not out in front of the user. Only when the user specifically asks to boot from it by pressing f8 does it do that.
Mac OS X does support booting from multiple kernels, but only when you specify it, the default way though they have it setup is that the previous versions are removed.
So as you all see, only linux and other open source operating systems are doing this. If we want the end user to use linux, we have to hide the options that only developers and enthusiasts will use. Normally options like those are shown during the development stage and hidden when the version to end users is released. Does that mean Ubuntu is always in a development stage? Of course not. But keeping these kinds of options always on and never hidden shows that. And I don't like it as an end user.
|
|
kraemer
wrote on the 13 Aug 08 at 22:41
|
|
|
As Ubuntu slowly inches its' way into the mainstream, many won't know or understand the reasons behind their being 5 different kernel listings, let alone what a kernel is.
The average user will also not feel comfortable removing these entries.
Great idea.
|
|
|
Similar experience to others here. I upgraded the wife's computer to 8.04 last night then filtered through Synaptic and removed 750+MB of old kernels making triple-sure I didn't remove anything associated with the currently used kernel. Tedious.
I don't see where the arguements for keeping many kernels, manually setting parameters and manually removing them yourself fits with the intent of Ubuntu. Ubuntu is supposed to be an easy leap for Windows users. A sleek and functional alternative to Windows. Something that just works and allows the user to just work. No endless hours spent tweaking, configuring and massaging; if a user wants that, then maybe Fedora is a better choice. So to me, an automatic removal of outdated kernels upon upgrade fits the intent of this distro.
|
|
dburanen
wrote on the 19 Oct 08 at 03:18
|
|
|
Done.
system-cleaner and system-cleaner-gtk are now part of ubuntu-desktop as of today 10/18/2008
Can we mark this as done?
|
|
|
I think this idea should not be closed, since it does not seem to be implemented properly: I have computer-janitor on my system (fresh install of Karmic, no distrib upgrade). Computer-janitor seems to be the replacement to system-cleaner:
sape@SAPENB:~$ uname -a
Linux SAPENB 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 02:39:34 UTC 2010 x86_64 GNU/Linux
sape@SAPENB:~$ cat /etc/issue
Ubuntu 9.10 \n \l
sape@SAPENB:~$ sudo apt-get install system-cleaner
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package system-cleaner is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
computer-janitor
E: Package system-cleaner has no installation candidate
Computer-janitor does not find any kernel image to remove:
sape@SAPENB:~$ sudo computer-janitor --all find
ignored deb:handbrake-cli
ignored deb:handbrake-gtk
sape@SAPENB:~$
Still my /boot is already getting fat on this freshly installed system:
sape@SAPENB:~$ du -sh /boot
61M /boot
sape@SAPENB:~$ dpkg --get-selections|grep "linux-[ih]"
linux-headers-2.6.31-14 install
linux-headers-2.6.31-14-generic install
linux-headers-2.6.31-16 install
linux-headers-2.6.31-16-generic install
linux-headers-2.6.31-17 install
linux-headers-2.6.31-17-generic install
linux-headers-2.6.31-19 install
linux-headers-2.6.31-19-generic install
linux-headers-generic install
linux-image-2.6.31-14-generic install
linux-image-2.6.31-16-generic install
linux-image-2.6.31-17-generic install
linux-image-2.6.31-19-generic install
linux-image-generic install
Any suggestions? I would prefer to automatically keep only the latest and the one before only.
|
|
chmac
wrote on the 24 Jul 10 at 16:45
|
|
|
I don't think this idea is implemented. On 10.04 my kernel list grew to the point where my 100Mb /boot partition was full. I wanted to vote for this idea but that option seems to be disabled now that the idea is marked as implemented. Can we somehow unmark it as implemented?
Is there a way to remove older kernels through the package manager? Could the latest kernel recommend the removal of the second to oldest kernel? Thus keeping current+1 by default, but allowing power users to easily keep any specific kernel through the package manager.
|
Post your comment
|