Jump to content


[HOW TO] Get back your Windows XP Bootloader

  • Please log in to reply
81 replies to this topic

#61 EdLondon



  • Joined: 14-September 06

Posted 14 September 2006 - 14:46

Thanks! I'll try it later.

#62 Zebibos



  • Joined: 05-November 06

Posted 05 November 2006 - 12:09

Hello All.
I'v read all posts. Thank you for this.

I re-installed Windows XP on a much faster S-ATA hard drive.
A loader now came so I can choose from (new) Windows XP or (old) Windows XP.
I could still start the " old" Windows installation from the slower IDE drive, If I chose nothing the new Windows would boot.
It makes me think that there is a loader on the old C drive (IDE) to select to boot from the C drive (old windows) or the H drive (the new windows. (Correct?) Not pretty, but my machine's BIOS can not boot from S-ATA drive, only IDE.

Then I decided to install SUSE Linux on a partition of the new S-ATA drive. From then on I lived with GRUB. I could still start Windows by selecting " WIndows" in Grub, which threw me back to the previous boot menu. A bit tedious, but it worked.

I removed Suse Linux by repartitioning and formatting the S-ATA drive fraction it was installed on. But kept the old (fast) Windows partition & installation. (Correct?)
But now when I boot, it gives me the "GRUB error 22". And that's all...

How do get back the old Windows installation which I know to be still around? (Correct?)
(This message typed from SUSE liveCD) (All drives NTFS, so Win98 boot does not work)

Any help appreciated.
Greetings from the Netherlands.

#63 Zebibos



  • Joined: 05-November 06

Posted 05 November 2006 - 18:52

Here I am again with the follow up AND solution to my own post.

Use the Official WinXP to boot from. Select 'R' for recovery mode.
Use FIXMBR to restore the Master Boot Record.
So the solution is as posted on this forum.
From then on the first menu showed up, allowing me to boot the NEW or OLD WinXP.
Of course this is more logic than I thought it was, and it validates my assumption that there were, actually two different menus on two different disks. Saving the first one gave me back the second as well.

Oh well, it was a nice adventure, using floppies (I almost forgot how they looked like) on other machines, copying READNTFS, NTLDR, NTDETECT etc. on it and started messing around with BOOT.INI.
But now I know what MrBooter does (and does not) and gained some experience again.
In the mean time I updated my BIOS to see if I could direct boot from S-ATA drive (I cannot).

I may try Linux at another attempt, but I found out that I use WinXP with so incredibly many additions that Linux will never satisfy (I think).

#64 stylemessiah



  • Joined: 07-February 05

Posted 14 November 2006 - 05:23

Why lose it in the first place?

Its easy to avoid the entire unpleasantness when installing Linux onto a PC thats already hosts Windows, you just have to think about not upsetting precious windows, after all, its more finicky about its bootsector than Linux is.

Here's what i do:

Install linux.....wait until bootloader setup


* Modify setting if needed to put bootloader on root partition (the partition that hosts \)

Then AFTER bootloader is written and anytime BEFORE you complete installation reboot:

* Switch to a terminal window form the setup GUI, on SuSE 10.1 for example i use CRTL ALT + F5.

* Put a floppy disk in your floppy drive

* Make a folder under /mnt, e.g. md /mnt/floppy (on some linuces, you may need to make an entirely different folder than floppy, as one may already exist and not be able to be written to - dont ask why, ive seen it, in this case try md /mnt/fdtemp etc.)

* Mount your floppy disk, e.g. mount -t vfat /dev/fd0 /mnt/floppy

* Type: dd if=/dev/hdaX of=/mnt/floppy/bootsec.lnx bs=512 count=1

Where X = the root partition number (e.g. /dev/hda11 as it is on mine)

* Browse to the floppy and make sure the bootsec.lnx file is there.

* Complete linux install and reboot into Windows

* Copy bootsec.lnx to c:\

* Keep floppy in a safe place, or copy the bootsec.lnx to a safe place.

* Open boot.ini in notepad

* Add "XXXX Linux" = c:\bootsec.lnx in the OS list under windows.

Where XXXX is the name of the linux or something witty and anti MS

* Save the file.

* Enjoy.

A few seconds work and thinking intelligently means you can avoid the whole bootsector drama completely and not upset either. I havent met a linux yet this isnt possible to use on.

As i said ive been using this since my first forays into Red Hat and Windows 2000, hasnt failed me yet.

#65 dangmcmillan


    Resident One Post Wonder

  • Joined: 19-December 06

Posted 19 December 2006 - 01:11

hi i am having this same problem but when i press R to go to the repair a windows partition it asks me for the administrator password, i tried typing in the passwords that i use on windows but none of them work. i need to get passed this some how so i can do fixboot. Any suggestions?

#66 Mathiasdm



  • Joined: 26-November 04

Posted 29 December 2006 - 09:18

Hello. I unallocated my linux partition using the disk management tool in my xp (home edition) partition and now when I try starting my computer I get the GRUB loading Error 22.

I am using a Dell so I also have no recourse to a boot disk. Mark Jensen's post about the mbr.bin file is over my head at this point in time.

I have a windows xp home edition CD and when i go into recovery mode it asks me from where I would like to start and only gives me C:/WINDOWS as an option and that should be fine except it asks for an administrator password and any password that I try, including no password, is rejected. I'm at a loss as to how to proceed without re-installing xp. In fact, I am not even sure how to re-install xp using the special Dell partition or even my System Restore partition both of which, along with my windows partition, should be intact and healthy. The only problem here is GRUB trying to trying to load from the fourth partition on my harddrive which is now unallocated.

Any suggestions would be much appreciated.

I have the same problem (except I don't have a Windows 98 CD).

There are 2 accounts on that computer. If I give both of them a password, would one of those passwords work? :blush:

#67 vetmarkjensen


    Linux noob since Red Hat 5.1

  • Joined: 02-October 03
  • Location: Middle Tennessee
  • OS: GNU/Linux
  • Phone: Android and iPhone

Posted 29 December 2006 - 14:12

I have the same problem (except I don't have a Windows 98 CD).

There are 2 accounts on that computer. If I give both of them a password, would one of those passwords work? :blush:

You don't need a password to write the MBR. If you boot an XP CD, just use the options to take it to teh "recovery console", which is a command line interface. Then type fixmbr, and it will re-write the Microsoft default MBR to your hard drive.

The other options of booting an older Win98 floppy or some such to do a fdisk /mbr are also valid and will work.

#68 HT2791



  • Joined: 27-July 05

Posted 13 May 2007 - 20:49

hey guys, I have an WinXP cd and i restart the comp into it.
it tells me to press any key to boot from Disc.. and I do.
Then it analyses hardware and then a blue screen comes up:
Press F6 to install additional Raid disc drivers
Press F2 for automated system recovery.

If i dont press either of them, it loads the stuff from the disc and then it comes to a screen with all my partitions/discs.

So how do i get into the recovery console? I dont to delete or install windows onto another partition, i just want to get into recovery.

This doesn't make any sense at all because I've looked online to get into recovery. They all say Press R.
But where? I mean i even tried hitting R straight as i boot from the disc.

well that's odd. I didn't go into recovery or anything, and the grub bootloader just.. disappeared.
Anyways, forget everything in this post :l

Edited by HT2791, 13 May 2007 - 20:57.

#69 Puggsley



  • Joined: 03-December 06
  • Location: Harrogate, UK

Posted 13 May 2007 - 20:57

^Is that an offical microsoft CD or an OEM CD? If it came with a computer its possible to remove access to the recover console

#70 HT2791



  • Joined: 27-July 05

Posted 14 May 2007 - 00:25

Not quite sure, it's just a windows installer cd i got when i was in a computer building class (basically everyone got the same cd + key)
Anyways, I reinstalled Feisty Fawn only to screw up my xorg.conf (blasted Beryl, why does it never show the title bars) and my X server just.. didnt work.
No way to fix it since, I can't see anything, and not to mention reinstalling Ubuntu screwed up my windows partition so this message is Post reformatting.
/end rant
heh sorry

#71 bit4


    Resident One Post Wonder

  • Joined: 11-June 07

Posted 11 June 2007 - 00:38

I had the GRUB error 22 problem after trying to install Ubuntu for AMD64 into a free area on the disk.

The problem persisted after trying fixmbr and fixboot.

My hardware setup is a little unusual, I suppose: AMD 64 CPU, one IDE hard disk, one SATA hard disk. I am booting from the SATA disk, although it appears as the second disk.

It appears that I had to run fixmbr with a parameter, because the default is the first hard disk, which is not the one that needed fixing:

fixmbr /device/harddisk1

(type "fixmbr /help" or "fixboot /help" to get a short help)

After doing this, and after running fixboot, the partition table still didn't have any partition marked as bootable.
Booting at this stage would give be a message about having to insert a boot CD or something similar.
I could not find anything in the recovery console that could help me mark a partition as bootable, so I booted Mandriva from a Flash disk-on-key (booting any Linux live CD would have worked as well) and as root I used the interactive fdisk command to mark the Windows partition as bootable. Voila.

It took me 3 hours of cold sweat until I got there. Hope this info will help someone else out there.

#72 dll2hell


    Resident One Post Wonder

  • Joined: 10-October 07

Posted 10 October 2007 - 01:42

I happened upon this site trying to find out how to get back Windows XP bootloader that was taken over by the Darwin Boot Loader (osX86). I tried countless ideas submitted but none worked except for the easiest and not one that is thought of too often....

just use a Recovery Console CD (7MB) usually found by searching for RC.ISO (that is if you don't have the recovery console on XP's original CD or install disks) and usually not necessary (as it may cause more damage) to use the fixmbr command....rather use just the simple fixboot command (which writes a new partition boot sector to the system partition). That's all you need.


1. Boot into Recovery Console
2. once authenticated, type in the command FIXBOOT
3. exit and reboot and you will have back XP's bootloader!

Well, I also, flagged the XP partition as the boot partition with the Unix fdisk -e and the flag command. (not sure if that was necessary but suppose it was since the flag was on the osX partition as the boot partition.l

Hope this helps and will prevent a big headache later on.

#73 jook11


    Resident One Post Wonder

  • Joined: 06-November 07

Posted 06 November 2007 - 19:15

I have something odd going on.
A while back, I tried dual booting ubuntu. This is th cause of my troubles. I could never boot into it, and it's GRUB Bootloader ruined XP's bootloader.
So, for a long time I've been booting to XP through a super Grub CD, and just being sad about the 60gigs I gave to linux that were unreachable.
Last night I decided enough is enough, loaded the linux live CD, wiped that partition back out, and tried to boot windows.
it still tried to load with Grub.

Okay I said, I've got a copy of Vista here. Maybe installing that on the old linux partition will install its bootloader and fix things?
It sort of did... I got into the dual-boot select screen anyway, and I could load XP, but if I tried Vista, I'd get this:
"File: \Windows\System32\winload.exe

The selected entry could not be loaded because the application is missing or corrupt"
So I installed EasyBCD in XP, and tried using its tools to reinstall the vista bootloader. It said it did, but I still couldn't get to Vista. Same error.

I've tried booting the Vista CD and using its recovery tools (It tells me it found a problem and fixed it, but it ends up the same way)
I've tried booting the XP CD and using recovery console for fixmbr and fixboot, individually and together in either order. They say they fix the problem, but they havent.
I've tried installing the recovery console as a bootable option and doing the above, with the same result.
I've tried EasyBCD to uninstall the vista bootloader and put it back, and it doesnt help.

Right now, I have a clean formatted partition (that used to have vista on it, and linux before that).
Here's the really strange bit about everything: If I boot my PC with a bootable CD in the drive (Vista or XP) and DON'T "press any key to boot from CD" it will currently just go right into XP (I've lost the boot select screen with vista (which shouldnt be there anyway now) and recovery console (which should be there)).
But if I boot my PC with the drives empty, it tries to load Grub and hangs.

My drives look like this:
Hard drive one (160GB):
C, D (divided in half for each)
Hard Drive 2 (400GB)
G (about 126GB), I (about 60), H (about 187)

I drive is the area that had linux on it, and now I'd like to put Vista in.

#74 vetmarkjensen


    Linux noob since Red Hat 5.1

  • Joined: 02-October 03
  • Location: Middle Tennessee
  • OS: GNU/Linux
  • Phone: Android and iPhone

Posted 06 November 2007 - 21:01

I have something odd going on.
I drive is the area that had linux on it, and now I'd like to put Vista in.

This is the FAQ section, you are more likely to get help in the regular support forums, where people post their problems and ask for help.

That said, you should be able to boot Vista and use it to repair your Microsoft boot system. I don't run Vista, so I cannot be more specific, I am afraid.

You might want to read up a bit on boot loaders, if you think that GRUB ruined XP's boot loader. (are you running XP or Vista on this box?) If Vista, then you shouldn't have an XP bootloader, anyhow. And this is what I was talking about with regards to bootloaders. The MBR has room for one - JUST one - boot loader. Whether it is the one that came with XP (which has been pretty much the same since Win9x days), or the Vista BCD (?), or GRUB. The Microsoft ones don't detect and set up Linux for you, so GRUB does the job when you install. I don't know what went wrong with your install, nor do you seem to care, so no need to discuss that I suppose.

Through Google, I found the following, which may help

1. Put the Windows Vista installation disc in the disc drive, and then start the computer (set to boot from CD in BIOS).
2. Press a key when you are prompted.
3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
4. Click Repair your computer.
5. Click the operating system that you want to repair (Vista in this case), and then click Next.
6. In the System Recovery Options dialog box, click Command Prompt.
7. Once in the command prompt, type exactly Bootrec.exe /FixMbr and then press ENTER. You will see "operation completed successfully."
8. Reboot and set BIOS to boot from the HDD again.

GRUB will be overwritten in step 7 and Vista's bootloader will once again take control of loading your OS(s).

#75 roadgeek9


    Neowinian Senior

  • Joined: 01-November 06
  • Location: Connecticut

Posted 07 November 2007 - 02:50

From Windows XP:
Boot off Windows XP CD
Press "R" at first prompt.
Press the number of your Windows installation.
Type in your administrator password.
Type fixmbr [enter], then y [enter]
Type fixboot [enter], then y [enter]
Type exit [enter].