LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 08-20-2004, 11:06 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,385

Rep: Reputation: 52
How to remove old kernels safely


Hi folks,

Fedora Core 2
(upgraded from RH8)

I have 4 (four) kernels running on the PC which is the result of running 'yum update'. Kindly advise how to remove the old kernels without endangering the OS. I suppose running GRUB as bootloader. Is there a way to confirm it.

TIA

B.R.
satimis
 
Old 08-20-2004, 11:11 AM   #2
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi
pl. submit ur system configuration
r u using multiprocessors????
what kernels du u have installd ???

regards
gaurav
 
Old 08-20-2004, 11:19 AM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,385

Original Poster
Rep: Reputation: 52
Hi masand,

Tks for your response.

Quote:
pl. submit ur system configuration
r u using multiprocessors????
what kernels du u have installd ???
$ uname -a
Linux localhost.localdomain 2.6.8-1.521 #1 Mon Aug 16 09:01:18 EDT 2004 i686 athlon i386 GNU/Linux

Kernel -2.6.8-1
Single processor
AMD Athlon 1.4G
512MB
IDE HD
IDE Writer
IDE CDRom

B.R.
satimis
 
Old 08-20-2004, 11:35 AM   #4
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 366

Rep: Reputation: 44
I just do a "rpm -qa | grep kernel" to list installed kernels
Then "rpm -e whaterkernel you don't use anymore"
I usually keep the kernel next to the latest in case of problems
 
Old 08-20-2004, 11:50 AM   #5
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi

u can see the rpms of the installed kernel from the above command
could u post the the kernels u have got installed

also u may not require

kernel-SMP
kernel-BOOT

regards
 
Old 08-20-2004, 09:45 PM   #6
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,385

Original Poster
Rep: Reputation: 52
Hi DOUBLEJOON,

Tks for your advice.

Quote:
I just do a "rpm -qa | grep kernel" to list installed kernels
$ rpm -qa | grep kernel
kernel-2.6.6-1.435.2.3
kernel-source-2.6.5-1.358
kernel-2.6.8-1.521
kernel-2.6.5-1.358
kernel-2.6.7-1.494.2.2
kernel-utils-2.4-9.1.131

Quote:
I usually keep the kernel next to the latest in case of problems
That is what I need exactly. But what I'm worrying whether there will be any side effect after removing the old kernels with

# rpm -e kernel-xxx

Do I need to touch GRUB/LILO. How to find out which bootloader I'm currently running.

TIA

B.R.
satimis
 
Old 08-20-2004, 09:50 PM   #7
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,385

Original Poster
Rep: Reputation: 52
Hi masand,

Tks for your advice.

Quote:
u can see the rpms of the installed kernel from the above command
could u post the the kernels u have got installed

also u may not require

kernel-SMP
kernel-BOOT
$ rpm -qa | grep kernel-*
kernel-2.6.6-1.435.2.3
kernel-source-2.6.5-1.358
kernel-2.6.8-1.521
kernel-2.6.5-1.358
kernel-2.6.7-1.494.2.2
kernel-utils-2.4-9.1.131

$ rpm -qa | grep kernel-SMP
$ rpm -qa | grep kernel-BOOT
all no output

B.R.
satimis
 
Old 08-20-2004, 11:43 PM   #8
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
Quote:
Originally posted by satimis
Hi masand,

Tks for your advice.


$ rpm -qa | grep kernel-*
kernel-2.6.6-1.435.2.3
kernel-source-2.6.5-1.358
kernel-2.6.8-1.521
kernel-2.6.5-1.358
kernel-2.6.7-1.494.2.2
kernel-utils-2.4-9.1.131

$ rpm -qa | grep kernel-SMP
$ rpm -qa | grep kernel-BOOT
all no output

B.R.
satimis

hi there
i was just telling u that u can safely remove theeses kernels as these are of less use to u

the kernels u hae installed are the various version of the kernel
1. is 2.6.6
2. kernel source --u need to keep that if u want to compile ur kernel
3. is 2.6.8
4. is 2.6.5
5. is 2.6.7
6. small kernel utils package required for kernel compiling and other work(need not remove that)


it is upto u to chose which kernel out of the 2.6.8-2.6.6-2.6.5 or 2.6.7
se that the kernel u8 use supports all ur functionalities
and u have the rpms of these

so in the near future if u require those u do not have a problem in that

regards
gaurav
 
Old 08-21-2004, 01:53 AM   #9
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,385

Original Poster
Rep: Reputation: 52
Hi masand,

Quote:
it is upto u to chose which kernel out of the 2.6.8-2.6.6-2.6.5 or 2.6.7
se that the kernel u8 use supports all ur functionalities
and u have the rpms of these

so in the near future if u require those u do not have a problem in that
which is 'kernel u8' ???

After deleting
# rpm -e kernel-2.6.6-1.435.2.3
# rpm -e kernel-2.6.5-1.358

Do I need to comment out follows on /etc/grub.conf
Code:
....
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.6.8-1.521)
       root (hd0,0)
       kernel /vmlinuz-2.6.8-1.521 ro root=LABEL=/
       initrd /initrd-2.6.8-1.521.img
title Fedora Core (2.6.7-1.494.2.2)
       root (hd0,0)
       kernel /vmlinuz-2.6.7-1.494.2.2 ro root=LABEL=/
       initrd /initrd-2.6.7-1.494.2.2.img
#title Fedora Core (2.6.6-1.435.2.3)
#        root (hd0,0)
#       kernel /vmlinuz-2.6.6-1.435.2.3 ro root=LABEL=/
#        initrd /initrd-2.6.6-1.435.2.3.img
#title Fedora Core (2.6.5-1.358)
#        root (hd0,0)
#        kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/
#        initrd /initrd-2.6.5-1.358.img
and remove following files on /boot/
Code:
initrd-2.6.5-1.358.img
initrd-2.6.6-1.435.2.3.img  
vmlinuz-2.6.5-1.358
vmlinuz-2.6.6-1.435.2.3
Tks

B.R.
satimis
 
Old 08-21-2004, 02:17 AM   #10
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

i wrongly typed there
that was kernel u
8 was not supposed to be there

after u have removed ur kernel then u can edit ur grub.conf
remove files from /boot partiton
when u install ur kernel then these files are again there at these locations

regards
gaurav
 
Old 08-21-2004, 05:56 AM   #11
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,385

Original Poster
Rep: Reputation: 52
Hi masand,

Tks for your further advice.

I'll remove following 2 old kernels only after the latest kernel, kernel-2.6.8-1.521, running a week without problem;

kernel-2.6.6-1.435.2.3
kernel-2.6.5-1.358

I suppose 'kernel-2.6.5-1.358' is the default kernel when I upgraded FC2 from RH8

B.R.
satimis
 
Old 08-21-2004, 08:06 AM   #12
masand
Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there
yes u r correct
2.6.5 is te default kernel which came with fedora 2

regards
 
  


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
how to safely remove linux partition from a dual boot system? parv Linux - Newbie 7 05-01-2012 09:59 AM
How to safely remove linux :( TRUSTpunk Linux - Newbie 11 01-07-2005 12:55 AM
Safely remove USB Flash drive? Guitarist88 Linux - Newbie 3 05-26-2004 03:35 PM
How to remove lilo from MBR safely? eaglegst Debian 1 12-14-2003 07:53 PM
How do I safely remove old kernels? Amerist Linux - General 4 11-02-2002 10:56 PM


All times are GMT -5. The time now is 09:20 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration