LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB error 22 (https://www.linuxquestions.org/questions/linux-newbie-8/grub-error-22-a-745236/)

Elyem 08-05-2009 04:27 AM

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.

linuxlover.chaitanya 08-05-2009 05:31 AM

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.

srinivasmiriyalu 08-05-2009 05:55 AM

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)

Elyem 08-05-2009 06:08 AM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3632052)
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.

ronlau9 08-05-2009 06:28 AM

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

jkzfixme 08-05-2009 06:42 AM

you can use the boot disk
Quote:

fdisk \mbr
Regards,
JKZfixme

Elyem 08-05-2009 07:08 AM

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.

jkzfixme 08-05-2009 07:55 AM

Sorry Eleym i meant
Quote:

fdisk /mbr
my bad will also send you an email

Regards,
JKZfixme

Elyem 08-05-2009 03:53 PM

Quote:

Originally Posted by jkzfixme (Post 3632193)
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.

Elyem 08-05-2009 04:21 PM

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?

linuxlover.chaitanya 08-06-2009 12:18 AM

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.

Elyem 08-06-2009 02:25 AM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3633181)
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.

linuxlover.chaitanya 08-06-2009 03:52 AM

Your windows partitions seem to be there.
You need a bootable windows xp installable media. Then you can follow the procedure mentioned above.

interesting 08-06-2009 05:03 AM

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)

linuxlover.chaitanya 08-06-2009 06:02 AM

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.

jkzfixme 08-06-2009 09:34 AM

I concur with chaitanya ,now that the dos master boot record is restored you just need to make the XP partition the active partition via fdisk and it should boot up as long as it is was working previously.

Regards,
JKZfixme

Elyem 08-06-2009 08:55 PM

Quote:

Originally Posted by jkzfixme (Post 3633667)
I concur with chaitanya ,now that the dos master record is restored you just need to make the XP the active via fdisk and it should up as long as it is was working previously.

Regards,
JKZfixme

Guys I called Dell yesterday and had them send me all new replacement disks. They will be here tomorrow and from there I'll go off what was recommended by Chaitanya but I do appreciate the response from "interesting". I don't know if you guys can tell from the info I posted earlier but once Xp is restored I would guess the partitions are still going to be there separate and need to be unpartitioned? Any opinions on a software that does this best in XP?

Fred Caro 08-07-2009 04:11 AM

grub error 22
 
You could try supergrub or systemrescue. There is also a floppy disk available on the net to fix missing windows MBR, search for something like 'ntldr' missing or corrupt. It's in another language but intuative.

Fred.

interesting 08-07-2009 04:30 AM

Hoe to fix grub
 
If you follow my instructions you will be able to boot windows again from the grub menu.

Once xp has loaded simply remove grub from the add / remove programs list.

Sometimes you have to think out of the box.

The problem isn't with the windows boot loader the problem is with grub.

linuxlover.chaitanya 08-07-2009 06:39 AM

Quote:

Originally Posted by interesting (Post 3634556)
If you follow my instructions you will be able to boot windows again from the grub menu.

Once xp has loaded simply remove grub from the add / remove programs list.

Sometimes you have to think out of the box.

The problem isn't with the windows boot loader the problem is with grub.

Could you elaborate on that? How are you going to remove grub from add remove programs when it is installed in Ubuntu and that now Ubuntu does not exist?
Another way is to install super grub or some third party boot manager that are available.

Elyem 08-07-2009 04:31 PM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3634655)
Could you elaborate on that? How are you going to grub from add remove when it is installed in and that now does not exist?
Another way is to install super grub or some third party manager that are available.

Alright to anyone I sent a mail about the D:\WINDOWS prompt, I'm a super noob. Instead of just asking questions I went online and found out it was the right prompt for Windows XP.

After typing in Fixmbr on startup it says "NTLDR is missing, Press any key to restart"

I found online that using these commands can restore NTLDR but I copied from e:/ to d:/ and the Error still comes up.

copy e:\i386\ntldr c:\ copy e:\i386\ntdetect.com c:\

I tried copying from e:\ to c:\ but the file ntdetect.com command could not be copied. It goes to the Dell screen, blanks out, then goes back to the Dell screen and repeats. AAAAHHH!


Anyone know a way to just blank everything out and start fresh with Windows XP with all of the partitions together?

Elyem 08-08-2009 02:41 AM

I'm sure you guys already knew how, but I learned how to reformat and reinstall XP. The partitions were also recombined in the process. Thanks to everyone who helped. I know dealing with noobs can be trying but what you guys know as basics can really help other people out there and the fact that you would donate your time to help makes everyone of you bada$$.


All times are GMT -5. The time now is 09:21 AM.