LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   what is Grub loading error 21, and how can I fix the problem! (https://www.linuxquestions.org/questions/linux-software-2/what-is-grub-loading-error-21-and-how-can-i-fix-the-problem-224475/)

logiplex 08-30-2004 05:06 PM

what is Grub loading error 21, and how can I fix the problem!
 
My computer has a partition for linux fedora (the default OS) and also XP. When I boot up, I get the following:
Grub loading stage 1.5
Grub loading, please wait.....
error 21
When I hit enter, I get a blank screen with a blinking cursor. Now, I hit Ctrl-Alt-Del, and suddenly the Grub bootloader goes thru with no trouble. What is error 21, or at least where can I find the error codes for information, and how do I fix the problem; preferably without re-installing?
Thanks for any and all information......:(

jailbait 08-30-2004 09:02 PM

"My computer has a partition for linux fedora (the default OS) and also XP. When I boot up, I get the following:
Grub loading stage 1.5
Grub loading, please wait.....
error 21"

error 21 means that grub is looking for the grub configuration file on a disk that does not exist. Take a look at /boot/grub/grub.conf and see which disk the kernel and initrd parameters point to. They should point to the same disk where /boot is located.

"When I hit enter, I get a blank screen with a blinking cursor. Now, I hit Ctrl-Alt-Del, and suddenly the Grub bootloader goes thru with no trouble."

This sounds like a BIOS problem that is being corrected by the BIOS reinitializing itself on Ctrl-Alt-Del. Something like the disk addresses being incorrect the first time. Have you got something like a PCI secondary IDE controller with its own BIOS extension on it?

--------------------------
Steve Stites

masterdam79 02-04-2008 01:46 PM

Still Error 21 GRUB
 
I have checked my BIOS and CMOS, changed everything around and rebooted several times, but still Grub error 21 remains.
I have 2 internal drives.
Each on it's own IDE port.
2nd HD had Ubuntu Linux installed untill I formatted the drive.
Now the bootloader won't even load Win XP from 1st drive.
Help me please!!!

jailbait 02-04-2008 03:31 PM

Quote:

Originally Posted by masterdam79 (Post 3045861)
I have checked my BIOS and CMOS, changed everything around and rebooted several times, but still Grub error 21 remains.
I have 2 internal drives.
Each on it's own IDE port.
2nd HD had Ubuntu Linux installed untill I formatted the drive.
Now the bootloader won't even load Win XP from 1st drive.
Help me please!!!

And it took you three and a half years to figure that out?

------------------
Steve Stites

farslayer 02-04-2008 03:33 PM

boot from your XP CD, choose the option to enter the recovery console and run fixmbr

that will re-write the windows boot loader to the first drive so windows XP will boot..

Unless you have another Linux install out there you wish to use ?

john_1287 08-18-2008 11:22 PM

I have the same problem. When it prompts me to enter a password I put in the pw that I usually use when I log into my comp. Is that not the pw that it wants? Is there a stock pw that I need to type in to access the run command?

viklahan 09-05-2008 07:21 PM

LOL... 3 1/2.. years??? anyways... I am having the same problem... hold on trying to do the fix mbr thing

Larry Webb 09-05-2008 08:00 PM

jailbait, I have found they can change hds and have six distros and not tell you for 3 1/2 years.

sigkill-9 01-12-2009 04:05 PM

I'm having an issue similar to the OP and need some help please.

I have a PC that has two 250 gig sata internal hard drives in it, and I just hooked up a 500 gig external bare hard drive to use for my Linux O/S. I'm new to Linux, and am taking a college course on it which is why I bought the external HD. So I can practice and do homework at home.

I tried installing Linux on my external hard drive because I have sensitive and valuable information on my two internals (who doesnt).

I finished the Linux install, unhooked my external, and tried to boot from my windows disk on one of the internal HD's. Instead of booting to the windows loading screen I get the following error message:

Grub loading, please wait...
Error 21

Now what upsets me to the highest degree is that during the Linux installation I made darn sure that I did NOT select my internal hard drives for anything. I was very careful during the instal to select ONLY the external drive for install.

So why the hell would Linux over wright my MBR on my internal hard drives, especially without any sort of warning to the fact prior to initiating the install? Thats just bs as far as i'm concerned...

It should'nt have over written the mbr on my internals, because I was doing an install to the external only.


I followed this thread and loaded my windows o/s disk, went to the recovery console and typed in "fixmbr". I got a verbose warning message saying that runing fixmbr could damage my partitions and erase all data from the disk.

I canceled out of that with a quickness, went to the C:\ directory on my internal and listed the directory to see if anything was still there. To my relief all my files and directories were still intact, but the computer just wont boot and load into windows. It keeps showing the error message described above...

How can I fix this without the risk of loosing all my data?

yancek 01-12-2009 06:02 PM

You didn't bother indicating which Linux Distribution you are using and since there are well over 1,000, I don't know how much help you will get.
You indicated that you were not given any indication as to where the bootloader would be installed or that it would overwrite the mbr, so I would assume that whichever distribution you installed was one that was trying to be like windows.

The default for most distributions is to install to the mbr of the first drive in BIOS, so if you don't want that you need to make the choice. Almost all Linux distributions give you an option during bootloader install which is usually the last thing done in the installation. Don't know what you have installed so...

If you want to boot whichever version of Linux you have from the BIOS to your external drive, that can be easily done.

The "fixmbr" and "fixboot" command mentioned in this post are in fact, the commands recommended by microsoft. If that's the first thing you want just go to the microsoft site and do a search for "fixmbr xp".

When you have that taken care of, post back indicating the distribuiton of Linux you are using and the output of the command "fdisk -l" run as root user from a terminal.

http://support.microsoft.com/

This isn't that hard but, it's not magic. You need to do some research and you don't indicate what you did before install so you would know what to do.

sigkill-9 01-13-2009 03:15 AM

Quote:

Originally Posted by yancek (Post 3406357)
You didn't bother indicating which Linux Distribution you are using and since there are well over 1,000, I don't know how much help you will get.

Sorry, was in a hurry when I posted, forgot that detail. I'm using Ubuntu 8.10 desktop edition.

Quote:

Originally Posted by yancek (Post 3406357)
Almost all Linux distributions give you an option during bootloader install which is usually the last thing done in the installation. Don't know what you have installed so...

The only choice I was given in regard to choosing a drive was which drive to use as the install drive. This was toward the end of the install menu.

It listed a summary of the installation at the end of the install menu which listed the hard drive to be written to. The one listed was the external I chose. That was the only reference to drives that I noticed, so I assumed my internals wouldnt be touched...

Quote:

Originally Posted by yancek (Post 3406357)
If you want to boot whichever version of Linux you have from the BIOS to your external drive, that can be easily done.

How? Well, my mobo allows me to choose which drive to boot from just after it posts so I guess that will work yes?

Quote:

Originally Posted by yancek (Post 3406357)
The "fixmbr" and "fixboot" command mentioned in this post are in fact, the commands recommended by microsoft. When you have that taken care of, post back...

Unfortunately the fixmbr command did not repair the error. It did clear the error message, but another windows error came up when I tried to boot from that drive... I had to repair windows by installing it all over again but it kept all my settings and files, whew! That problem is solved.

Quote:

Originally Posted by yancek (Post 3406357)
This isn't that hard but, it's not magic. You need to do some research and you don't indicate what you did before install so you would know what to do.

I really didnt do anything prior to the install accept play a racing game for about 10 min... After that I decided it was time to install Ubuntu, so I inserted the Ubuntu 8.10 disk, powered off the PC, connected my external HD via firewire to my PC, then booted from the Ubuntu install disk, and installed.

Regardless, I'm ready to attempt the install again. I opened my box, unplugged the sata connectors going to my two sensitive drives, and installed the external sata drive into the box and hooked it up. This way I can assure nothing will be written to other than the intended drive.

I did an install once with this setup but encountered a problem. During install it had a difficult time detecting my video. After a reboot I got the following error message:
Grub Loading Stage 1.5
Grub Loading, Please wait...
Error 21

I did some research on this error, and possibly found some solutions but they are fairly technical and I'm a newbie to Linux so I'm not too confident I can get past this issue...

Here's my hardware just in case it helps:
ASUS M2N32-SLI Deluxe mobo
Antec Tru-Power Trio 1000watt power supply
2 Gigs OCZ DDR 800 Ram
AMD 6400+ Black Edition 3.2Ghz water cooled dual core processor
Two BFG GeForce 9800 GTX+ 512mb video cards

This is primarily my gaming rig, but it's also partially my school/business PC as well.

I'm thinking Linux doesnt like my cards, so I'm going to disconnect the SLI connector and unplug one to see if that helps.

If anyone else has a workaround to this issue, you're help would be greatly appreciated.

P.S. Sorry for the novel...

yancek 01-13-2009 08:52 AM

Your graphics card is Nvidia and they usually work well w/Linux. You might google your specific card with Linux in the search box to get some information in advance.

I don't have Ubuntu 8.10 so I don't know what options it has. I just installed Linux Mint which is an Ubuntu derivative and the option for the Grub bootloader (mbr or root partition) was on an Advanced tab in the bootloader installation. Ubuntu may be the same??

I don't see a question in your last post? Did you install Ubuntu again?

sigkill-9 01-13-2009 01:42 PM

I did install Ubuntu again, but kept having problems with x server. It wouldnt start, I assume because of incompatability with my video cards.

I searched on several forums regarding this issue and found several command line fixes that finally got me into the GUI.

But after performing several system updates (which the O/S recommended) and after a reboot, it now wont load the GUI, it only loads to a shell.

How do I start the GUI from a shell? Or will I need to re-install Ubuntu all over again?:(

yancek 01-13-2009 05:31 PM

Type "startx" w/o quotes.

If you don't get GUI you may be set at the wrong runlevel. Open the terminal and type: sudo gedit /etc/inittab, should open the inittab file. Look for an entry like the following:

Quote:

id:3:initdefault:
If you have a number other than "5" where the "3" is in this line change it to 5. If that doesn't work, it's a different problem than runlevel.

farslayer 01-13-2009 10:26 PM

Quote:

Originally Posted by sigkill-9
"But after performing several system updates (which the O/S recommended) and after a reboot, it now wont load the GUI, it only loads to a shell."

one of which was probably a kernel update, which means you need to recompile the nvidia driver for the new kernel, or load an updated binary video driver module that matches the kernel version you are now running. Don't know how you installed it the first time, but it should be a snap to update.

It's not a runlevel issue. Ubuntu like Debian always starts in runlevel 2


All times are GMT -5. The time now is 07:37 PM.