LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-30-2005, 04:47 PM   #1
Sebastian Naitsabes
LQ Newbie
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu
Posts: 25

Rep: Reputation: 15
Angry Grub Error 21


The other night I was using XP and left the computer logged into XP over night as I slept. That evening there had been a power cut. About 9am my Dad and four year old brother let the dog out of my bed room. He had a go, because I had left the PC on over night. Anyway I dosed off again and woke up properly in the afternoon.

After getting out of bed and going to the PC I noticed that Grub was up, but with a message saying that it had tried to load Grub stage 1.5, but it had a error message. Yep something about some Error 21. I was thinking that's strange why was it on that I had left it on XP. Maybe there was another power cut in the night and it had re booted my PC.

In the past I have had problems with Grub, but I just re installed Fedora Core 2 to get rid of them. Also I have had to re install Grub before, because of Windows going over the MBR. Yes I found a very useful page that explained how to do that and solve other Grub problems:

,but this forum won't let me put it in my first post.

Anyway a few weeks or so ago I upgraded from Fedora Core 2 to Fedora Core 4. Yes downloaded the ISO's for FC4 burnt to CD's and let it do the upgrade from CD thing. As in not removing FC2 from the hard drive and starting from scratch with FC4. No problems with upgrading Grub it all worked fine.

Ok as I was saying something went wrong with Grub I have no idea why, because it was all working fine. I tried to get it working again by allowing Windows to go over the MBR resulting in it removing Grub and then I re installed Grub. After allowing Windows to go over the MBR XP would load up ,but after re installing Grub well Grub went back to how it was before with the Error 21 message. Then I allowed Windows to go over the MBR again so I could boot up Windows.

What I believe has happened is that the /boot partion or whatever it is has for some reason or reasons, become corrupted or some file in it and that is why Grub won't work properly. However I am to much of a Linux newbie and Grub newbie to be able to fix the problem or problems without help and that is why I started this topic.

I got Windows on the first hard drive and Linux on the second. What I was thinking is that I could format the Linux hard drive and then re install FC4. Yes that will solve my problem, but I got loads of data on FC4 that I want to keep that I would have to burn to CD first. That is not a problem I can boot up Knoppix 3.6 and burn it to CD using K3B. Infact that it was I did that time not that long ago when XP screwed up big time and so I could not access my files on it.

Sure I could format and re install FC4, but it took like four hours to upgrade all the packages when I did the upgrade from FC2 to FC4. Also it will take about the same amount of time to install everything all the packages from the FC4 discs on a clean install. I don't want to do that. Also I did all this customizing to Gnome and have got it nearly set up to how I want it, but there is stuff I don't know how to change. Anyway I will set up a topic about that once I got Grub working again so I can boot up both XP and FC4.

I also thought formatting and re installing sure that will solve the problem, but it is rather time consuming and it is a rather easy way out, but what if I get problems with Grub like this again. Does that mean I am going to format Linux every time and re install? That would be stupid to do that I reckon.

I thought about joining this forum the other week or whenever it was and now I have finally done so. So I hope that you guys will be able to help me as soon as possible with Grub. Yes when I typed this I was using XP and well XP sucks.

Last edited by Sebastian Naitsabes; 06-30-2005 at 05:03 PM.
 
Old 06-30-2005, 05:13 PM   #2
aikidoist72
Member
 
Registered: Jan 2005
Location: Australia
Distribution: Slackware Archlinux FreeBSD
Posts: 218

Rep: Reputation: 30
Hi Sebastian

Error 21 means "Can not find disk". I would need a little more info to troubleshoot. What is your disk layout and could you post your /boot/grub/menu.1st file to have a look. Also what file types are you using? Ext3, Reiserfs etc.

Cheers
 
Old 06-30-2005, 05:20 PM   #3
Sebastian Naitsabes
LQ Newbie
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
Sure f you tell me how to do all of that. I do not have the normal Grub menu at all. All that comes up is what I mentioned in my other post. Without a working Grub I cannot get into my Fedora Core 4 at all. I could find my Knoppix disk and put that in and that will be of help.

Cannot find disk do you mean the hard disk?
 
Old 06-30-2005, 05:25 PM   #4
aikidoist72
Member
 
Registered: Jan 2005
Location: Australia
Distribution: Slackware Archlinux FreeBSD
Posts: 218

Rep: Reputation: 30
Quote:
Cannot find disk do you mean the hard disk?
Yes, I would assume you only have the one hard drive. That is why Xp is affecting your linux installation.

Quote:
I could find my Knoppix disk and put that in and that will be of help
That would be an excellent idea. You can even post your reply using the Knoppix cd.
 
Old 06-30-2005, 05:38 PM   #5
Sebastian Naitsabes
LQ Newbie
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
No this PC has two hard disks. Windows on the first hard disk and Linux on the second hard disk. If Grub can't find the second hard disk there are two reasons why that might be.

1. Maybe that hard disk screwed up. It happended before to one of our old ones. However Windows is on the older hard disk and Linux is on the newer hard disk.

2. My Dad went into my PC and removed that second hard disk, but I don't think he has done that.

Ok well I will find the Knoppix CD and boot it up and it should mount the Linux partitions. If it doesn't well maybe the hard disk is not working or it has been removed. If it works which it probably will do I will post what it says in /etc/fstab here.

I also got the Gnoppix Live CD and I been using it recently as in after Grub stopped doing it's thing. However Gnoppix didn't seem to of been of much help. I also have the Morphix Live CD that worked fine before on this PC, but not anymore it seems.

Last edited by Sebastian Naitsabes; 06-30-2005 at 05:44 PM.
 
Old 06-30-2005, 07:25 PM   #6
Sebastian Naitsabes
LQ Newbie
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
Couldn't find Knoppix it seems, but I booted up Gnoppix again. That second hard disk with Linux yes it is still in there and working. Anyway I went into the Grub folder, and below are the list of files that came up.

device.map
e2fs_stage1_5
fat_stage1_5
ffs_stage1_5
grub.conf
iso9660_stage1_5
jfs_stage1_5
menu.Ist
minix_stage1_5
reiserfs_stage1_5
splash.xpm.gz
stage1
stage2
ufs2_stage1_5
vstafs_stage1_5
xfs_stage1_5

I cannot access the menu.Ist, because I am not root. Surely there is a way to become root for those files so I can open them and if need be to edit and save the changes whilst running from this Live CD?

OK so carn't get into /etc/fstab on Gnoppix it seems, but this is what came up in mnt.
cdrom
cloopO No idea what that is.
floppy
hd It is blank.
hda1 is the Windows partition.
hdb1 contains the Grub folder and that.
hdb2 contains the mnt folder and that.
main contains nothing.
main_ro contains nothing.
mainmod contains nothing.
mini contains nothing.
minimod contains nothing.
sda1 that's my USB stick.
test contains nothing.
usb is the USB stick.

Last edited by Sebastian Naitsabes; 06-30-2005 at 07:42 PM.
 
Old 06-30-2005, 08:23 PM   #7
aikidoist72
Member
 
Registered: Jan 2005
Location: Australia
Distribution: Slackware Archlinux FreeBSD
Posts: 218

Rep: Reputation: 30
This is a little confusing.....but lets persist.

Check your bios and make sure that both hard drives are recognized. This is done usually by hitting the delete key as your system starts up. Your GRUB settings have to be correct as you could boot into FC4 before and I assume you haven't updated GRUB (ie overwritten the file) or manually changed the file.

If both HD's a recognized, try booting up again. Can you get to the GRUB menu or does the error come before that? If the error is before that, your MBR is corrupt which may indicate a faulty HDA

A solution. If you can reinstall GRUB to the second HD and boot your second HD first through your bios settings. This will allow you to put the bootloader on the newer HD and save having this problem. Without seeing your files, it makes things harder to troubleshoot.

Cheers
 
Old 07-01-2005, 10:06 AM   #8
Sebastian Naitsabes
LQ Newbie
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks for trying to help me aikidoist72, but now I am in even more of a mess then I was before. Infact I am in such a mess that I cannot access the Windows partition anymore and will probably have to format the Windows hard drive. Well this PC needed to be re formated anyway to install XP Pro, because I used Home on it and well for this company I will be working for I need Pro. Yes, because Home does not have the ISS thingey.

Maybe it screwing up like this is a sign to say it is time to format and install XP Pro. Of course it isan't I am just trying to look on the bright side. I did something stupid and now carn't get into the Windows Partition. Full story is below:

OK well yes it seems that the MBR is corrupted. Before I started again today to try and get Grub working I could boot up XP without any problems, but not Linux. I changed the boot sequence in the Bios. Even when I had it on first boot device CD Rom and the second and third CD Rom aswell, when I did not tell it to boot from a hard drive at all it would still boot up Windows.

I re installed Grub onto the first hard drive and second hard drive did the stuff in the bios. Anyway back it went to the Grub Error 21 message. Which appeared by the way straight after if it coudn't boot from CD.

I did the Fix MBR thing with the XP Home disc again, but this time well something went wrong. It did not just overwrite Grub with the boot loader. Nope now when I try and boot it comes up with Grub hard disk error message.

I feel so annoyed for messing around with it again. I feel like I should have just left it how it was and created a Grub boot CD. Yes CD not floppy, because for some reason this PC won't boot from floppy disks anymore.

OK well so I have probably lost some data on the Windows hard drive that I wanted to keep, because I cannot get into it with Gnoppix anymore.

Anyway as I have already mentioned XP Home needs to be formatted eventually anyway and XP Pro installed instead. Of course I do not have a Pro disk, but my Dad who I don't get on with has one. Yes he is very abusive towards me like 99% (well this is a slight exagration, but it is the majority) of the time. So I carn't exactly go up to him and explain what has happened which would explain why I want the XP Pro CD. He would just start being stupid and unpleasant again. Anyway he woudn't understand half of it or wouldn't listen. However I can explain all of this to my Mum who knows less about computers than him, but eventually she will listen and if I need that XP Pro disc she will help me get it off my Dad.

My Dad might want to install XP Pro himself on this computer and I will say something like this: NO it's my comp NOW (it is a former family PC) and I have formatted and re installed XP Home before plus I installed Linux. He does not know that I have formatted the hard disk before and re installed XP Home.

Last edited by Sebastian Naitsabes; 07-01-2005 at 10:15 AM.
 
Old 07-01-2005, 06:23 PM   #9
Sebastian Naitsabes
LQ Newbie
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
Smile Yay I just got XP to load up again!

Yay just got XP to load up again after doing the fixboot on the XP CD. Now what would be nice is if I could get the PC to boot from Grub installed on the second hard disk. First hard disk uses the first IDE cable and the second hard drive the second IDE cable I think. I have told it to boot from IDE 1 first and then IDE 0 in the bios, but that makes no difference at all. I thought I had Grub installed on the second hard drive, but I guess not. Or it booted from it when the Windows partition was not working or something.

Last edited by Sebastian Naitsabes; 07-01-2005 at 06:35 PM.
 
Old 07-01-2005, 07:12 PM   #10
aikidoist72
Member
 
Registered: Jan 2005
Location: Australia
Distribution: Slackware Archlinux FreeBSD
Posts: 218

Rep: Reputation: 30
Hey your doing well,

Might I suggest that if you were going to reinstall linux, that you repartition your drive (second one of course) so that you have a data partition on the end of the hard drive. On this you can store your personal files, packages you create, backups, mail etc. Also if you felt like trying a new distro, all your data is safe - just make sure you don't overwrite it during an install.

Example setup

hdb1 - ext3 /boot 100MB
hdb2 - reiserfs extended partition containing /, /var, /opt, /usr, /tmp sizes depends on distro
hdb3 - reiserfs /home
hdb4 - reiserfs /data

Also by mounting it as data, most people wont even want to look into it as it just looks scary and/or boring. Good hidy-hole if you get my drift.


Now by installing GRUB on the second hard drive, what you are doing is not touching the XP install at all, so if your linux HD is removed, and you change the BIOS boot order (IE boot from first HD) then you have a working platform straight away. Good if you upgrade your computer and move the HD to it.

Let me know if you have any questions ok

Cheers
 
Old 07-01-2005, 07:12 PM   #11
aikidoist72
Member
 
Registered: Jan 2005
Location: Australia
Distribution: Slackware Archlinux FreeBSD
Posts: 218

Rep: Reputation: 30
What Distro would you use?

Last edited by aikidoist72; 07-01-2005 at 07:14 PM.
 
Old 07-01-2005, 08:12 PM   #12
Sebastian Naitsabes
LQ Newbie
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
Thumbs down Won't boot from second hard disk first!

I have installed Grub again onto the second hard disk, but thing is the PC won't boot from it. Yep that's right it won't boot from it even though I seem to of told it to in the Bios. Maybe the IDE cables have more control of what hard disk get's booted then the Bios or something. As far as I know the Windows Hard Disk is set to be the primary hard disk and the Linux hard disk the sec slave. If this is the case this must be what it causing the problem.

I have been in the Bios looking at all kinds of stuff in there even changing a few things and then back to try stuff this was before I re installed Grub onto the second hard disk. So somehow I have to make the second hard disk the primary disk and the Windows the sec slave or something like that I suppouse. Then it will boot from the Linux hard disk first and not the Windows one as I want it to. How do I sort out this problem with which hard disk that it boots from first? Surely there must be some other settings in the Bios that I have to change to do this?

If it is not possible to get it to boot from the second hard drive first using the Bios. Then I assume that if the Linux hard drive was connected to the first IDE Cable and the Windows hard drive the second IDE Cable that would solve the problem. Although that would involve opening up the PC and changing stuff around and I don't know how to do that myself.

By the way at the moment if I was to get another distro I would get Ubuntu, because it is apparantlly a very good beginners distro. However in a few years once I know a lot more about Linux I want to get and use Slackware, because it is known as a hard distro as in a hard core geeks distro and I know that you use it.

Last edited by Sebastian Naitsabes; 07-01-2005 at 08:20 PM.
 
Old 07-03-2005, 07:44 AM   #13
Sebastian Naitsabes
LQ Newbie
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
Last night after changing a setting in the Bios I got the second hard disk to boot. Grub is on that hard disk yes, but I am experiencing problems with it. I have started a new thread dedicated to that: http://www.linuxquestions.org/questi...hreadid=339569

Last edited by Sebastian Naitsabes; 07-03-2005 at 07:47 AM.
 
Old 12-16-2005, 11:56 PM   #14
BreakDecks
LQ Newbie
 
Registered: Dec 2005
Posts: 1

Rep: Reputation: 0
Unusual Cause

I thought I was going to die! I tried everything to get my computer to boot up. I installed Ubuntu on an unused partition. I changed my CMOS settings, I did everything! Then I realized that when I had recently been adding a new component, I had removed my 2nd cooling fan. The fan taps into the same electrical cord as my Slave drive. The miniture cord that was supposed to lead to the fan was wrapped up under the computer, and the exposed terminals were pressed against the bottom (which is made of metal, and was shorting the connection). All that work, and I had to do was tug a wire. Anywho, just thought i'de throw in a story, but keep in mind, the problem you have may not be as easy (or hard) as sitting at your keyboard changing settings. Make sure nothing is interfearing with your hard disc(s).
 
Old 06-30-2007, 07:48 PM   #15
catelee2u
LQ Newbie
 
Registered: Jun 2007
Location: UK
Distribution: openSuSE10.2/Vector Linux
Posts: 1

Rep: Reputation: 0
Thankyou BreakDecks

Hi
I recently got error 21 also. What occurred was:
I was playing a game when my pc restarted (this happens occasionally so didn't think too much of it) but it restarted 3 times quickly in succession so I got worried and switched it off. I then heard a loud bang and got a sinking feeling in my stomach. After waiting a while because I was too scared to look it turned out that the power supply had blown out. I borrowed a power supply from my Son and fitted it and restarted the machine and it wouldn't go further than booting and giving me grub error 21. I came to this forum. I saw the posting that said to check the bios to see if it was recognising disks. It was showing my windows disk but not the Linux one. I was feeling like vomiting at this point when I read BreakDecks posting which said that it could be something simple and it suddenly dawned on me to check everything thoroughly...it was like a gut feeling. I went back inside and lo behold the drive wasn't plugged in doh! When we'd reconnected the power supply we forgot the drive (it's late and we're tired). I was thinking that the drive was toasted. Since we have had at least 3 really old hard drives go in this household in the last year it would have been about the last straw. I just wanted to post this in case it helps anyone else and to say thanks to BreakDecks for their posting which helped resolved the problem (I'd have found it eventually but it turned around a stressful evening a lot quicker than it could have done).

Thankyou,
Catherine
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 10:29 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM
GRUB bootloader spits out "GRUB hard disk error" Crampedson Linux - Software 2 01-26-2005 06:34 PM
GRUB Section2 load error, partition error. Ryle Linux - General 1 06-27-2004 02:55 PM
GRUB error? DriveReady SeekComplete DataRequest Error sth Linux - Hardware 3 02-26-2003 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration