Changing the Master Boot Record..

Asked by GuitarMee08

I started out with a computer running only Windows XP Home Edition. Then, I decided to install a second hard drive on my computer and install Ubuntu on it. The installation worked without any problems. When I start my computer (with both drives present) I am given a list of OSs to choose from and both Ubuntu and Windows run correctly. However, when I remove the second hard drive (with Ubuntu), I get an error message to do with "Grub". It seems like the computer is, unsuccessfully, looking for a grub file on the hard drive or MBR. How can I get the computer to boot from the primary hard drive (Windows XP) without the other drive being present?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bhavani Shankar (bhavi) said :
#1

Well when you install ubuntu The MBR gets overwritten and GRUB loads the OS's So if you remove your secomd hard drive you will get a GRUB Loading error.. Pertaining to your question, Boot up with the WinXP CD and after everything loads up you will be asked with an option called AUTOMATIC RECOVERY MODE press R to enter into that mode and that will take you to a DOS Screen, give C:\ at the prompt and then give fixmbr.. Ex: C:\>fixmbr and you should be done...
Regards,
Bhavani Shankar.

Revision history for this message
Jim Hutchinson (jphutch) said :
#2

Yes, that will not work. The files that GRUB needs in order to give you the menu of choices is located in the Ubuntu installation. Specifically, it's located in the /boot/grub/ directory. If you remove this drive, GRUB will not be able to retrieve the menu or the other necessary files and therefore won't work.

If you can't leave the second drive attached, I would suggest moving grub to be on the MBR (master boot record) of the second drive and restore the Windows MBR on the first or Windows drive. That way windows will always boot as normal. If you want to boot Ubuntu you would connect the second drive but you would have to use either a "one time boot menu" option if your computer supports that (some Dells do for example) or you would have to open the bios and mark the second drive as the primary drive. However, I don't think this would work real well. It would be a pain to edit the BIOS each time to boot Ubuntu (unless there is a tool out there to manage the boot loader better) and GRUB will likely get confused if you change it to the primary drive in the BIOS.

If you can, I'd just leave the Ubuntu drive connected. If it's a usb drive, then I'd look to see if your computer supports the "one time boot option" menu. On my Dell it's accessed by hitting F12 during the initial Dell splash screen.

Revision history for this message
Bhavani Shankar (bhavi) said :
#3

Yes thats hitting the bulls eye mate!!!

Revision history for this message
GuitarMee08 (matthewmcbroom) said :
#4

How do I move the Windows MBR to and restore it on my primary drive?

Revision history for this message
Bhavani Shankar (bhavi) said :
#5

Please take a look at my answer above...!!!

Revision history for this message
GuitarMee08 (matthewmcbroom) said :
#6

Oops, I meant, "How do I move GRUB (not "the Windows MBR") to be on the MBR of the primary drive and restore the Windows MBR on the primary drive?"

Revision history for this message
Bhavani Shankar (bhavi) said :
#7

Then you have to change your ubuntu drive as your primary drive in the bios and follow what jim has said...

Revision history for this message
nguyen_viet_ha05 (nguyenvietha05) said :
#8

I installed Windows XP and I'm going to install Ubuntu.8.04. Can I install GRUB in root folder of Ubuntu, not MBR and use XP boot loader ? My computer have only one hard disk.

Can you help with this problem?

Provide an answer of your own, or ask GuitarMee08 for more information if necessary.

To post a message you must log in.