GRUB Using Wrong menu.lst file

Asked by checkit

I have Intrepid installed on sda1. I recently installed Jaunty to sda2, and I forgot to uncheck the "Install Boot Loader" option when installing. Now, when I boot my computer, GRUB is using the menu options listed in the /boot/grub/menu.lst file on the sda2 partition, when I would like to revert to using the menu options listed in the menu.lst file on sda1.

How do I configure GRUB to use the menu.lst on sda1 instead of the one on sda2? Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
checkit
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You need to boot to LiveCD and reinstall GRUB and tell it to use sda1

You could just copy the menu.lst from sda1 to sda2 or is that not an option?

Revision history for this message
checkit (checkit) said :
#2

>You need to boot to LiveCD and reinstall GRUB and tell it to use sda1
Ok, but I'm not sure how to reinstall GRUB. I found this guide (http://ubuntuforums.org/showthread.php?t=224351), and I think I need to do the following from the the LiveCD:

sudo grub
find /boot/grub/stage1
root (hd0,0)
setup (hd0,0)
quit

Does that look correct to you?

>You could just copy the menu.lst from sda1 to sda2 or is that not an option?
No. The Ubuntu installation on sda2 is only temporary.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Looks great kiddo, that will point to the sda1 (partition 0 in grub is partition 1 in fdisk. Grub2 uses 1 to mean 1 which is more sensible imho)

Let us know how you go

Revision history for this message
checkit (checkit) said :
#4

What is the difference between the following options?

#Option 1
sudo grub
find /boot/grub/stage1
root (hd0,0)
setup (hd0,0)
quit

#Option 2
sudo grub
find /boot/grub/stage1
root (hd0,0)
setup (hd0)
quit

I'm confused after reading the following:

http://ubuntuforums.org/showthread.php?t=224351
"Just have recommendation to add that may be irrelevant: it might be of benefit to give an explicit warning (though it is mentioned) that this guide will write GRUB to the MBR (just in case someone is using a different boot loader on their MBR and would like to reinstall GRUB to a partition).

If someone wants GRUB on a partition, the 'setup (hd0)' step can be modified to 'setup (hdX,Y)'. Where X is the hard disk, and Y the partition using GRUB's nomenclature of starting from 0 (first partition=0, second=1,...)."

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Option 2 is correct, Option 1 shouldn't work.

Revision history for this message
checkit (checkit) said :
#6

Hi actionparsnip, thanks for the help. I ran the code from Option 2 and now everything is back the way it was previously.

P.S. Apparently Option 1 is a valid option. The difference is that it installs GRUB onto the partition boot sector (instead of the MBR):

http://www.gnu.org/software/grub/manual/grub.html#Installing-GRUB-natively

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

I see, thanks for sharing (mental note)

Glad you got the gold

=D