LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-25-2010, 10:26 PM   #1
binson12
LQ Newbie
 
Registered: Jul 2010
Posts: 1

Rep: Reputation: 0
Question 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...
 
Old 07-26-2010, 01:46 AM   #2
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 375

Rep: Reputation: 77
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.
 
Old 07-26-2010, 03:34 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 16,376

Rep: Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382Reputation: 2382
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.
 
Old 07-26-2010, 06:32 PM   #4
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

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

Code:
X:\Sources> bootrec /fixmbr C:\
 
Old 07-26-2010, 06:33 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,225

Rep: Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350Reputation: 1350
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.
 
Old 07-26-2010, 06:54 PM   #6
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 56
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.
 
Old 07-26-2010, 07:10 PM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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

Last edited by saikee; 07-26-2010 at 07:12 PM.
 
Old 07-26-2010, 08:09 PM   #8
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 375

Rep: Reputation: 77
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????
 
Old 07-26-2010, 10:19 PM   #9
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 56
Quote:
Originally Posted by saikee View Post
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!
 
Old 07-26-2010, 11:10 PM   #10
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
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.
 
Old 07-27-2010, 02:21 AM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.

Last edited by saikee; 07-27-2010 at 02:23 AM.
 
Old 07-28-2010, 03:11 AM   #12
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 375

Rep: Reputation: 77
Quote:
Originally Posted by Wim Sturkenboom View Post
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.
 
Old 07-28-2010, 04:35 AM   #13
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Sorry Brains, but what is that F6 key? A grub 'thing' or a bios 'thing'?
 
Old 07-28-2010, 05:18 AM   #14
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
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.
 
Old 07-28-2010, 01:22 PM   #15
imagine_me2
Member
 
Registered: Nov 2009
Location: Kolkata, India
Distribution: Fedora 11
Posts: 136

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

Regards.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB error on windows-only drive after ubuntu install on separate drive Pappou Linux - Newbie 4 03-22-2009 07:00 PM
install kubuntu 8.10 with lilo rather than grub (because of grub error 18) dukeinlondon Ubuntu 7 12-27-2008 06:53 PM
dual OS install windows XPx64 linux RH4 on two RAID 1 arrays - "Grub read error" sdlinwwin Linux - Software 1 03-27-2007 01:28 PM
grub-install (FC4 + xp home sp2) auspicious Linux - General 2 11-18-2005 10:39 PM
SuSE 9.1 and Windows Xp refuse to live in harmony: error loading windows through GRUB sanctumtacete Linux - Newbie 3 10-19-2004 07:47 AM


All times are GMT -5. The time now is 04:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration