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.
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.
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?
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.
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.
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.
cloopO No idea what that is.
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.
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.
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.
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.
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.
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
What Distro would you use?
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 :) :p and I know that you use it.
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
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).
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).
|All times are GMT -5. The time now is 10:14 AM.|