How to Add Windows XP to Windows 7 Boot Manager

A reader has asked about how to add Windows XP to Windows 7 Boot Manager. Here are the steps. You do this when you cannot boot to Windows XP after installing Windows 7 or Windows Vista.

  1. Open an elevated command prompt.
  2. Type the following to create a boot loader for Windows XP.
    bcdedit /create {ntldr} /d "Windows XP"
  3. Type the following to set the device to where Windows XP is installed. I used D: in this example. Replace it with the drive letter of your XP installation.
    bcdedit /set {ntldr} device partition=D:
  4. Type the following to set the path.
    bcdedit /set {ntldr} path \ntldr
  5. Type the following to add this boot loader to the boot up screen.
    bcdedit /displayorder {ntldr} /addlast
  6. Reboot the computer.

[Update: 3/11/2009] Some readers have reported that they still have problems after following these steps. I have tried to reproduce the error and fix it. The error I got is different, but it’s similar in nature. Please see this post about how I fixed the problem.

Related Posts

41 Comments Post a Comment
  1. Guille says:

    Followed the steps, I get XP as an option. When I select it the system reboots. Am I missing something? Perhaps defining the directory of windows xp install?

  2. Michael says:

    Extremely Helpful and straightforward…thank you! So far this is the only site that spelled it out clearly and easily!

  3. amida168 says:

    @Guille
    What hard drive is your Windows XP on? When you type bcdedit, what do you see?

    @Michael
    Thanks for the compliments! :-)

  4. Lindsey says:

    I followed the above instructions for adding XP but when I rebooted and attempted to get into XP my system just reboots. My XP partition is set to D:\ in Windows 7. bcdedit looks like this for XP:
    identifier {ntldr}
    device partition=D:
    path \ntldr
    description Windows XP

    Is the path wrong? Thanks in advance for your help.

  5. amida168 says:

    Lindsey,

    Is XP on the first partition of the drive?

  6. Lindsey says:

    Yes it is. When I installed 7 i did the default installation where it makes a 200 mb partition followed by the main 7 partition.
    So the makeup of my hard drive is 20gb XP 200mb 7 and then 20 gb windows 7. In that order. I can reinstall 7 if need be but I’d like to figure out what’s wrong. Thanks.

  7. amida168 says:

    Ok, you might want to change the device partition to C:

    bcdedit /set {ntldr} device partition=C:

  8. Andy says:

    I have 3 partitions on a 320gb hdd, Vista is on C, Xp is on F & Win 7 on G. XP does not show up in boot menu, when I type the first command message says Invalid command line switch: /f Whats wrong???

  9. plasticore says:

    Hey guys i did the above steps here is what my partitions are

    Drive C: Windows 7
    Drive D: Windows XP

    I entered all the commands in cmd on admin, when i reboot it shows xp and 7 in the boot menu.

    Problem is when i try to load XP is shows the error
    “\ntldr missing or damaged file

    PLEASE HELP MEEE!!!!!!!!!!!! I AM SO FUSTRATEDDDD!!!!!!!

  10. amida168 says:

    plasticore,

    Is Windows XP on the first or second partition?

  11. cp124 says:

    Im having the same issue as plasticore. I have the disk in two partitions. Installed win7 first (on the first partition), then installed win xp on the second (partiton). Only xp would only boot after that, and there was no boot menu. I then used the win7 dvd to “fix” the boot, but it made such that only win7 would boot. followed your instructions, and got both in the boot menu, but xp doesnt work. gives me an error.

    win7 sees the second partition as E: (Which i used in the bcdedit commands)

    Should i be doing something different?

    Thanks a ton!

  12. amida168 says:

    @cp124
    What exactly is the error? Have you tried to use d: or even c: in the bcdedit command? I am thinking even you install XP on the second partition, the ntldr files might be on c: drive.

  13. Mojo says:

    The poster did a great job for the most part, the problem is that he forgot to include the ‘forward slash’ in the ‘path’ argument. It should be ‘\ntldr’. Hope this helps

  14. amida168 says:

    Thanks for pointing that out. My original post did include the slash. However, my blogging software (WordPress) has a tendency to clear the slash from time to time. I added the slash back.

  15. Mark says:

    Same problem as plasticore except windows XP is on C: and 7 is on M: windows 7 shows but xp dont i did what you said but it still say earlier version of windows and when i click it it says \ntldr missing or damaged help, i do not want to have to reinstall it.

  16. amida168 says:

    Can you briefly describe how you installed Windows 7? Did you boot the machine using the Windows 7 installation DVD or did you run the installation from under Windows XP?

  17. Bennie says:

    How do I remove the codes I just added? I formatted the drive with my XP installation, but now the boot manager still loads and asking me wich OS I want to run. Please help.

  18. amida168 says:

    If you want to delete the Windows XP entry, type this command.

    bcdedit /delete {ntldr} /f

  19. Chilu says:

    Hi guys, I did a few installs just to try and recreate the errors you guys are getting. I think the problem is when you have try to install on one drive with multiple partitions. By default windows xp will pick the first partion as the boot partion. Try to manually find where the ntldr file is and point the boot loader to it as the device partion. If windows 7 is on C and you installed on a partion previously used by vista, chances are that it deleted the ntldr files. To restore this, you need to do a repair install of xp and the just repair the boot loader of windows 7 using the installation dvd. after that go and edit the boot loader of windows by adding your repaired xp to the boot list. Remember to point the boot loader to the partion where your ntldr files are written (normally its on your boot partion i.e partition=\Device\HarddiskVolume1)
    Hope this helps.

  20. kerol says:

    Hi,
    I had XP, then I installed Win 7 and did dual boot.
    I installed Win 7 in 1st hard disk and Win XP in 2nd hard disk

    I don’t have option to choose to boot in Win 7 or XP

    Before I installed Win 7, the drive letter in XP is C: for Win XP system. I installed Win 7 in D: drive.

    When I boot into Win 7, the drive letter change. The Win 7 system is now in C: drive and XP system in F: drive.

    So, when I edit the bootload in Win 7, which drive letter should I use for XP, so that I can choose to boot into XP

    Thanks!

  21. TheEconomist says:

    I am writing this, more as a note to myself, to find it again, if it would be to happen. I am having Windows Server 2008 as primary OS, on the first partition of the first hard drive, and XP on the 2nd partition. At the first time, I installed XP first, and Server after. Server saw XP and made a nice bootloader and worked well. However, for a time, I was caught with business in XP, and forgot to extend trial for Windows Server. Sadly, I had to reinstall it. But this time, it didn’t see XP at all…

    And now, the aftermath:

    First, to avoid the “shit happens” situation, I exported my bootloader:

    bcdedit /export c:\savebcd

    Should shit have been happening, saved the folder along with the bcdedit utility on another partition, to start it easier from the Recovery Console, once I should have been at a command prompt. From this, I would have run

    bcdedit /import c:\savebcd

    However, it was not the case.

    I followed the instructions of this article. However, this:

    bcdedit /create {ntldr} /d “Windows XP”

    didn’t ran at all. It was reporting something like {ntldr} would have been already created, and didn’t want to execute. However, the EasyBCD program was displaying only one entry, the one for Windows Server. Found it quite ockward.
    So, I added another entry. This process is quite stupid. First I selected Windows 2k/NT/XP… , but the drive option was C:, and grayed. After a few clicks around, I managed to add it, by selecting first the drive letter (I:) – that was long ago established and I knew it – and then EasyBCD let me specify the type of the entry as Windows XP. I was having now 2 entries, and I saved:

    There are a total of 2 entries listed in the Vista Bootloader.
    Bootloader Timeout: 30 seconds.
    Default OS: Microsoft Windows Server 2008

    Entry #1

    Name: Microsoft Windows Server 2008
    BCD ID: {current}
    Drive: C:\
    Bootloader Path: \Windows\system32\winload.exe
    Windows Directory: \Windows

    Entry #2

    Name: Microsoft Windows XP
    BCD ID: {944d8c5f-4180-11de-a386-0016e6df9128}
    Drive: I:\
    Bootloader Path: \ntldr

    You see, now Windows XP has that shitty hexadecimal BCD ID instead of a simple {ntldr} ; however, I was pretty content I could skip the first command that wasn’t going to run.

    Now my XP is a service pack 2. Never needed the damn NTLDR and it’s companion NTDETECT.COM. Now it needs it. Kinda handicaped, but it works…

    But my XP wasn’t going to boot…

    So I make sure that path was \ntldr, with a command like:
    bcdedit /set {944d8c5f-4180-11de-a386-0016e6df9128} path \ntldr

    Na…that didn’t work. It wanted the NTLDR and it’s companion. I say, Ok, what the hell, isn’t gonna hurt me to please him. So I copied the files on I:\ straight in the root.

    Thought that I solved it, rebooted, selected Windows XP, and surprise, NTDETECT FAILURE!

    Seems the boot.ini was necesary too… So I started to browse, and found a nice boot.ini…

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Microsoft Windows XP Professional” /fastdetect

    Now, given it’s looks, you don’t have to presume that boot.ini will intersect itself with the Server bootloader. It’s goal is only to quietly start XP, without asking questions, given the /fastdetect option. But where the hell to place boot.ini ? On C: ? On I: ? Or on both , just to make sure?

    Found on a forum or so that the boot.ini has to reside on C: no matter what where XP resides. After all , that multi(0)…etc… tells where Windows XP actually resides.

    However, Windows XP WAS STILL NOT BOOTING…. “Invalid Boot.ini. Booting from C:\Windows”

    Hmm…. Why the hell C:\Windows ? I said “partition(1)”. It’s logical, Windows Server is on partition(0), everything on a damn computer starts from zero…
    So, if the shit would start from 1, that makes Windows XP partition 2!

    So I corrected the boot.ini.

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=”Microsoft Windows XP Professional” /fastdetect

    And finally, instead of another erroneous reboot, saw Windows XP logo appearing from the mist…

  22. Gabor Takacs says:

    Many thanks!!!
    When I first install Win7 it managed the dual boot. But later I had to reinstall XP and Win7 is lost. I run Win7 repair install then XP is lost. With your help
    Xp works again. The new boot system is mysterious for me.

    Thak you again

  23. J Thompson says:

    My problem is that I installed Windows 7 found that only my logitech devices (webcam & wireless DJ) didn’t work. I decided to install XP to run these as my CPU doesn’t support virtualization so XP Mode is out and VMware wouldn’t connect my webcam and virtualbox ran a little slow.

    On one SATA drive I have Windows 7 on a separate SATA drive I have Windows XP. If I go to BIOS and change the hard drive boot priority I can boot into either OS. However I would like to just have a boot manager do this for me.

    I’ve tried the commands above but whenever I select Windows XP it just reboots my PC. Windows 7 boots fine.

    Windows 7’s bcdedit:
    Windows Boot Loader
    ——————-
    identifier {current}
    device partition=C:
    path \Windows\system32\winload.exe
    description Windows 7
    locale en-US
    inherit {bootloadersettings}
    recoverysequence {3c0bce38-478c-11de-a4cf-b322f463a361}
    recoveryenabled Yes
    osdevice partition=C:
    systemroot \Windows
    resumeobject {3c0bce36-478c-11de-a4cf-b322f463a361}
    nx OptIn
    quietboot No

    Windows Legacy OS Loader
    ————————
    identifier {ntldr}
    device partition=D:
    path \ntldr
    description Windows XP

    Windows XP’s boot.ini:

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Microsoft Windows XP Professional” /noexecute=optin /fastdetect

    In Windows 7 the SATA HD that has windows xp on it is D:. In fact if I try to substitute this letter for any other the bcdedit command will return an error. An interesting thing is if I try to boot to XP and hold down F8 I do get the F8 BOOT Option’s menu but whatever I select it just reboots…

  24. J Thompson says:

    This is how I got it to work:

    In Windows 7 I went to Start->All Programs->Accessories->Command Prompt

    In the command prompt I typed the following:

    *** PLEASE NOTE: in the second command where “partition=D:” Replace “D” with the letter of the drive that has the XP installation is on

    bcdedit /create {ntldr} /d “Windows XP”
    bcdedit /set {ntldr} device partition=D:
    bcdedit /set {ntldr} path \ntldr
    bcdedit /displayorder {ntldr} /addlast
    bcdedit /timeout 25

    Now that the Windows 7’s boot menu has been configured I needed to copy over the boot files from Windows XP (I don’t know if all these files were necessary but it doesn’t overwrite anything).

    Open Control Panel and goto Folder Options–>View-> UNCHECK “Hide protected operating system files”

    Open the drive with the Windows XP installation and copy the following files to the root (very top level) of the drive of your Windows 7 installation:

    AUTOEXEC.BAT
    boot.ini
    config.sys
    IO.SYS
    MSDOS.SYS
    NTDETECT.COM
    ntldr

    Once these are copied over to the drive with the Windows 7 installation edit the boot.ini file that is now on the WINDOWS 7 drive and NOT on the Windows XP drive.

    Mine looked like this:

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Microsoft Windows XP Professional” /noexecute=optin /fastdetect

    The edit here needs to tell Windows 7’s boot manager that XP is located on a DIFFERENT physical drive. In my case it was on a different drive but on the FIRST partition so I made this edit:

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(1)partition(1)\WINDOWS=”Microsoft Windows XP Professional” /noexecute=optin /fastdetect

    Notice that the “rdisk” value in lines 3 and 5 changed from 0 to 1. (when changing the “rdisk” value in line 5 I almost changed the “disk” value instead of the “rdisk” value so be careful!) *** If it doesn’t work maybe its because you have lots of hard drives you might try changing the “rdisk” value to 2, 3, or 4, etc depending on how many hard drives you have. I’m really not sure because it worked the first time when I changed the “rdisk” value from 0 to 1.

    If your Windows XP is on the same PHYSICAL DRIVE as Windows 7 but different partition you can try editing the partition value in both lines 3 and 5:

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=”Microsoft Windows XP Professional” /noexecute=optin /fastdetect

    Notice here I only changed the “partition” value from 1 to 2 (the rdisk value is NOT changed). If you have multiple partitions on the same drive you may have to try changing the partition value to 3,4, or 5, etc depending on how many partitions this ONE drive has.

    Save the boot.ini file and reboot the computer.

    If everything is working then go ahead and hide the “protected operating system files” again:

    Open Control Panel and goto Folder Options–>View-> CHECK “Hide protected operating system files”

    I hope this helps people as I could not find the answer anywhere until I sat down a read on how the boot process for both Windows 7 & XP works.

  25. amida168 says:

    Thanks for your contribution. I am sure someone would benefit from your input.

  26. Xsever says:

    Using the latest build of EasyBCD 2.0 build 63, I added XP to the 7 bootloader automatically.

    You simply add the XP entry and it will take care of the needed files for you.

  27. Richie says:

    Thank you so much for this simple Fix. I was pulling my hair out trying to think what I should do…

    But Why did Windows 7 make the drive I installed it on (D-Drive) to rename itself to C drive and vice versa…?

    one of Windows little quirks me thinks…

    Cheers again
    Richie

  28. Sadun says:

    Works fine for me. Thanx!

  29. Vitoriosan says:

    Hello,

    First want to congratulate you for the nice theme.
    although I could not use it in this form it helped me. Raises many interesting questions.

    Here is the desctioption of my issue.

    I have 2 HDD. 1st is SATA and the 2nd is IDE.
    On the SATA C: Drive i have installed Windows 7 and
    ond the IDE D: Drive i have Windows XP (C: drive is XP system boot drive ~ 8MB).

    I have tried a lot of combinations within bcdedit to make a multiboot system but unfotunatelly I failed.

    After all I have installed EasyBCD 2.0 tool which did all for my request.
    The bcdedit output now looks like this:
    ###########################################
    #
    Real-mode Boot Sector
    ———————
    identifier {6468a663-c4e2-11de-9ad2-9f8c38bb9030}
    device partition=C:
    path \NTLDR
    description Microsoft Windows XP

    ###########################################
    #

    Could anyone explain where I can get this long Identifier from?

    And how can I make multibood record from 2 HDD manualy?

    I would be very greafull.

    Thanks,

    Bye.

  30. Mir Muhammad Tareq says:

    hi, i had xp sp3 on my C:\ and F:\ drives. Then i installed Windows 7 on my C:\. Didn’t choose the upgrade option, fresh installation was done. But now i have no boot menu so that i can switch 2 XP. pls help, and fast.
    PS: the repair is not possible so that i can get back my XP.

  31. Mir Muhammad Tareq says:

    i see that the xp boot.ini is gone but is there anyway 2 get back the xp? I installed it from a bootable DVD. I already said i didn’t choose UPGRADE, and b4 installing i had 2 format the C:\ drive where i had one of my XPs…

    • amida168 says:

      If you cannot get to XP by following the steps in this article, you can try EasyBCD and see if that works for you.

  32. WANA says:

    Thanks to amida168 and TheEconomist, my Windows XP now boots just fine.

    Windows XP > First primary Partition > in Win7 => D:
    Windows 7 > Second primary Partition > in Win7 => C:

    First i did the steps written in Post 1. After that i copied NTDETECT.COM and boot.ini (no change required) to Win7 Partition (C:) and rebooted. Thats it.

    Sincerly Yours,
    WANA

  33. yos says:

    Thanks a lot!!
    working well

  34. uoziod says:

    Hello… Beforehand sorry for my English)…
    I had carefully read all comments but didn’t find something connected with my problem.

    Using Windows 7 on SATA-drive. Today I get my old IDE hard-drive, plug it in, plug off SATA-drive with Windows 7 and start XP installation.

    Some info: my SATA-drive consist of 2 partitions (C and D).

    When I pluged in IDE, in Drive Management of MMC SATA-drive became Disk 1, and IDE has set as Disk 0. So…

    After that I read manual (in topic) and create boot record for E:-drive (Disk 0) as \Windows XP\ and reboot. When I trying to load \Windows XP\ my PC restarts (I guess possible thats I didn’t seen even error message while video mode switching).

    When I plugging off SATA-drive or setting IDE-drive as first boot drive in BIOS XP starts without any problem…

    I didn’t thing thats any problem in XP’s \boot.ini\ file… Guess something in bcdedit settings… Btw bcdedit’s result:

    ***

    C:Windowssystem32>bcdedit

    Диспетчер загрузки Windows
    ——————–
    идентификатор {bootmgr}
    device partition=C:
    description Windows Boot Manager
    locale ru-RU
    inherit {globalsettings}
    default {current}
    resumeobject {f1431ab2-ab81-11de-bbab-a2733f1ca285}
    displayorder {current}
    {ntldr}
    toolsdisplayorder {memdiag}
    timeout 30

    Загрузка Windows
    ——————-
    идентификатор {current}
    device partition=C:
    path Windowssystem32winload.exe
    description Windows 7
    locale ru-RU
    inherit {bootloadersettings}
    recoverysequence {f1431ab4-ab81-11de-bbab-a2733f1ca285}
    recoveryenabled Yes
    osdevice partition=C:
    systemroot Windows
    resumeobject {f1431ab2-ab81-11de-bbab-a2733f1ca285}
    nx OptIn

    Загрузчик прежних версий ОС Windows
    ————————
    идентификатор {ntldr}
    device partition=E:
    path
    tldr
    description Windows XP

    ***

    Thanks!

  35. stethOscope says:

    unbelievable. THIS WORKS!

    after doing a dual install of xp on my lenovo ideapad [s10e] preinstalled with windows 7, i naturally couldnt boot into windows 7 because xp install stuffs up the win7 boot loader.

    i was able to get the win7 boot loader working again simply by using my win7 boot disk [which in my case is a USB boot disk because my ideapad doesnt have a dvd drive] and running the “repair my installation” options.

    However, this took away xp from the boot loader/manager thing, whatever. i managed to force my way back into xp by using my xp boot disk [again a USB boot disk], but i couldnt get xp back in the boot loader.

    i even paid $12 and downloaded DualBootPro to try and fix the problem, which might have worked had i not messed things around already. DualBootPro in fact made it now imposible for me to force my way into xp because it cleaned up the boot files for win7 and must have deleted something for xp. damn…

    then i came across amida168s amazingly simple and short solution.
    THESE COMMANDS WORK, if only i came across them days ago. =)
    Thanks a million amida, i owe you one!

  36. mgfirewater says:

    great work!

    xp and win7 are friends again ;)

  37. washcloud says:

    …usually when it comes to tweaking MS’s OSs, the web can be proven a MAJOR pain in the butt, by getting drown in an ocean of USELESS info – that in the end will probably not even get you the solution you were looking for in the 1st place. ESPECIALLY when it comes to issues with bootloading procedures.

    For example, before checking with amida168’s post here, I was already MISGUIDED by a couple of other, not-so-comprehensive posts at other sites.
    However lucky enough (lucky cause I seem to have hit the right Google search terms this time), this post soon came to my attention.
    And YES, it worked right on the first attempt.

    Thanks so much man.

  38. Dhaval Prajapati says:

    Hello i use this theme but when i select the windows xp from the boot menu

    some cx0003 error is present and tips me to repair your system….

    so i have already XP in other drive and windows 7 is costomise in other drive…

    please help me over this problem…:)

    with regards,

    Dhaval Prajapati

    • amida168 says:

      Maybe some of the system files used by XP are missing. You can try EasyBCD and see if it works for you.

Leave a Reply




Get Adobe Flash playerPlugin by wpburn.com wordpress themes