# [SOLVED] How to fix GRUB Error 21



## Blue445

Hello all!

I had installed Ubuntu 8.10 on my External Drive, on a partition, so I would not risk messing up my Windows Installation, and to keep my comptuer booting windows all the time when my External was not plugged in.

As I can see now, it is not the case. My PC requires that I have my external drive plugged in, before it gives me a choice of operating Systems.

When it is not plugged in, a message comes up and says this:



Code:


GRUB Loading Stage 1.5.
GRUB loading, please wait...
Error 21

It then stays on this screen, and I must manually restart. When i restarte the Message comes up again unless i have my external plugged in.

Is there anyway to get rid of this, and have my computer automatically booted into windows? Its getting quite annoying now...Any help would be greatly appreciated!


----------



## Rome5

*Re: How to fix GRUB Error 21*

You need to repair the mbr and this would be how.


----------



## Blue445

*Re: How to fix GRUB Error 21*

Well, It requires a Windows Boot CD...And I only have recovery discs....Any way to get to get to the Recovery Console without the Original Windows CD...that i do not have?


----------



## Rome5

*Re: How to fix GRUB Error 21*

Since recovery disc differ between manufacturers, you'd have to resort to their website or manuals provided to figure out exactly how to use fix mbr. It's something that should be included and available. Someone else here might be able to direct you better, but I don't use Windows enough to know what other options there are.


----------



## Blue445

*Re: How to fix GRUB Error 21*

Alrighty, Thank you Rome for directing me....Ill check out the HP live chat for some help.


----------



## mbrace7

*Re: How to fix GRUB Error 21*

With the WinXP Setup disk get into the Recovery Console 
1. type the figure 1 at which Windows 
2. type fixboot and press enter
3. type fixmbr and press enter
4. Restart Windows and download SuperGrub and use it to automatically repair Grub.


----------



## Bartender

*Re: How to fix GRUB Error 21*

I know I've read of folks fixing mbr with a GRUB Super Disc. You can download GSD off the internet.

Here's what you did to your computer. You installed Ubuntu with the external connected, and you let Ubuntu place GRUB Stage 1 where it goes by default. By default, GRUB Stage 1 installs to the very beginning of the bootable HDD, which in most people's PC's is the "C" drive. 

Windows installs the Master Boot Record (MBR) to the beginning of "C" drive. If the MBR is corrupted Windows won't start. GRUB finds the Windows MBR and modifies it so that (1) you have the choice of operating systems, and (2) Windows will still start correctly.

So essentially you took the same risks as if you installed Ubuntu to the C drive. Well, OK, I take that back. You didn't have to deal with the partitioning part, which can be a handful.

So, yeah, first thing to do is fix the mbr. There are thousands of posts on that subject and I know you don't need a Windows disc.

Once you fix the mbr, Ubuntu will become unusable because GRUB Stage 1 has been erased. So here's a suggestion.

Most modern BIOS'es offer a feature that allows you to choose the bootable device during POST. There are several different keystroke combinations, depending on who designed your BIOS. If I remember correctly, it's F8 on my ASUS motherboard. All I have to do is tap F8 a few times at the right time and the "choose bootable device" screen pops up. 

If you can find that feature, re-install Ubuntu to the external just like before, but watch for the window that asks you where to install GRUB. I haven't installed in months now, but if I remember correctly, the GRUB window came up AFTER Linux installed. There was a tiny box on that page. You can change the default setting (default will be hd0) so that GRUB Stage 1 installs to the external, not the internal drive. In other words, not one byte of Linux data will go to the Windows HDD. 

I'm not absolutely sure about this, so it would be good to have someone back me up, but if you have one HDD inside the PC, your external drive should be recognized as "hd1" by GRUB. That would be the destination you enter into the "Where to install GRUB" page described above during the Linux installation process.

If you have two drives inside the PC, then the external should be hd2 in GRUB-speak. By "GRUB-speak", I mean that GRUB has its own terms for HDD's and partitions. You know how Windows sees HDD's or partitions as C, D, E, etc.? And Linux sees HDD's as sda, sdb, sdc, etc. and partitions as sda1, sda2, sda3? Well, GRUB sees HDD's as hd0, hd1, hd2, etc. and partitions as hd0,0, hd0,1, hd0,2, etc.

Yeah, I know, why can't this stuff be simpler?

I've never messed with a Super GRUB Disc, but I'm almost sure that it allows you to do numerous things, like fixing GRUB. Yeah, come to think of it, I'll betcha you could just re-install GRUB (which would involve installing Stage 1 again) to the external HDD using the GRUB Super Disc and not even mess with reinstalling Ubuntu!

EDIT: Super Grub Disc website: http://www.supergrubdisk.org/

BTW, physical HDD's are spelled "disk" and CD's, DVD's etc. are "disc" :grin:


----------



## Blue445

*Re: How to fix GRUB Error 21*

Thanks bartender! Ill keep that SuperGrub thing in handy, but I already got if fixed...I uh, found a WinXp disc. Even though it wasnt media center, it still booted into the Recovery console and i got my mbr fxed...Thanks a bunch!


----------



## wmorri

*Re: How to fix GRUB Error 21*

Hi,

If there aren't any objections I will mark this thread as solved, so that people can move on to other threads.

Cheers!


----------

