Jump to content



Photo

[HOW TO] Get back your Windows XP Bootloader


  • Please log in to reply
81 replies to this topic

#46 vetgigapixels

gigapixels

    Neowinian Senior

  • Joined: 08-December 02
  • Location: California, USA
  • OS: Windows 7 64-bit

Posted 15 June 2006 - 19:16

fixboot and fixmbar are the two commands you need to type. That's all.


#47 strekship

strekship

    Neowinian Senior

  • Joined: 23-May 04
  • Location: California

Posted 19 June 2006 - 21:59

well what basicaly happens with me is i did sepll it right, i typed "fdisk /mbr" and it said "are you sure you want to write a new mbr?" and i hit enter, than it just says it again and again, so i couldnt figure out how to restart my pc from there so i hat to hit th power and it was still GRUB.

You are not supposed to keep hitting enter, you press "y" and then hit enter.

#48 Barney T.

Barney T.

    Debian Linux: I'm Loving It!

  • Tech Issues Solved: 1
  • Joined: 30-August 03
  • Location: Williamsburg, Virginia

Posted 20 June 2006 - 00:44

well, it doesnt say what to do, and it only lets me type one letter


So you have to type a "Y" or a "N" and then <Enter>.... yes? I've done this multiple times and it works ok for me (no looping back).

Barney

**Edit... the guy above me beat me to this! :pinch:

#49 buzlink

buzlink

    Neowinian

  • Joined: 08-March 03
  • Location: Kansas City, KS

Posted 20 June 2006 - 15:47

If for some reason you find the need to get back to your Windows XP bootloader instead of the one installed by your Linux distro, simply follow these instructions:

1. Boot up with your Windows XP disc.

2. Select the option Recovery Console.

3. At the prompt, type "fdisk /mbr" (without the quotes of course)

4. Restart your computer.

Edited with correct info from the following posts...

What do you do if your Windows XP CD resides on a HD, for example on a Dell, and the HD you are wanting to recover is on a separate HD. How do you recover it then? Is there a Boot CD that can be downloaded and used?

#50 vetmarkjensen

markjensen

    Linux noob since Red Hat 5.1

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

Posted 20 June 2006 - 15:53

Borrow a CD?

Or use a boot floppy (images readily available online) from Windows 95 or 98. They will work just fine, according to Microsoft. (Y)

#51 buzlink

buzlink

    Neowinian

  • Joined: 08-March 03
  • Location: Kansas City, KS

Posted 20 June 2006 - 17:42

Borrow a CD?

Or use a boot floppy (images readily available online) from Windows 95 or 98. They will work just fine, according to Microsoft. (Y)


Dell PC = No Floppy Drive

#52 vetmarkjensen

markjensen

    Linux noob since Red Hat 5.1

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

Posted 20 June 2006 - 17:48

That still leaves you with the "borrow a CD" option. ;)

For a real odd trip, if you can get a copy of the first 446 bytes of the MBR from a "normal" Windows box (using a Linux LiveCD or some such), you can use a LiveCD on your destination box, and have Linux write the Microsoft MBR back for you.

EDIT: If you hold on a second, I will get one from a Windows box around here, and post the 446 bytes that you should need. then all you need to do is to write this data using a Linux LiveCD on your target machine. (Y)


EDIT#2: Attached is the file created from a Win95 box (hey, I needed to write to a FAT partition...) using the following command to extract the relevant 446 bytes from the MBR (you don't want the partition table from this beast! :laugh: )
dd if=/dev/hda of=/mnt/hda1/mbr.bin bs=446 count=1
Switch the Input File and Output File definitions (adjust to suit your hardware config), and you will have reset your MBR.

Worst case, you can still grab an XP CD and boot it into recovery console.
(file had to be renamed with a .txt extension so I could upload it here)

Attached Files


Edited by markjensen, 20 June 2006 - 18:08.


#53 buzlink

buzlink

    Neowinian

  • Joined: 08-March 03
  • Location: Kansas City, KS

Posted 20 June 2006 - 20:45

That still leaves you with the "borrow a CD" option. ;)

For a real odd trip, if you can get a copy of the first 446 bytes of the MBR from a "normal" Windows box (using a Linux LiveCD or some such), you can use a LiveCD on your destination box, and have Linux write the Microsoft MBR back for you.

EDIT: If you hold on a second, I will get one from a Windows box around here, and post the 446 bytes that you should need. then all you need to do is to write this data using a Linux LiveCD on your target machine. (Y)
EDIT#2: Attached is the file created from a Win95 box (hey, I needed to write to a FAT partition...) using the following command to extract the relevant 446 bytes from the MBR (you don't want the partition table from this beast! :laugh: )
dd if=/dev/hda of=/mnt/hda1/mbr.bin bs=446 count=1
Switch the Input File and Output File definitions (adjust to suit your hardware config), and you will have reset your MBR.

Worst case, you can still grab an XP CD and boot it into recovery console.
(file had to be renamed with a .txt extension so I could upload it here)

Wow
Thanks I'll give that a try.
The HD that I am trying to restore it only has GRUB on it, can I enter those commands within Grub?
Thanks for the help!

#54 tpa

tpa

    Resident One Post Wonder

  • Joined: 20-August 06

Posted 20 August 2006 - 20:39

Hi,

What about xp64 ?
I've reached the recovery console, but I couldn't execute fdisk nor fixmbr : the only commands available are listed by the help command, but the list is pretty short.
Is there a solution for my situation ?

tom

#55 Bored Tofu Robot

Bored Tofu Robot

    Neowinian

  • Joined: 03-September 06

Posted 03 September 2006 - 16:43

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.

#56 Bored Tofu Robot

Bored Tofu Robot

    Neowinian

  • Joined: 03-September 06

Posted 03 September 2006 - 17:37

Nevermind - I found a USB floppy drive and used a Windows 98 boot disk. Thanks anyway.

#57 EdLondon

EdLondon

    Neowinian

  • Joined: 14-September 06

Posted 14 September 2006 - 12:37

Hello

I have Win XP and Fedora 5 on my machine and I want to go back to the Windows bootloader. I've read the posts here but as I don't have an XP install disk and don't know where to find one I'm a bit stuck. The computer came with a system restore disk but this doesn't have fdisk on it!

Ed

#58 underscorebios

underscorebios

    underscore person

  • Joined: 28-December 01

Posted 14 September 2006 - 12:51

Hello

I have Win XP and Fedora 5 on my machine and I want to go back to the Windows bootloader. I've read the posts here but as I don't have an XP install disk and don't know where to find one I'm a bit stuck. The computer came with a system restore disk but this doesn't have fdisk on it!

Ed


www.bootdisk.com is your friend ;)

#59 EdLondon

EdLondon

    Neowinian

  • Joined: 14-September 06

Posted 14 September 2006 - 13:03

www.bootdisk.com is your friend ;)


OK, but as a newbie I'm not sure which one will be able to restore an XP bootloader :cry:

#60 underscorebios

underscorebios

    underscore person

  • Joined: 28-December 01

Posted 14 September 2006 - 14:24

OK, but as a newbie I'm not sure which one will be able to restore an XP bootloader :cry:


Well basically you could download the win98 bootdisk LINK pop a floppy in the drive and run the exe, after, boot your computer up with it ( remember to check in your BIOS settings if the floppy is set as your first boot device ) after it boots up just type "fdisk /mbr" without the quotes as suggested in the first post remembering to answer "Y" when prompted to rewrite the mbr.
What this will do is rewrite the Master Boot Record so that the system will boot the first active partition of the Master hard drive in the primary ide channel (usually, depends on some other settings though) wich is hopefully where you installed your windows XP. then after completion reboot your system again removing the floppy from the drive and it should boot right back to win xp.
The correct option would be to boot up using the xp install disc selecting recovery console pressing R when prompted during install and logging in throught the "Administrator" account of the installation you wish to fix then typing "FIXBOOT" and "FIXMBR", but if you don't have acces to the install disc the other option SHOULD work ;)
Good luck though.

P.S.
The link i gave is the one from bootdisk.com downloaded and checked for fdisk, i host no MS binaries ;)

Edited by underscorebios, 14 September 2006 - 14:32.




Click here to login or here to register to remove this ad, it's free!