LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB Error 22 while trying to install windows XP Home (https://www.linuxquestions.org/questions/linux-newbie-8/grub-error-22-while-trying-to-install-windows-xp-home-822133/)

binson12 07-25-2010 10:26 PM

GRUB Error 22 while trying to install windows XP Home
 
I know its not a Linux program but my brother had Linux on his HP DV9000 Laptop, Well he wants to go back to windows XP home edition or what ever, he played around with it and messed something up and when you boot it, it comes up with a GRUB error 22, so I try to boot it with the windows XP CD and when i try to install windows or repair it tells me there is no hard disk... which seems kinda stupid considering your PC needs a hard disk to boot up, so in the BIOS menu i did the hard disk testing and what not and it came back 100%... so yea, I'm all out of options here and don't know how to fix it...

Brains 07-26-2010 01:46 AM

It sounds like the partition table is hooped and there are no partitions showing. The Windows installer does not have issues creating a partition when you highlight the free space and tell it to install there.
The drive appears to be good as Grub showed up, which is installed on the drive.
Sounds like the issue lies within the XP installation CD, most likely not an original. If the computer came with "Windows XP Home or whatever", there should be a colorful sticker with the Windows XP Home or whatever key. You can use any other "Windows XP Home or whatever" CD you can find on the net or at the neighbor's place to reinstall and change the product key to the original on the sticker and activate.
But watch out, some of those available on the net are buggy.

jefro 07-26-2010 03:34 PM

22 is it can't find what the configuration file says it should find.

Use find from grub command line maybe?


Could use xp disk to put a generic mbr on it too.

Kenny_Strawn 07-26-2010 06:32 PM

From the XP CD, go into the recovery console and run the following command, seeing if it helps:

Code:

X:\Sources> bootrec /fixmbr C:\

yancek 07-26-2010 06:33 PM

If you have not resolved this problem, the Grub error 22 is:

No such partition
This error is returned if a partition is requested in the device part of a device- or full file name which isn't on the selected disk.

The "playing around" your brother did involved messing up the boot files for Grub. Deleting or overwriting the Ubuntu partition could explain it. Grub puts a file in the master boot record which points to its remaining files on the Ubuntu partition. If the files on the partition are gone, that is the message one would expect to get.

If he wants to re-install xp, I would suggest he search google for repair xp master boot record. Should be able to do this with his xp installation CD? Never used xp myself so can't verify.

Kenny_Strawn 07-26-2010 06:54 PM

I know a Vista or 7 installation DVD will automatically restore the MBR by overwriting it. I'm not so sure about XP.

I also know that GParted should work for that occasion as well:

Just run GParted from any Linux Live CD (Ubuntu should be fine) and create a new partition table (a DOS table for sure). Then, insert the XP disk and reinstall XP. It should work then.

saikee 07-26-2010 07:10 PM

Why not ask Grub to tell you if there is a disk there.

When you see a Grub menu don't select a system to boot. Just press the "c" key to get a Grub prompt. If you have an error number then you should have Grub1. You can ask Grub1 to list the partitions of the first disk by command
Code:

geometry (hd0)
Since you have Grub that means you must have a hard disk. In the "geometry (hd0)" statement the first partition listed to have a partition Type No 7, for ntfs filing system, is normally your MS Windows. Say it is in partition (hd0,1) then you can fire it up manually in a Grub prompt by
Code:

root (hd0,1)
chainloader +1
boot


Brains 07-26-2010 08:09 PM

For all who posted:

The OP says his brother is trying to install Windows XP Home or whatever. But if you read deeper, you will find, that is the last time the brother is mentioned. The rest is, "I, I, I", am trying to install whatever XP edition I can get on here.
Do you really want him to succeed that bad?
Yes... it makes sense you would not necessarily know which edition the brother at another location is trying to install. But if he is the one doing the installation, shouldn't he know?
Does it actually take a genius to see that something smells, especially when the OP appears to have been brushed off????

Kenny_Strawn 07-26-2010 10:19 PM

Quote:

Originally Posted by saikee (Post 4046283)
Why not ask Grub to tell you if there is a disk there.

When you see a Grub menu don't select a system to boot. Just press the "c" key to get a Grub prompt. If you have an error number then you should have Grub1. You can ask Grub1 to list the partitions of the first disk by command
Code:

geometry (hd0)
Since you have Grub that means you must have a hard disk. In the "geometry (hd0)" statement the first partition listed to have a partition Type No 7, for ntfs filing system, is normally your MS Windows. Say it is in partition (hd0,1) then you can fire it up manually in a Grub prompt by
Code:

root (hd0,1)
chainloader +1
boot


With an Error 22 there is no prompt. It's just an error and a hang. Trust me, I have experienced such an error by deleting a Linux partition using Windows Disk Management (and luckily I was able to reinstall Windows 7 [RC at the time] and the problem was fixed).

I now, however, have Linux on both of my systems, and ain't goin' back!

Wim Sturkenboom 07-26-2010 11:10 PM

Check the BIOS; there is somewhere a setting related to harddisks and the term your looking for is something like AHCI (at least that was it on a Dell laptop if I remember correctly). You have to change that setting to 'the other' option.

It is vague, I know, but I can not remember the exact details. Somebody came to me once with a Dell laptop with Vista and wanted to downgrade to XP and I also got the error that XP could not find a HD; the above solved it.

Someone with more fresh knowledge about teh option that I'm refering to can jump in.

saikee 07-27-2010 02:21 AM

Kenny_Strawn,

My post was based on the statement

Quote:

when you boot it, it comes up with a GRUB error 22
In your case Grub did not work because it could not post the splash screen image after you deleted the relevant partition, otherwise Grub can still function after it has been nuked as I reported in this thread.

It is possible that the OP has done the same as you had but on balance I felt there is a chance my advice may be useful if he still has the option to boot an operating system by a workable Grub.

For your information Xp has its own MBR which is compatible with those from Dos up to Xp restorable either by a Dos floppy with fdisk.exe inside or an Win2k/Xp installation CD running "fixmbr" at the recovery console. Vista and Win7 have a new MBR of their own.

Brains 07-28-2010 03:11 AM

Quote:

Originally Posted by Wim Sturkenboom (Post 4046418)
Check the BIOS; there is somewhere a setting related to harddisks and the term your looking for is something like AHCI (at least that was it on a Dell laptop if I remember correctly). You have to change that setting to 'the other' option.

The problem is most likely related to F6 key.

Wim Sturkenboom 07-28-2010 04:35 AM

Sorry Brains, but what is that F6 key? A grub 'thing' or a bios 'thing'?

saikee 07-28-2010 05:18 AM

I think Brians meant using the PC's hot key to select a media to boot. It is just Bios hot key.

Diferent manufactuers can have different hot keys and some do not provide any.

As far as I know both Grub1 and Grub2 do not use hot keys.

imagine_me2 07-28-2010 01:22 PM

If you have something called "native SATA mode" in BIOS setting disable it. Then boot your Windows XP cd.

Regards.


All times are GMT -5. The time now is 11:21 PM.