Jump to content
Compatible Support Forums
Sign in to follow this  
Cardinal

Removing an OS from the GRUB boot loader.

Recommended Posts

Hello everyone.

 

I'm using Fedora Core 2 and updated the kernel with yum. When I reboot I notice an older version of the kernel is still showing in the boot screen.

 

I would like to edit the boot options so only the updated build of Fedora is shown and also XP, that is set up to dual boot. At the moment, I have three options to boot, I would like to change that to only show two. smile

 

Thanks in advance guys.

 

- Cardinal

Share this post


Link to post

It's actually good that the old kernel still shows. If something went wrong with the new kernel install, you have a fallback.

 

You can remove the lines for the old kernel from Grub, by editing the /boot/grub/menu.lst file. You can do this as root user either by using vim or konqueror as superuser.

 

What I do is get to a terminal, as root user and invoke konqueror (if you are using KDE). Keep hitting the back button, until you get to the main directory window. You will see the boot directory. Get in there, then grub. you will see the menu.lst file...double click on this and you can see the menu.

 

Be careful not to delete any of the information related to the new kernel, only the old kernel information. If you post the contents of this file (cut and paste to the forum), we can tell you what to delete. Save the file and your done!

 

You can also do this from the gui, in the control panel, which may be safer to do. I'll have to look this up, as I am rusty on this right now.

 

Before you do this, it is wise to make a boot floppy, just in case.

Share this post


Link to post

Thanks for the reply Dan smile

 

Here is my menu.lst entries.

 

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You have a /boot partition. This means that

# all kernel and initrd paths are relative to /boot/, eg.

# root (hd1,0)

# kernel /vmlinuz-version ro root=/dev/hdb2

# initrd /initrd-version.img

#boot=/dev/hda

default=3

timeout=10

splashimage=(hd1,0)/grub/splash.xpm.gz

title Fedora Core (2.6.9-1.3_FC2)

root (hd1,0)

kernel /vmlinuz-2.6.9-1.3_FC2 ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.9-1.3_FC2.img

title Fedora Core (2.6.8-1.521)

root (hd1,0)

kernel /vmlinuz-2.6.8-1.521 ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.8-1.521.img

title Fedora Core (2.6.5-1.358)

root (hd1,0)

kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.5-1.358.img

title Windows

rootnoverify (hd0,0)

chainloader +1

 

 

I'm pretty sure I know which entries to remove, do you think it's worth it? Your suggestion about leaving an entry as a 'fallback' seemed like a good idea. I'm really only doing it improve the appearance of the boot menu. I've been booting with the new kernel for a while now and it seems fine.

 

Anyway, thanks again.

Share this post


Link to post

What I did not mention, is hashing outthe entries as another option. This way, they are intact in the menu.lst, in case you need them later. Say, you find out that the new kernel has resulted in some piece of hardware not working. Rare, but it happens.

 

So, each kernel entry starts with title and ends with the initrd entry.

 

So, you can hash out each entry that you do not want like so;

 

#title Fedora Core (2.6.5-1.358)

#root (hd1,0)

#kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet

#initrd /initrd-2.6.5-1.358.img

 

Save the file and your done.

 

You can also edit the default=3 entry to change the default entry that is booted first (relevent to the number of booting entries that you have in Grub), if needed, but this is another matter.

 

This is different from Lilo, in that no further modifications are needed, such as running /sbin/lilo, after making changes to /etc/lilo itself.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×