LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB error on windows-only drive after ubuntu install on separate drive (http://www.linuxquestions.org/questions/linux-newbie-8/grub-error-on-windows-only-drive-after-ubuntu-install-on-separate-drive-713606/)

Pappou 03-22-2009 02:59 PM

GRUB error on windows-only drive after ubuntu install on separate drive
 
New to LQ and not real familiar with Linux yet. I have a new, unused SATA drive and I thought if I loaded Linux on that and used the bios boot menu I could select either my Windows PATA drve C, or the Linux SATA drive D and avoid risking corruption to the windows drive. As I installed Ubuntu I took care to only address the installation operations to the 500GB SATA drive and not the 80GB PATA drive. When finished, I booted up in Linux from drive D: with no problem.

But when I select the C: drive to boot, The following displays: GRUB 1.5 error 21. Online and book research led me to try running FIXMBR and FIXBOOT from the repair console of my Windows CD, but this did not fix the problem. I've viewed the drive contents through the dolphin file manager and everything seems to be there; the drive is just not bootable. Anybody have any suggestions for me?

At this time I don't have internet access at home and can only check the forum or email between 2 and 4 times per week. Please be patient if it takes a while to respond to replies. Thanks in advance.

rjlee 03-22-2009 04:25 PM

That's rather odd; Ubuntu normally detects an existing Windows install and configures Grub to dual-boot either Linux or Windows.

There are quite a few variables here. Firstly, are you sure that your PATA drive is drive C? Windows is only capable of booting from the first drive, and so if you installed a blank SATA disk and the BIOS detects it first, then you can only boot Windows off that, regardless of which OS you disk in the BIOS menu. (But there is a trick using GRUB to get around this.)

Have you tried unplugging the SATA drive and seeing if Windows will boot then?

If it doesn't, then it looks like Grub installed itself to the master boot record of the first hard disk, which would be reasonably normal for a dual-boot installation. Grub isn't used by a regular Windows install, but it is often used by Linux systems to present a dual-boot menu, as it's perfectly capable of booting Windows.

There are two possible solutions here: The first is to re-install the Windows bootloader, which will wipe Grub from your “C:” drive and should fix Windows, but this might break your Linux boot.

The second option is to configure Grub to boot your Windows partition. To do this, it uses a chainloader to load the Windows system. This is a little involved, but you can find instructions at http://www.linuxselfhelp.com/gnu/gru...b_4.html#SEC14. If your PATA drive isn't the first disk identified by the BIOS, then you way also need to swap the disks as described at http://www.linuxselfhelp.com/gnu/gru...b_4.html#SEC21.

yancek 03-22-2009 05:14 PM

When you installed Ubuntu, did you have the windows hard drive disconnected? If you did, you would obviously have to manually enter a title line in the /boot/grub/menu.lst file for windows. If this is the case, the error you are receiving is very logical.

When you installed Ubuntu, did you have the windows hard drive connected? If you did and you installed Ubuntu it is default to install bootloader to mbr of drive in first boot priority. This would also explain the error as the Grub stage1 file is in the mbr of the first drive and looking for the rest of the bootloader files which are on the external drive which is not connected?

Boot Ubuntu and post the output of "sudo fdisk -l" (w/o quotes, lower case Letter L) as well as the menu.lst file. Also, did you have the windows disk connected during install?

prushik 03-22-2009 05:38 PM

boot into linux and then mount your windows drive (not sure if thats necessary, but can't hurt) then run "sudo grub-update" from the command line. Then instead of trying to boot from your PATA drive, select Windows from the grub menu and that should boot windows for you.
I had this problem when I installed Ubuntu on my external and tried to boot without the external drive connected.

syg00 03-22-2009 07:00 PM

Before doing anything, go get the bootinfo script from here - run it from a terminal in your Ubuntu system and post the RESULTS.txt here.
Then we'll have a better idea of what your setup is.


All times are GMT -5. The time now is 09:03 AM.