LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-12-2006, 12:11 PM   #1
extendedping
Member
 
Registered: Feb 2004
Posts: 210

Rep: Reputation: 30
How to remove old kernel from boot options


Hi all I hava a laptop set with xp/fedora5 boot. My ultimately I am going to try to get fedora working with the integrated intel3945 adapter which has been a nightmare for this newbie...anyway, I have reinstalled fedora as to start from scratch (didn't want any previosu settings their from my previous attempt at getting the wireless working)and done a complet yum update. Now I notice when I boot I have the option of booting from the old kernel or the newer one that I got during the yum update. As I want as few settings on fedora to "trick" the OS when taking another shot at the wireless, I want to only have the most recent kernel both on the system and in the boot screen...Any suggestions on how to do this? Thanks in advance and see yall in a bit when I start again with the wireless project...
 
Old 10-12-2006, 12:42 PM   #2
xpromisex
Member
 
Registered: Apr 2004
Location: Statesboro, GA
Distribution: Arch Linux 2007.05 "Duke" (Kernel 2.6.21)
Posts: 447

Rep: Reputation: 30
If you want to remove the old boot options, you can edit the menu.lst / grub.conf. Menu.lst is located in /boot/grub and (if I am not mistaken) grub.conf is located in /etc/grub. You must edit each of these as root and you probably won't have both of these files. (From what I have seen, most distros now have a /boot/grub/menu.lst)
 
Old 10-12-2006, 12:52 PM   #3
extendedping
Member
 
Registered: Feb 2004
Posts: 210

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by xpromisex
If you want to remove the old boot options, you can edit the menu.lst / grub.conf. Menu.lst is located in /boot/grub and (if I am not mistaken) grub.conf is located in /etc/grub. You must edit each of these as root and you probably won't have both of these files. (From what I have seen, most distros now have a /boot/grub/menu.lst)

thanks what if I actually want to remove the old kernel as well? the reason I ask is as I was doing attempting to get my wireless working there were (if I remember correctly) times where I was being asked about folder and stuff that I thought related to the kernel (c headers and other stuff I don't understand.). I was hoping to just get rid of the old kernel and its assiciated files...

Last edited by extendedping; 10-12-2006 at 12:54 PM.
 
Old 10-12-2006, 01:14 PM   #4
extendedping
Member
 
Registered: Feb 2004
Posts: 210

Original Poster
Rep: Reputation: 30
btw I have an /etc/grub.conf and a /boot/grub/menu and they both look identical...do I need to edit both or does one update the other? also by edit do I go into vi and then put a pound sign before the lines I need to get out?
 
Old 10-25-2006, 07:11 PM   #5
xpromisex
Member
 
Registered: Apr 2004
Location: Statesboro, GA
Distribution: Arch Linux 2007.05 "Duke" (Kernel 2.6.21)
Posts: 447

Rep: Reputation: 30
Sorry about the delay -

but I'm not sure about "removing" the actual kernel or if you have both the grub.conf and menu.lst, but I would edit both. To edit them, you can simply comment the lines out or you can delete them altogether.
 
Old 10-25-2006, 08:20 PM   #6
Ynot Irucrem
Member
 
Registered: Apr 2005
Location: Perth, Western Australia
Distribution: Debian
Posts: 233

Rep: Reputation: 30
Quote:
Originally Posted by extendedping
I have an /etc/grub.conf and a /boot/grub/menu and they both look identical
I think one is probably a symbolic link (sort of like a shortcut in Windows) to the other.

Having another kernel there isn't going to affect anything. If you don't boot from that kernel, it's just going to sit there, and I like to keep my old kernel around for a while until I'm sure the new one hasn't broken anything. Anyway, to remove the extra kernel, first list the kernels you have installed:
Code:
yum list installed kernel\*
(I can't remember what the kernel packages are called in fedora, but i think it's either kernel-<version> or kernel-image-<version>)

then remove the one you don't want:
Code:
su -c 'yum remove <package>'
*enter root password*
EDIT: btw, there's a GUI for yum that will make package maintenance easier for you:
Code:
su -c 'yum install yumex'

Last edited by Ynot Irucrem; 10-25-2006 at 08:22 PM.
 
Old 10-25-2006, 09:22 PM   #7
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
In reality, removing the old kernels is unnecessary. The default location of the kernel source is /usr/src/linux, and what most distros do is leave all your kernel sources in /usr/src, and just make /usr/src/linux a symbolic link to /usr/src/kernel1 or /usr/src/kernel2 or whatever. If you are using Fedora, unless you specifically installed it, you won't even have the kernel source, which will be necessary to get wireless working through kernel modules.

Editing grub also does not remove the kernel, just the ability to boot the kernel. You can only have one kernel live at any one time, but there is no problem having old ones sitting around. They take very little space.

Peace,
JimBass
 
Old 10-25-2006, 10:12 PM   #8
themouser
LQ Newbie
 
Registered: Feb 2006
Location: minnesota
Distribution: open suse, ubuntu
Posts: 7

Rep: Reputation: 0
just another 2 cents from another sort of newbie. I had to edit /boot/grub/menu.lst on a dual boot system running fc5 because it would boot the other system into the wrong partition. using vim i just deleted the incorect partition number and inserted the right one, then write and quit. It's worked fine ever since without ever bothering with grub.conf. just a lucky accident since i never really know what i'm doing.
regards
dave
 
  


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 remove old kernel from boot 2.6.15-26 pburn Ubuntu 3 09-24-2006 07:06 AM
kernel boot options lokaar Linux - Hardware 0 10-17-2005 09:04 AM
kernel options at boot exit Linux - General 4 08-06-2005 10:07 PM
List of kernel boot/install options? Globular Fedora - Installation 1 01-28-2005 03:39 PM
updated kernel now has 3 options to choose on boot centr0 Linux - General 1 02-26-2003 11:39 PM


All times are GMT -5. The time now is 02:56 AM.

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