Removing Old Kernels
Bret Busby
bret at busby.net
Sun Dec 13 05:32:10 UTC 2009
On Sat, 12 Dec 2009, Leonard Chatagnier wrote:
> Date: Sat, 12 Dec 2009 00:49:48 -0600
> From: Leonard Chatagnier <lenc5570 at sbcglobal.net>
> Reply-To: "Ubuntu user technical support, not for general discussions"
> <ubuntu-users at lists.ubuntu.com>
> To: "Ubuntu user technical support, not for general discussions"
> <ubuntu-users at lists.ubuntu.com>
> Subject: Re: Removing Old Kernels
>
> Bret Busby wrote:
>> On Fri, 11 Dec 2009, Tom H wrote:
>>
>>
>>> Date: Fri, 11 Dec 2009 15:09:14 +0100
>>> From: Tom H<tomh0665 at gmail.com>
>>> Reply-To: "Ubuntu user technical support, not for general discussions"
>>> <ubuntu-users at lists.ubuntu.com>
>>> To: ubuntu-users at lists.ubuntu.com
>>> Subject: Re: Removing Old Kernels
>>>
>>>
>>>> There was a feature in ubuntu some time in the earlier releases where in
>>>> there used to be only a specific copies of kernels maintained. The older
>>>> one's would get deleted once the updates were applied. Not sure if its
>>>> there in the current versions of ubuntu 9.10
>>>>
>>> You can add a "howmany=X" line to menu.lst to limit the number of
>>> kernels that grub1's update-grub adds to menu.lst.
>>>
>>> Based on
>>> http://www.mail-archive.com/grub-devel@gnu.org/msg13049.html
>>> it is unlikely to be added by the grub developers. It seems to have
>>> been a Debian/Ubuntu customization. I do not have a grub1 install to
>>> look at its update-grub script but I remember it to consist of more
>>> than the grub2 update-grub script, which is a one-line grub-mkconfig
>>> invocation.
>>>
>>>
>>>
>> Please advse of the path for menu.lst .
>>
>> Thank you in anticipation.
>>
> Unless I misunderstand you request, menu.lst is in folder /boot/grub when using
>
> grub1. For grub2, menu.lst is replaced by grub.cfg in the same folder.
>
>
Editing menu.lst did not work.
I tried setting howmany=3, and rebooting.
I have both Debian 5 and Ubuntu 8.04 as boot options on this computer,
and Win XP, and I was not sure which grub (Debian or Ubuntu) was being
used, so I changed the menu.lst file in both distributions and rebooted.
I still got multiple kernels displayed for Ubuntu (only one was ever
displayed for Debian).
The solution was using
ls /boot/*2.6*
to find all the kernel versions present, then
ls /boot/*2.6.x*
then
rm /boot/*2.6.x*
for each x< (current kernel version number - 3)
of the earlier kenerl versions found
then
update-grub
in both Ubuntu and Debian, and that worked.
--
Bret Busby
Armadale
West Australia
..............
"So once you do know what the question actually is,
you'll know what the answer means."
- Deep Thought,
Chapter 28 of Book 1 of
"The Hitchhiker's Guide to the Galaxy:
A Trilogy In Four Parts",
written by Douglas Adams,
published by Pan Books, 1992
....................................................
More information about the ubuntu-users
mailing list