GRUB and the list of kernels

I have grub installed and I have WinXP and Fedora installed. When I first installed Fedora, my grub loader only had 2 options, fedora, and windows. Every time i update the kernel though, it adds another option to my grub loader.

Everything Linux 1798 This topic was started by ,



data/avatar/default/avatar12.webp

4 Posts
Location -
Joined 2005-11-02
 
I have grub installed and I have WinXP and Fedora installed. When I first installed Fedora, my grub loader only had 2 options, fedora, and windows. Every time i update the kernel though, it adds another option to my grub loader.
 
Is there a way to get rid of the old kernels on the loader, so I only have the latest kernel as an option?

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic



data/avatar/default/avatar12.webp

4 Posts
Location -
Joined 2005-11-07
I'm not familiar with Fedora, but have you tried removing the old kernels from your system with you package manager then from a console as 'su' running 'update-grub'?
 
If that doesn't work, you could just edit the /boot/grub/menu.lst file, removing references to any kernel you're not interested in booting. Be careful about such fixes, as if you do something wrong, it could be catastrophic.


data/avatar/default/avatar10.webp

2895 Posts
Location -
Joined 2002-08-30
This is by design. If a new kernel does not boot, then you can boot easily to the older one.
 
You can just go into the /boot/grub/menu/lst file and comment out the entries for the older kernels, once you know the newer ones work,
 
Each kernel update gets named in the list.
 
Use your favorite editor as root user. Just comment out the lines that point to the older kernel by placing a # in front of that series commands. So, say you want want to comment out the first entry;
 
#title Fedora older kernel
#kernel (hd0,0)/boot.....
#initrd (hd0,0)/boot.....
 
title Fedora newer kernel
kernel (hd0,0)/boot.....
initrd (hd0,0)/boot.....
 
 
Each section starts with the title, so make sure you don't comment out a command listed for the next kernel entry.


data/avatar/default/avatar26.webp

151 Posts
Location -
Joined 2003-12-23
danleffs right! you just comment out the entries for your old kernel but be careful not to comment out those that are needed.
# sign is used for commenting out entries.