LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to remove old kernel from boot options (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-remove-old-kernel-from-boot-options-491827/)

extendedping 10-12-2006 12:11 PM

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...

xpromisex 10-12-2006 12:42 PM

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)

extendedping 10-12-2006 12:52 PM

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...

extendedping 10-12-2006 01:14 PM

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?

xpromisex 10-25-2006 07:11 PM

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.

Ynot Irucrem 10-25-2006 08:20 PM

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'

JimBass 10-25-2006 09:22 PM

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

themouser 10-25-2006 10:12 PM

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


All times are GMT -5. The time now is 01:48 AM.