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

sigkill-9 01-13-2009 10:53 PM

Quote:

Originally Posted by farslayer (Post 3407839)
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.

How? I'm a Linux newb remember. I appreciate the help, but dont know what to do with it since I am new to Linux and Unix.

Can someone tell me exactly how I would recompile the nvidia driver for the new kernel? Or where I would get an updated binary video driver module?

How do I tell what kernel version I have?

Thanks.

farslayer 01-13-2009 10:54 PM

How did you install the nvidia driver to begin with ? my suggestion would be to follow the same how-to.

Did you use the Ubuntu restricted modules thingy ?

did you use Module-assistant ?

Did you download the Driver from nVidias website ?

sigkill-9 01-13-2009 11:23 PM

Quote:

Originally Posted by farslayer (Post 3407861)
How did you install the nvidia driver to begin with ? my suggestion would be to follow the same how-to.

I did this through a complicated series of command line operations that I barely understood. I found the how-to online and simply copied/pasted the commands.

Here's the how-to I followed:
Code:

1) enter the following at prompt:
wget http://us.download.nvidia.com/XFree86/Linux-x86/180.22/NVIDIA-Linux-x86-180.22-pkg1.run
2) after the download run the following at prompt:
sh NV*.run -q
3) after that, run this at prompt:
init 5 && exit

I have no idea what these things do other than download an nvidia driver that supports my 9800 GTX+ cards then installs the driver. I dont know what to do after this, or if there are some steps I'm missing???

Quote:

Originally Posted by farslayer (Post 3407861)
Did you use the Ubuntu restricted modules thingy ?

I have no idea what that is, so probably not.


Quote:

Originally Posted by farslayer (Post 3407861)
did you use Module-assistant ?

Again, I have no idea what this is, so probably not.

Quote:

Originally Posted by farslayer (Post 3407861)
Did you download the Driver from nVidias website ?

Yes. The download link was for the Linux version of the 180.22 nvidia drivers directly from nvidia.com. Although, I'm not even sure if those drivers will work or are working... Maybe it's the driver? I could try to install 177.?? version.

How do I remove the 180.22 drivers/software that I installed already? Now that I think of it my PC had issues using the 180.22 drivers. The 177.?? drivers worked, so they could solve my problem... maybe...

I dunno... I'm trapped in Linux hell rite now... I'm just trying to get a stinkin GUI here so I can start doing homework from home. Sheesh... why is it so hard to get it running? This isnt a very good first impression of Linux in my opinion. I'm not giving up on it, but definitely not happy with it thusfar.

Any help for the questions above would be most appreciated.

sigkill-9 01-14-2009 01:08 PM

Just an update; Problem solved... kinda... I was using the 32bit version of Ubuntu Desktop edition, which obviously wasnt getting me very far, so I downloaded and installed the 64bit version with no problems whatsoever. I did the install differently, however, by booting from the disk and selecting the "Try Ubuntu without any changes to your computer" option. It booted into the desktop and I clicked the Install icon and installed from there. After a restart the system booted up fine.

There is one rather annoying thing happening though, I downloaded updated nvidia drivers (I think they were the 177 version) and after the install and a reboot, it wouldnt boot into the GUI, only to a command prompt...? Unsure why, but apparently I cant update my video card drivers without the O/S phreakin out! Thats a bummer... I also tried downloading and installing other system updates, but after a reboot I had the same result. No GUI, only a command prompt. I dont know what (if anything) I'm doing wrong but comming from the Mac and Windows world an update should be as simple as downloading and installing it... but it seems, at least in Ubuntu 8.10, that it is not that simple... another bummer...

I'm just happy I have a working version now, so at least I can start on my Linux homework. I just hope my instructor doesnt require me to do updates... otherwise I'm skrewed.

yancek 01-14-2009 05:56 PM

Often when you do updates you will get a kernel update and you are usually asked if you want to do the kernel update also. I would suggest you say no to that until you are more familiar with the system.

sigkill-9 01-14-2009 06:05 PM

Thanks for the advice, I'll pay more attention to that and refuse kernel updates as suggested.

farslayer 01-14-2009 06:44 PM

OK so the answer to my previous question was that you downloaded the drivers from nVidias website and installed them manually.

Prior to your reload of the OS, the solution to your problem would have been to repeat steps 2&3 from the how-to again, exactly the way you did them the first time and your problem would have been solved.. Running those commands would have compiled an updated driver for you graphics card and kernel, that should have once again worked with no other changes necessary.

I couldn't say what your current issue is.. you need to start from the beginning again since you reloaded the OS.

Check the log for errors.
cat /var/log/Xorg.o.log | grep EE

post your xorg config file here for us to review..
cat /etc/X11/xorg.conf

consult the README file for the nvidia driver for any steps you missed during installation or any troubleshooting suggestions.
http://us.download.nvidia.com/XFree8...DME/index.html

masterdam79 01-15-2009 12:56 AM

Quote:

Originally Posted by jailbait (Post 3045974)
And it took you three and a half years to figure that out?

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

Of course it didn't take me 3 1/2 years, I posted my previous post in 2008.
Don't know where you learned your math??

masterdam79 01-15-2009 01:00 AM

Quote:

Originally Posted by Larry Webb (Post 3271085)
jailbait, I have found they can change hds and have six distros and not tell you for 3 1/2 years.

Indeed Larry, I figured it out somehow and didn't reply back with the solution, my apologies.

I think I used "fixmbr" and "fixboot".

randygland 06-30-2009 01:48 PM

can someone just explain what GRUB is please?

farslayer 06-30-2009 03:07 PM

Quote:

Originally Posted by randygland (Post 3591855)
can someone just explain what GRUB is please?

The project site will describe it better than I would...

http://www.gnu.org/software/grub/

pixellany 06-30-2009 03:20 PM

Quote:

Originally Posted by randygland (Post 3591855)
can someone just explain what GRUB is please?

welcome to LQ!!

GRUB is the most common bootloader used by Linux. The "booting" link below in my sig will give you some info. Also try a Google search using "bootloader" or "booting".

For your next question, please start a new thread rather than unearthing an old one.


All times are GMT -5. The time now is 03:12 PM.