Jump to content
xisto Community
Sign in to follow this  
bluedragon

Help With Editing Grub GRUB version 1.97 beta 4

Recommended Posts

Hi, I recently updated my Ubuntu kernel to latest (i don't remember exactly which but its 2.6.x) Now My GRUB is quite messed up since it displays 3 Ubuntus with their debug modes plus a memtest and Win XP x64 in the list. Total of about 8-9 options. Can I remove the previous versions of Ubuntu's from the list manually ? If so How ? I tried googling and somewhere I read about editing menu.lst file in the /boot/grub folder .. I COULDN'T see any menu.lst file there I think its becoz of the GRUB 2 or something ..Someone please help me with thisPlus ,Now I also want to make my system boot to Windows as default instead of Ubuntu.I even tried installing KGRUBEditor but I don't know where its installed. I couldn't locate it in my Ubuntu (KDE)I have both KDE and GNOME so any method would do .. as long as its working.P.S. I didn't edit the grub.conf file since there was a warning in the header of the file.

Share this post


Link to post
Share on other sites

Hi, you can do all of this by editing grub.conf.

First, backup your current grub.conf in case anything goes wrong.
Then open it with a text editor.

By default, grub.conf should look like this:

default=0timeout=10splashimage=(hd0,0)/grub/splash.xpm.gz
Then, there will be several sections similar to this (one for each menu option):
title Ubuntu Linuxroot (hd0,0)kernel /boot/ubuntu/vmlinuz-2.6.31-14initrd /boot/ubuntu/initrd-2.6.31-14.img
plus one for memtest, WinXP, etc.

Delete all of the sections with the title Ubuntu Linux except for the current one and its debug/recovery modes.

To make Windows XP the default, change the line
default=0
to the number of the WinXP section. Just remember that numbering starts with 0, not 1.
For example, if the Windows XP option is now the fifth one on the list, you would use
default=4
and it would boot up by default.

Sorry if I forgot anything, and hope I helped!
Edited by fstab (see edit history)

Share this post


Link to post
Share on other sites

@fstabGRUB 2 uses a slightly different syntax than it used to and it is no longer located at /boot/grub/grub.conf. The menu file is now at /boot/grub/grub.cfg.@bluedragonI unfortunately do not have enough knowledge in GRUB 2 to provide you with steps on how to manually remove these older versions, but if i were to take a guess, it would require deleting a certain file from /etc/grub.d and running grub-mkconfig afterwards.

Share this post


Link to post
Share on other sites

I haven't deleted the unused Ubuntus but I've made the default to WinXP .. Thankfully GRUB 2 didn't change much.I was expecting a screw up following the change in grub.cfg. Thankfully it didn't.GRUB 2 created the list with a strange coding. took me 2-3 tries to make XP the default one.I hope some GRUB 2 expert would guide me through cleaning the list.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.