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...
Jeez, leave it to me to have a typo in my very first HOW TO. Mark, fix that would ya?
MR_Candyman
Mar 4 2005, 03:21
For me and some others you might need to type "fdisk /mbr" instead of "fixmbr"
just thought I'd add that before people start saying it doesn't work
Hurmoth
Mar 4 2005, 03:25
Thanks for the info

This might come in handy
jubber2002
Mar 4 2005, 03:33
Which if you still need linux you better have a boot disk. you can also type "fixboot" (without the quotes) to get it fixed.
is there a way to recover the winlogin.exe
QuarterSwede
Mar 4 2005, 04:00
QUOTE(MR_Candyman @ Mar 3 2005, 22:21)
For me and some others you might need to type "fdisk /mbr" instead of "fixmbr"
just thought I'd add that before people start saying it doesn't work
[right][snapback]585566261[/snapback][/right]
Hahaha, you beat me to it!
Yeah, Fixmbr and Fixboot both don't work. I know, I've tried several times. All they do is jack up the NTLoader.
Nice how to, might be useful one day.
Mr. Dick C. Normous
Mar 4 2005, 04:11
QUOTE(acerr @ Mar 3 2005, 22:34)
is there a way to recover the winlogin.exe
[right][snapback]585566297[/snapback][/right]
Of course there is

Boot into the recovery console and use this command.
expand d:\i386\winlogon.ex_ c:\windows\system32\winlogon.exe
D: = drive Xp cd is in
C: = drive Xp is installed on
markjensen
Mar 4 2005, 19:36
QUOTE(Armeck @ Mar 3 2005, 22:02)
Jeez, leave it to me to have a typo in my very first HOW TO. Mark, fix that would ya?
[right][snapback]585566188[/snapback][/right]
Not a problem. Done.
You should always be able to go back and edit your first post. All members are able to do this. At least that is how I understand it to work.

And, by the way, thanks for the quick write-up! This gets asked an awful lot.
butterflychoke
Mar 4 2005, 20:31
What if you do not have an XP cd, just recovery discs? Are you out of luck?
markjensen
Mar 4 2005, 20:36
QUOTE(butterflychoke @ Mar 4 2005, 15:31)
What if you do not have an XP cd, just recovery discs? Are you out of luck?
[right][snapback]585569154[/snapback][/right]
I would think that borrowing a friend's XP CD would be a good solution.
MR_Candyman
Mar 5 2005, 03:40
I like using the windows 98/me boot discs the best. You can freely download them from the net
Krpano
Mar 22 2005, 23:36
QUOTE(Jstphish @ Mar 4 2005, 04:00)
Hahaha, you beat me to it!
Yeah, Fixmbr and Fixboot both don't work. I know, I've tried several times. All they do is jack up the NTLoader.
[right][snapback]585566400[/snapback][/right]
Agreed with that.
It always mess with the NTLoader.....arghhhhhh...gotta hate windows.
glasscleaner
Mar 25 2005, 22:53
fdisk /mbr
work well too
fdisk /mbr does not work for me. I've even ran a search on my XP box for 'fdisk'...and it's not on here.
Is there a way that actually works? shall I try the 'fixmbr' command and see if that works - because I really don't wanna' mess up my system.
markjensen
Apr 26 2005, 02:29
QUOTE(DjmUK @ Apr 24 2005, 13:35)
fdisk /mbr does not work for me. I've even ran a search on my XP box for 'fdisk'...and it's not on here.
Is there a way that actually works? shall I try the 'fixmbr' command and see if that works - because I really don't wanna' mess up my system.
[right][snapback]585823046[/snapback][/right]
I have always used
fdisk /mbr, but I pretty much stopped using Windows right about the start of the XP days, so I can't say for sure which command is supported in XP. Both are equivalent commands, so they are both safe (and set the MBR back to the MS default)
dj6ross
Apr 26 2005, 02:43
fixmbr worked great. Thanks for the info.
mikey1001
Apr 26 2005, 02:50
QUOTE(markjensen @ Apr 25 2005, 20:29)
I have always used fdisk /mbr, but I pretty much stopped using Windows right about the start of the XP days, so I can't say for sure which command is supported in XP. Both are equivalent commands, so they are both safe (and set the MBR back to the MS default)
[right][snapback]585830160[/snapback][/right]
If you have MS Windows 95/98/ME installed, click on Start >> Run. Type in "command", without the quotes, and press Enter. At the command prompt, type in the command "fdisk /mbr" to reinstall the Windows bootloader into the MBR.
If you have MS Windows 2000/XP installed, you will need to have the Windows Installation CD. Insert the Installation CD into your CD-ROM drive and reboot your computer. When Windows Setup loads up, follow the onscreen instructions to open the Recovery Console. At the Recovery Console command prompt, type in the command "fixmbr" to reinstall the Windows bootloader into the MBR.
Slight difference in the OS's.
dmdsoftware
Apr 29 2005, 03:40
Ok folks.
Fixmbr and fixboot are not working for me. It says it has revised the boot sector etc, but when I restart the computer it still says the hard drive is not bootable. Tried from the Windows XP CD. The options are limited - it won't let you run anything but what is listed under help (so, no fdisk, sys, etc).
I'm getting very frustrated. I tried reinstalling XP, but it simply copies files over to the HD, resets the computer and then tries to boot from the hard drive (which it cannot do).
I'm lost for a solution.
markjensen
Apr 29 2005, 14:41
QUOTE(dmdsoftware @ Apr 28 2005, 22:40)
Ok folks.
Fixmbr and fixboot are not working for me. It says it has revised the boot sector etc, but when I restart the computer it still says the hard drive is not bootable. Tried from the Windows XP CD. The options are limited - it won't let you run anything but what is listed under help (so, no fdisk, sys, etc).
I'm getting very frustrated. I tried reinstalling XP, but it simply copies files over to the HD, resets the computer and then tries to boot from the hard drive (which it cannot do).
I'm lost for a solution.[right][snapback]585845486[/snapback][/right]
I am not sure
why your XP is refusing to boot. Really, all that needs to be done is get Windows to restore the MBR and you are done.
What I would recommend at thsi point (you did try a Win98 boot disk from
http://www.bootdisk.com/ right?) is that you back up whatever data you can - use a Knoppix LiveCD if you must to get access to your data. Then fdisk and remove all partitions and reinstall XP completely from scratch. You may have some bad data in your partition table that prevents it from accessing the correct Microsoft data outside the MBR.
diamonds
Aug 9 2005, 12:14
The easiest way to fix this problem (I know, ive had to do it quite a few times) is to go on and start the installion, and format the drive. THEN go into the recovery console and in this order type fixmbr then fixboot and reinstall windows. I have not yet figured out how to keep windows on a seperate partition and have it still boot
PsychCom
Aug 9 2005, 13:05
QUOTE(markjensen @ Apr 29 2005, 14:41)
I am not sure
why your XP is refusing to boot. Really, all that needs to be done is get Windows to restore the MBR and you are done.
What I would recommend at thsi point (you did try a Win98 boot disk from
http://www.bootdisk.com/ right?) is that you back up whatever data you can - use a Knoppix LiveCD if you must to get access to your data. Then fdisk and remove all partitions and reinstall XP completely from scratch. You may have some bad data in your partition table that prevents it from accessing the correct Microsoft data outside the MBR.
[right][snapback]585847112[/snapback][/right]
dont need to start fdisk. just use the windows xp or 2000 cd and format there then reboot.
about people not getting this to work. not taking you all for stupid or anything like that, i would say check if the error says ntloader missing, if so you have to copy it from the xp cd. that is a whole other operation i dont have at hand rigth now. *there work houres are done, driving home*
Stealth-X
Aug 9 2005, 13:06
In the past i've done:
Boot from xp cd
Recovery Console
fixmbr
fixboot
restart, back to windows
protoss_chaos
Aug 9 2005, 13:06
QUOTE(Armeck @ Mar 3 2005, 19:26)
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 "fixmbr" (without the quotes of course)
4. Restart your computer.
[right][snapback]585565400[/snapback][/right]
Better hope u only have on partition, or you will trash them all (well, they will exist, but u won't be able to boot them)!!! You should warn people ahead of tyme....
markjensen
Aug 9 2005, 13:53
fixmbr does not trash your partitions. It just returns the Microsoft boot loader to the Master Boot Record. Microsoft cannot (will not?) see the Linux partitions, but they exist and can be used or removed, at the user's discretion.
You can re-install GRUB (or LILO) to re-allow mutli-boot, or you can set up your NT boot loader to
do the same thing.
Old5chool
Sep 4 2005, 05:13
QUOTE(MR_Candyman @ Mar 5 2005, 05:40)
I like using the windows 98/me boot discs the best.
[right][snapback]585570750[/snapback][/right]
www.bootdisk.com
very very thanks to you........................................
there is lot of formulas to remove linux and bring back the xp boot loader but easiest way is posted in first post of this thread and that way is also secure.......
thanks
dan diemer
Dec 26 2005, 17:36
Thanks a ton, worked well for me.
Catharsis
Apr 10 2006, 22:43
Hmm, that must be if you've installed Linux in a VERY specific way, because now I can't boot into either OS. Wonderful.
markjensen
Apr 11 2006, 02:07
Quote - (Catharsis @ Apr 10 2006, 17:43) [snapback]587403660[/snapback]
Hmm, that must be if you've installed Linux in a VERY specific way, because now I can't boot into either OS. Wonderful.
No. It is very general, as it restores the Microsoft MBR to the hard drive.
Chances are that some other action has corrupted your partitions if this doesn't work.
QuarterSwede
Apr 11 2006, 21:26
All I know is that that method has never worked for me.
Banzai
Apr 12 2006, 11:48
i aint got the recovery console on my xp cd
markjensen
Apr 12 2006, 12:24
Well, here is a method that will work, if you can boot Linux (installed or LiveCD, it doesn't matter).
The "code" part of the MBR is the first 446 bytes of the hard drive. If you can get that as a file, then you use the command (as root):
dd if=mbr.bin of=/dev/hda bs=446 count=1
Now, all we need is some nice soul with XP and a LiveCD to grab the 446 bytes from his XP box and post it here, so others can use it to write to their MBR.
That eliminates any problems with booting the XP CD and getting to recovery console, or booting from a floppy from bootdisk.com.
Keisugo
May 14 2006, 03:18
well I have tried the fixmbr in the windows recovery console, but wasn't sure if I had screwed up beacuse after typing that in, installation then rebooted right into the windows xp install. Now even if i try to stop it midway, the installation pop up again even if I reboot. Basically, my concern is if my files will still be avaible to me besides the fact that the windows installation is installnig windows xp again
markjensen
May 14 2006, 04:43
Yes (if I understand you correctly).
Your Linux partition(s) will be there, untouched. The
fixmbr just reset the Windows bootloader to its Microsoft-default settings. You can do a
grub-install to get the ability to use GRUB to boot back into Linux.
Use a LiveCD to browse around and verify your data is untouched for yourself.
ViperAFK
Jun 15 2006, 00:39
after i do the fdisk / mbr how do i reboot from there without having to turn off the PC? (cause that doesnt fix the bootloader if you do that)
markjensen
Jun 15 2006, 01:44
It is fdisk /mbr (no space in the "/mbr" part), or fixmbr. That might be part of the problem.
That fixes the MBR. If for some (non-Linux) reason, your boot.ini file is in need of repair (Linux doesn't touch NTFS, so it could not have modified it*), you can do a fixboot, and I believe that it will fix the boot.ini and NTLDR for you.
* Technically Linux can write to your NTFS partition, but it would take several deliberate actions on your part.
markjensen : Linux + NTFS write = kernel recompile. Is it stable and safe to write to an NTFS partition in Linux? This would be hardcore BitTorrent downloading with every second file access kinda thing.
markjensen
Jun 15 2006, 11:46
Honestly, I don't know.
Conventional wisdom has been when I started using Linux that it was experimental and not recommended.
I don't know how much native NTFS has improved since then. Also, CaptiveNTFS made its debut a few years ago, and that uses Windows' own NTFS.SYS file to 'understand' the NTFS filesystem. I have heard it works, but is a bit more sluggish.
You will always be safe writing to a Linux native filesystem, or FAT, so that is what I would probably recommend.
ViperAFK
Jun 15 2006, 13:14
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.
markjensen
Jun 15 2006, 14:53
Are you supposed to hit ENTER or answer 'yes'? It certainly seems that your XP Recovery Console isn't re-writing the MBR!=...
ViperAFK
Jun 15 2006, 18:28
well, it doesnt say what to do, and it only lets me type one letter
littleneutrino
Jun 15 2006, 18:37
the way i got my bootloader back is put in the xp disk and then run the recovery console and type in Fixmbr or fdisk\mbr
ViperAFK
Jun 15 2006, 19:14
well that is what i did, like i said it just keeps asking me if i want to write a new one and doesnt do it.
gigapixels
Jun 15 2006, 19:16
fixboot and fixmbar are the two commands you need to type. That's all.
strekship
Jun 19 2006, 21:59
Quote - (ViperAFK @ Jun 15 2006, 06:14) [snapback]587608492[/snapback]
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.
Barney
Jun 20 2006, 00:44
Quote - (ViperAFK @ Jun 15 2006, 14:28) [snapback]587609242[/snapback]
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!
buzlink
Jun 20 2006, 15:47
Quote - (Aaron @ Mar 3 2005, 18:26) [snapback]585565400[/snapback]
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?
markjensen
Jun 20 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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.