LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 08-05-2009, 05:27 AM   #1
Elyem
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Rep: Reputation: 0
Unhappy GRUB error 22


I found a previous thread on this subject but every suggestion either didn't work or I didn't know how to make it work. The scenario is this. A while back a buddy installed Ubuntu on my old laptop which is running Windows XP media center edition. I was deleting that partition and was downloading a program that would reintegrate that disk space back into XP when my computer suddenly died out of the blue. Now when I boot up I get a GRUB Error 22. I still have the Ubuntu disk and I have a Windows Bootdisk from Bootdisk.com that just brings up a command line A:/. Feels like I have all the ducks I just need some help getting them in a row. Not a novice when it comes to computers but I think I've reached my Google limit. Help resolving this would be great.
 
Old 08-05-2009, 06:31 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
This surely has been solved here at LQ. You just need to refine your search to find what exactly you want.

You need to boot from your XP disk and then enter rescue mode and on the prompt type

fixmbr

That will bring back your xp boot loader and you will be able to boot it.
 
Old 08-05-2009, 06:55 AM   #3
srinivasmiriyalu
Member
 
Registered: Mar 2009
Location: Banglore-India
Distribution: RHEL5.2,Fedora9&11,Opensolaris 5.11,SXDE 1/08,CentOS-5.3,Ubuntu 8.10
Posts: 149

Rep: Reputation: 16
GRUB error 22

Recently I also faced same problem and By using xp bootable cd i can able to boot into windows by using two commands and as linuxlover.chaitanya said earlier i want to add one more command to this ,after typing the command
FIXMBR we need to type FIXBOOT then everything goes fine(I did same thing..Works Fine)
 
Old 08-05-2009, 07:08 AM   #4
Elyem
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by linuxlover.chaitanya View Post
This surely has been solved here at LQ. You just need to refine your search to find what exactly you want.

You need to boot from your XP disk and then enter rescue mode and on the prompt type

fixmbr

That will bring back your xp boot loader and you will be able to boot it.
Again I'm not trying to make any member restate anything. Like I said, I have found a previous thread on this exact subject but either the suggestions didn't work or I am just not knowledgeable enough to make them work. I can follow instructions well and if you have the experience to help fix this I would appreciate it greatly.

linuxlover.chaitanya, srinivasmiriyalu> BY XP disk do you mean the Bootdisk I bought or a full version of Windows XP? When I run the Bootdisk from Bootdisk.com I get four options that bring up a DOS like command screen with just "A:\>". If I type in fixmbr it says its a bad command or file name. I've never worked in DOS so if a .exe is needed or anything else, assume I'm a novice and throw the extra instruction in. Thanks again for your replies guys.
 
Old 08-05-2009, 07:28 AM   #5
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
Do you have the install CD of XP ?
Start you're computer with the CD in the CD drive so that will start up from the CD drive .
Press the keys as prompted until you reach the setup mode press the R to get the the repair mode then type fixmbr
 
Old 08-05-2009, 07:42 AM   #6
jkzfixme
Member
 
Registered: Sep 2006
Location: Orange County, NY
Distribution: Ubuntu, Solaris, Android
Posts: 329
Blog Entries: 21

Rep: Reputation: 52
you can use the boot disk
Quote:
fdisk \mbr
Regards,
JKZfixme
 
Old 08-05-2009, 08:08 AM   #7
Elyem
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Original Poster
Rep: Reputation: 0
ronlau9> I don't. Google results say I could create one using a computer currently running XP with nero. Any way around this?


jkzfixme> Using the bootdisk from bootdisk.com it brings me to A:\> I typed in fdisk \mbr and it says "Parameter format not correct - \mbr". If I just type fdisk it gives me a message "Your computer has NTFS partitions which may require large drive support" and goes on to ask "Should NTFS partitions on all drives be treated as large (Y / N)? Then it gives 4 options:
1.Create DOS partition
2.Set active partition
3.Delete partition or logical DOS drive
4.Display partition information \

If I'm typing something wrong just let me know. I would think I would be able to use the Bootdisk from Bootdisk.com as it was recommended in the last forum to help get Windows Xp going. Like I said guys major newbie but I can follow instructions. I just want Windows to start so I can finish unpartitioning the HD.
 
Old 08-05-2009, 08:55 AM   #8
jkzfixme
Member
 
Registered: Sep 2006
Location: Orange County, NY
Distribution: Ubuntu, Solaris, Android
Posts: 329
Blog Entries: 21

Rep: Reputation: 52
Sorry Eleym i meant
Quote:
fdisk /mbr
my bad will also send you an email

Regards,
JKZfixme
 
Old 08-05-2009, 04:53 PM   #9
Elyem
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jkzfixme View Post
Sorry Eleym i meant my bad will also send you an email

Regards,
JKZfixme
It pauses for a moment, then goes down a step to another A:\> .Thanks for the update anyway. If you have any other ideas let me know.
 
Old 08-05-2009, 05:21 PM   #10
Elyem
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for the help so far guys but it didn't work.


Since I typed in fdisk /mbr now when it starts up instead of a GRUB error now it says "Missing operating system". I've tried using a supergrubdisk but an error occurs when its running a fsck check. It asks me to perform one manually in safe mode but I have no idea how. Also at the first screen of the supergrubdisk the only available operating system to select is "First Kernel and Initrd". Does this mean XP is lost?

Last edited by Elyem; 08-05-2009 at 06:24 PM.
 
Old 08-06-2009, 01:18 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Ok you said that you deleted Linux partitions. But if it says missing OS then you could be just sure Xp is there with live distribution.

Boot with Ubuntu disk. Open up a terminal and then type sudo fdisk -l.
And then post the output.
 
Old 08-06-2009, 03:25 AM   #12
Elyem
LQ Newbie
 
Registered: Aug 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by linuxlover.chaitanya View Post
Ok you said that you deleted Linux partitions. But if it says missing OS then you could be just sure Xp is there with live distribution.

with Ubuntu disk. Open up a terminal and then type sudo fdisk -l.
And then post the output.
Disk /dev/sda: 60.0 GB, 60011642880
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks ID System
/dev/sda1 1 8 64228+ de Dell Utility
/dev/sda2 9 3749 30049582+ 7 HPFS/NTFS
/dev/sda3 * 3750 7296 28491277+ c W95 FAT32 (LBA)



Let me know.

Last edited by Elyem; 08-06-2009 at 03:41 AM.
 
Old 08-06-2009, 04:52 AM   #13
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Your windows partitions seem to be there.
You need a bootable windows xp installable media. Then you can follow the procedure mentioned above.
 
Old 08-06-2009, 06:03 AM   #14
interesting
LQ Newbie
 
Registered: Aug 2009
Posts: 2

Rep: Reputation: 0
How to fix grub

The problem here is that grub can no longer locate your partition with the operating system as you have changed it. The easiet thing to do is fix grub. I hope you still have the ubuntu live CD you used for the install as you need this.

Insert the live CD and boot into Unbuntu. You may need to set the cdrom as your first boot device for this. It is different on different computers but on my Dell you press F12 to get a list of bootable devices.

Once in Ubuntu open a terminal window (accessories>terminal) and follow these instructions to repair grub:

Type sudo grub

Enter your password

Type find /boot/grub/stage1

You will get an output something like (hd0,0)

Type root (hd0,0)

Type setup (hd0,0)

Type quit

Shutdown and restart. Remove the cd when prompted.

Grub should now load as normal

If you still have both operating systems installed when you ask to find stage 1 you may get more than 1 choice. If you can remeber which partition winxp and ubuntu where on you can choose the appropriate one. For information sda1 in grub language is (hd0,0) sda3 would be (hd0,2) and so on. If before you installed ubuntu you only had one partition it is most likely winxp will be on (hd0,0)
 
Old 08-06-2009, 07:02 AM   #15
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
OP has already deleted Ubuntu and hence no need for Grub to be in system. He/she needs to recover the windows boot loader instead to use xp.
 
  


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
install kubuntu 8.10 with lilo rather than grub (because of grub error 18) dukeinlondon Ubuntu 7 12-27-2008 07:53 PM
Loading Grub 1.5 Please Wait...... Grub Failed Error 18 2words4uready Linux - Newbie 5 06-12-2008 06:37 PM
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 11:29 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 09:33 AM


All times are GMT -5. The time now is 10:35 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