LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-30-2011, 12:02 PM   #1
xjx424
LQ Newbie
 
Registered: Apr 2011
Posts: 15

Rep: Reputation: 0
Removing old kernels


Hi,
I'm pretty sure I know what I need to do but want to double check first.
I am not able to upgrade because my boot disk is full. I need to remove the unused kernels.

Here is what is currently in there.

Code:
drwxr-xr-x  4 root root    3072 2011-12-30 11:36 .
drwxr-xr-x 26 root root    4096 2011-12-06 12:59 ..
-rw-r--r--  1 root root  420395 2010-09-30 17:10 abi-2.6.24-23-server
-rw-r--r--  1 root root  420589 2011-02-11 15:15 abi-2.6.24-28-server
-rw-r--r--  1 root root  420763 2011-10-11 14:19 abi-2.6.24-29-server
-rw-r--r--  1 root root  420763 2011-11-28 14:08 abi-2.6.24-30-server
-rw-r--r--  1 root root   74171 2010-09-30 17:10 config-2.6.24-23-server
-rw-r--r--  1 root root   74233 2011-02-11 15:15 config-2.6.24-28-server
-rw-r--r--  1 root root   74233 2011-10-11 14:19 config-2.6.24-29-server
-rw-r--r--  1 root root   74233 2011-11-28 14:08 config-2.6.24-30-server
drwxr-xr-x  2 root root    1024 2011-12-08 09:17 grub
-rw-r--r--  1 root root 7517119 2010-09-30 17:10 initrd.img-2.6.24-23-server
-rw-r--r--  1 root root 7236602 2010-09-30 17:10 initrd.img-2.6.24-23-server.bak
-rw-r--r--  1 root root 7777632 2011-03-01 14:01 initrd.img-2.6.24-28-server
-rw-r--r--  1 root root 7777058 2011-03-01 13:58 initrd.img-2.6.24-28-server.bak
-rw-r--r--  1 root root 7775708 2011-10-26 14:58 initrd.img-2.6.24-29-server
-rw-r--r--  1 root root 7776238 2011-10-20 09:01 initrd.img-2.6.24-29-server.bak
-rw-r--r--  1 root root 7776454 2011-12-06 12:59 initrd.img-2.6.24-30-server
-rw-r--r--  1 root root 7776448 2011-12-06 12:59 initrd.img-2.6.24-30-server.bak
drwx------  2 root root   12288 2010-09-30 17:08 lost+found
-rw-r--r--  1 root root  103204 2010-09-30 17:10 memtest86+.bin
-rw-r--r--  1 root root 1163432 2010-09-30 17:10 System.map-2.6.24-23-server
-rw-r--r--  1 root root 1165041 2011-02-11 15:15 System.map-2.6.24-28-server
-rw-r--r--  1 root root 1165699 2011-10-11 14:19 System.map-2.6.24-29-server
-rw-r--r--  1 root root 1165739 2011-11-28 14:08 System.map-2.6.24-30-server
-rw-r--r--  1 root root 1930136 2010-09-30 17:10 vmlinuz-2.6.24-23-server
-rw-r--r--  1 root root 1934360 2011-02-11 15:15 vmlinuz-2.6.24-28-server
-rw-r--r--  1 root root 1934392 2011-10-11 14:19 vmlinuz-2.6.24-29-server
-rw-r--r--  1 root root 1934424 2011-11-28 14:08 vmlinuz-2.6.24-30-server
I then ran uname -a and got this, which I am thinking is the kernel I should keep
Code:
Linux websvr 2.6.24-23-server #1 SMP Wed Apr 1 22:14:30 UTC 2009 x86_64 GNU/Linux
Is -23 the only kernel I am using?
Is it OK to delete anything not ending in -23? (aside from grub, lost+found, etc.)
Finally, does anyone know why this is happening?
Thanks
 
Old 12-30-2011, 01:01 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
In principle, yes, you can 'delete anything not ending in -23'. The uname command you ran shows which kernel is presently running, which is not the most recent of the installed kernels. You will probably need to update the bootloader config file to make the newly installed/upgraded kernel the default, otherwise your upgrade is a waste of time, as it appears earlier upgrades have been.

--- rod.
 
Old 12-30-2011, 01:03 PM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
I would suggest to use the package manager from your distribution.

Kind regards
 
Old 12-30-2011, 01:37 PM   #4
xjx424
LQ Newbie
 
Registered: Apr 2011
Posts: 15

Original Poster
Rep: Reputation: 0
On this version of Ubuntu 8.04.4 it still uses the config file menu.lst
In that file is this section
Code:
title Ubuntu (2.6.24-23-server)
	root (hd0,0)
	kernel /vmlinuz-2.6.24-23-server root=UUID=b92ad2dc-8713-4c49-a077-f2567e6ce8b0 ro quiet splash
	initrd /initrd.img-2.6.24-23-server
	quiet
Do I just need to update the version with the most recent and reboot?
 
Old 12-30-2011, 04:01 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
If that is the only entry, then that should do the trick. In distros I've used, the package manager usually adds a new entry, then updates the 'default' setting to point to the entry for the newly installed version. The default value of 'default' is zero, meaning the 'first' entry (confused yet?). I suggest you use that model, keeping the entry for the presently working version, and add a new entry for the new version, and leave the default as the current version. When you've convinced yourself that the new version works, make it the default.

--- rod.
 
Old 12-30-2011, 07:30 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Certainly do it from Synaptic - and use the "totally remove" (or whatever, I don't have Ubuntu handy) option to get rid of modules and ancillary bits and pieces.
However I suspect you are on a losing cause. Later Ubuntu will require quite a bit more space in /boot; and will fail even if you have plenty but not what the installer has been programmed to determine "enough". And no, I can't recall what that was. But I'd just resize that partition.
Coming from a gentoo background I tended to have a merely adequate sized /boot. Now I just go with the ludicrous requirements of the various distros - Fedora demand half a Gig for example.
 
Old 12-30-2011, 08:33 PM   #7
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,011

Rep: Reputation: 25
Install and use 'ubuntu-tweak' program from synaptic. Go to 'package cleaner' > 'clean kernels'. It should work.
 
Old 12-31-2011, 03:51 AM   #8
opensourcewj
LQ Newbie
 
Registered: Jan 2010
Location: Beijing,China
Posts: 12

Rep: Reputation: 0
for ubuntu: sudo apt-get remove "your old kernel name"

for fedora: rpm -qa | grep kernel;
and then yum remove "your old kernel name"

Last edited by opensourcewj; 12-31-2011 at 03:52 AM.
 
Old 01-03-2012, 11:38 AM   #9
xjx424
LQ Newbie
 
Registered: Apr 2011
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for you replies everyone
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing old kernels? carlosinfl Fedora 1 04-12-2005 10:58 AM
Removing old kernels dbzw Linux - Newbie 5 02-29-2004 01:01 PM
Re: Removing old kernels jong357 Linux - General 1 02-29-2004 08:54 AM
Removing old kernels dbzw Linux - General 1 02-29-2004 12:33 AM
removing kernels? rakriege Linux - Newbie 1 11-09-2003 06:54 PM


All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration