grub error 21/22

grobyc511

New Member
hey guys.
i recently installed ubuntu linux on my computer's slave harddrive. i wanted to uninstall it so i deleted the partition (mistake #1). then i try to reboot the computer and i get grub error 21. ok, well i mess around in bios(mistake #2?) with boot options and whatnot, try rebooting several times and get grub error 22. i researched a bit and found out what these errors mean... from the information ive gathered, i simply need to insert the windows xp disc and do some things... well, apparantly when i bought the computer, i never got one. so that leads me to my question....
is there any other way to fix this problem without the cd? if not, what else can i do?
thanks a lot in advance
 
If you installed Grub into the master boot record(MBR) of the host drive the one thing that might help there is a download of the 98SE boot floppy image to make up a 98 startup disk. You can download that from http://www.bootdisk.com Once you boot from the floppy you type "fdisk /mbr" at the dos prompt. The n you set the boot order correct again to host drive to see if the mbr has been corrected on the restart.

With GPart you can easily remove the Linux partition and use the Disk Management to create and format a new NTFS partition on the 2nd there if you are not going to run Linux again. Gpart can also create the new partition after deletion of the existing one. But you would still the Disk Management to format it to the NTSF type.
 
thanks for your quick reply pceye.
so basically what i would be doing is creating my own bootdisk (just in win98)? and this would work for reconfiguring xp home?
i did not manually install grub into the MBR... could this have been done when i installed linux on the 2nd hard drive?
i believe the boot order is correct, however. it used to bring me to the OS boot selection screen. i can still enter bios.
With GPart you can easily remove the Linux partition and use the Disk Management to create and format a new NTFS partition on the 2nd there if you are not going to run Linux again. Gpart can also create the new partition after deletion of the existing one. But you would still the Disk Management to format it to the NTSF type.
i already deleted the linux partition (by just doing 'delete partition' in disk management).
once i run the win98 floppy bootdisk and correct the MBR with "fdisk /mbr" at the dos prompt, will i be able to boot winxp again?
thanks a lot
 
ok lets add to the confusion...
my laptop (which i'm on now) does not have a floppy drive. so creating a floppy boot disc is not possible. can i just put the boot files you (pceye) linked me to on a cd? i know my computer is able to boot from the cd drive.
also, there are files on the 2nd hard drive that i want to preserve. i split the harddrive in half.... half for linux and half as a shared drive for my network. can i fix the linux problem and still keep the files on the other partition?
 
You can burn the updated fdisk along with the 98 files onto a cd-r. I have both here already for floppy or cd booting. You simply download the files for the floppy into a temp folder with nothing else there and then burn to disk.

If the mbr was uneffected with the distro being installed to the second drive. As far as the Grub error message that was due to having a mbr on the second if you were set to auto load the distro when you booted from the second not first drive. Have you changed the boot order back to the primary for XP to load?
 
i believe that the 2nd harddrive had auto load on. i realize that error now.
yes the boot order is: CD-drive, 1st HD (with XP). i never changed the boot order when i installed linux on the second hard drive... it always used to bring me to a selection screen with a 6 second countdown.
any particular reason you suggest using Win98? i see that there are also setups for later editions...
EDIT: ok, i burned a few separate discs but none of them worked. i used Roxio and made "data discs" (could this be the reason they didnt work?)... i tried:
CD1: the Win98se startup file in a folder
CD2: the Win98se startup file without a folder (just the file).
Then i tried downloading the Winxp home setup from the microsoft website... i downloaded the .exe and and launched it but whne the command prompt came up and asked for a drive letter, when i hit any key, the prompt would close. I didnt try burning the file straight to a cd.
Currently im getting error 22.
 
Last edited:
OK so heres the deal... i got the cd with win98se to be bootable (thank you CDburnerXP). I got to the command prompt and typed in "fdisk /mbr". this is where my new problem starts... afterwards, i get an error saying: "error reading system area- cannont continue." I read up on this and apparantly it means theres a hardware failure. great. any hope you guys can provide me or am i going to have to replace the hd and OS?
i noticed that the command prompt is using "A:\>". why A: i dont know. The disk isnt in my A: drive... could this be the reason it cant read the system area? (please say yes, and then provide me with a way to fix it).
thanks for getting me this far. any information you all can provide will be very helpful.
EDIT: Ok i changed the dos prompt to C: (i dont know why i forgot to do this...) and still got the "error reading system area". Then i tried F: (the HD that linux was installed on) and it tells me the device is not ready. but it recognizes it (i.e. it lets me use this as the DOS path). any suggestions?
If you can't tell, this is taking over my life because i really dont want my mom to find out.
 
Last edited:
The reason you first see the A prompt is simple. The files you downloaded were intended for a 3 1/2" floppy that uses the A drive letter designation. Have you reassigned the primary hard drive as the first device in the boot order? The reason you are seeing the "error reading system area" is due to going further then instructed. Once you entered the "fdisk /mbr" that was all you had to do there.

From that point you simply change the boot order to see the XP hard drive as the first boot device. To insure that is the only device booted from I generally disable all others. From the dos prompt you can not access an NTFS partition like the one XP is installed on unless you load NTFS for Dos. That allows access to NT 4.0, 2000, and XP NTFS partitions. The idea of using the fdisk utility is to repair the master boot record and now boot XP.
 
so you're saying all i have to do is now set the boot order to boot from the hd that winxp is installed on? i'll try that now...

EDIT: ack. i cant seem to get this working. i use the cd bootdisc to enter in "C:\>fdisk /mbr". I then get the "error reading system area." then i tried rebooting, this time changing the boot order to only have the winxp hd selected. it then returns the same old Errorr 22.
is there anything i'm doing wrong?
 
Last edited:
Did you alter the mbr when installing the Linux distro? The thread seen on one Linux forum saw results using the "fdisk /mbr" command seen at http://www.linuxquestions.org/questions/showthread.php?t=371839

If Grub was installed into the XP mbr it is now looking to load a file previously on the Linux partition. The alternate method to see Window load normally again would be to edit the "boot.ini" file usually hidden at the root of C(XP drive assigned letter). If an entry was edited in when installing the Grub loader that would have to be removed.

The one thing that might get XP up and running for that is called Gag. It's a graphical OS loader that detects and loads all detected operating systems by choosing from a list of buttons. http://gag.sourceforge.net/download.html
Once you have this installed onto a floppy after extracting the files from the zip file the quick installation gives you the option to go into the setup menu, boot again from the prepared floppy made for this, or load the default OS after assigning it a name.

With Windows running you go to the folder options in Windows Explorer first to select the views tab and uncheck hidden sysem files. Right click on the boot.ini file to uncheck the read only box and then use a text editer like notepad to open it up. This is the way it should look.

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdetect
 
i did not manually alter the MBR when i installed linux. could this possibly have happened automatically?
let me recap... i installed linux on my 2nd HD, disk F: (inserted live cd, linux opened, i clicked install. it installed it on the allocated on drive F). this was my first time installing another OS. i didn't touch drive C:. i then deleted the partitions created by linux on the 2nd harddrive through Window's XP Disc management. Then, i tried rebooting and got grub errors. i changed the boot order around but eventually set it back to the way i had it (DVD-drive, disk C). I never put disk F: in the boot order in bios... it always used to bring me to a black and white selection screen. then i made a bootdisc from a Win98se download. this worked on my computer, bringing me to the DOS prompt. i entered "fdisk /mbr". it recognized the command but then returned "error reading system area". i tried rebooting xp after i entered "fdisk/ mbr" but still got grub error. i am now currently getting error 22. i have not been able to enter Windows ever since i shut down the computer after deleting the linux partitions.
this Gag program looks hopeful... however, will it detect linux even though i deleted the partitions? right now, the disc is 1/2 file-storage and 1/2 unallocated (when i checked in xp right after i deleted the linux partitions).
I also have a question about Gag... after i unzipped it, the folder has different files AND an iso. i dont believe i can burn both files and an .iso onto 1 disk. i'm going to try burning the files onto 1 disk, and the .iso onto another. i'm only using CD-Rs because my laptop does not have a floppy drive.
thank you so much for your help so far.

EDIT!: it worked! i burned the .iso onto a CD-R first, because that seemed more promising. Once in GAG, i simply selected option 5 (uninstall GAG. This clears the MBR). apparantly, this did the trick and i rebooted without the CD in and XP booted up! I rebooted several times and its back to normal. Thank you so much for your help PC Eye... what can i get you? a nice bottle of scotch?? :D
 
Last edited:
Pesonally I don't consume any drinks. Sorry about that while appreciating the thought. :P From I am reading here you created the partitions intended for Linux with XP's disk management correct? Then you manually edited XP's boot loader along with that. First mistakes there. :confused: :eek: !!!

When going to create Linux partitions you have to create vfat not NTFS type partitions or use a Gnome Partitioning tool like GPart. That will create unformatted partitions which are then formatted by the intended OS with something like cfdisk or fdisk included on many newer distros in the cd iso image. :)

Presently I'm trying to create a Grub floppy from within Windows and not from a live for cd distro since it would use only that distro's information and not load others. A boot loader has to be installed onto a Linux partition in order to load from there. Lilio or Grub(much newer and easier) then load the distro through the commands entered at a Linux type of command prompt. If Grub or Lilo is finally installed into the Windows mbr a universal loader usually termed a Smart Boot Loader like Gag can then load either MS or Linux.
 
Back
Top