Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I upgraded from Windows XP to Windows 7, I had a second drive around and set it to dual boot.

After a while, I decided that I wasn't ever going to go back to Windows XP, and so I deleted the windows directory on that drive. Unfortunately, now I can't remove Windows XP from the boot menu.

I tried going into MSCONFIG to the boot tab, but it only lists windows 7.
I don't know if it's still going off of the Windows XP Boot ini.

edit: Before:

C:\Windows\system32>bcdedit /v

Windows Boot Manager
--------------------
identifier              {9dea862c-5cdd-4e70-acc1-f32b344d4795}
device                  partition=D:
description             Windows Boot Manager
locale                  en-US
inherit                 {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
default                 {d703a693-0587-11df-9a8e-e8a34060eec6}
resumeobject            {d703a692-0587-11df-9a8e-e8a34060eec6}
displayorder            {466f5a88-0af2-4f76-9038-095b170dc21c}
                        {d703a693-0587-11df-9a8e-e8a34060eec6}
toolsdisplayorder       {b2721d73-1db4-4c62-bf78-c548a880142d}
timeout                 30

Windows Legacy OS Loader
------------------------
identifier              {466f5a88-0af2-4f76-9038-095b170dc21c}
device                  partition=D:
path                    \ntldr
description             Earlier Version of Windows

Windows Boot Loader
-------------------
identifier              {d703a693-0587-11df-9a8e-e8a34060eec6}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
recoverysequence        {d703a694-0587-11df-9a8e-e8a34060eec6}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {d703a692-0587-11df-9a8e-e8a34060eec6}
nx                      OptIn

After:

C:\Windows\system32>bcdedit /delete {466f5a88-0af2-4f76-9038-095b170dc21c} /f
The operation completed successfully.

C:\Windows\system32>bcdedit /v

Windows Boot Manager
--------------------
identifier              {9dea862c-5cdd-4e70-acc1-f32b344d4795}
device                  partition=D:
description             Windows Boot Manager
locale                  en-US
inherit                 {7ea2e1ac-2e61-4728-aaa3-896d9d0a9f0e}
default                 {d703a693-0587-11df-9a8e-e8a34060eec6}
resumeobject            {d703a692-0587-11df-9a8e-e8a34060eec6}
displayorder            {d703a693-0587-11df-9a8e-e8a34060eec6}
toolsdisplayorder       {b2721d73-1db4-4c62-bf78-c548a880142d}
timeout                 30

Windows Boot Loader
-------------------
identifier              {d703a693-0587-11df-9a8e-e8a34060eec6}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}
recoverysequence        {d703a694-0587-11df-9a8e-e8a34060eec6}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {d703a692-0587-11df-9a8e-e8a34060eec6}
nx                      OptIn

I'll have to wait until later to restart it and test it out though

share|improve this question
    
So you had Windows XP on HDD 1 and Windows 7 on HDD 2. And then you deleted C:\Windows directory from HDD 1 but you did not format the disk? Now when you boot the computer you see both Windows XP and Windows 7 as options? –  sammyg Aug 23 '12 at 8:37
    
Yeah, that's pretty much it. I had stuff on HDD 1 that I wanted to keep, but I wanted to free up the room in Windows and Program Files that weren't going to be used any more. –  AndyD273 Aug 23 '12 at 12:40
    
Windows 7 normally creates a 100 MB system partition, and its boot information is stored there. Its not on the MBR. So as I said, clear the MBR using fdisk of the XP (HDD1), and boot with the windows 7 (HDD2) by changing it in the BIOS.. it's the simplest solution.. –  aliasgar Aug 23 '12 at 13:02
    
@aliasgar Correct me if I'm wrong but fdisk is not available in Windows XP. I believe that fdisk was only available in DOS and Windows 95 and 98. On the other hand, even if fdisk was part of Windows XP this user would not be able to use it since he already has deleted the Windows directory. So how do you plan to boot into Windows 7 and... do what?... use fdisk from the Windows XP disk drive?... which is stored where, if Windows directory is already gone? –  sammyg Aug 23 '12 at 15:05
add comment

4 Answers 4

up vote 7 down vote accepted

You need to manually edit the BCD (Boot Configuration Data) store. To do that, you will have to use a tool called bcdedit.

Export BCD settings for backup

Start by exporting your current BCD settings for backup.

  1. Boot into Windows 7
  2. Log in with an administrator account
  3. Open up an elevated command prompt
  4. Type bcdedit /export c:\bcdbackup and press Enter

This will create a file named bcdbackup on your C disk. Note that there is no file extension in the file name. No file extension is needed here. You can change this location or the name of the file if you like, but having it stored on the root of C will make it easy to find if needed.

List all entries in BCD store

This will return a list of all the operating systems that the computer can boot from.

  • Enter bcdedit and press Enter
  • Enter bcdedit /v and press Enter

By using the V switch the list will give you the UUIDs. Here is an example of what it could look like if you only use bcdedit without the V (verbose) switch.

bcdedit1

And here is an example with the V switch.

bcdedit2

You need to use the V switch to see the UUIDs for the different operating systems.

Deleting the Windows XP entry

Do you see any entry for Windows XP on the right side of the description headline? If so, then you need to delete it. And to delete it, you need to know its identifier.

The identifier is the UUID number you see on the right side of the identifier headline, including the braces. Braces are the curly brackets at the start and the end of the number.

  1. If you have not done so yet, type bcdedit /v and press Enter
  2. Locate the identifier UUID for the entry that has "Windows XP" as description.
  3. To delete the entry type bcdedit /delete {UUID} and press Enter.

Depending on how many operating systems you have installed, this could take anywhere from 4 minutes to 15 minutes. Just let it do its thing, you will see a confirmation message when it's done.

Warning! Make sure you type in the correct UUID! You need to type in the UUID for Windows XP. If you type in the UUID for Windows 7 then you will not be able to boot into Windows 7, at least not until you restore it using the backup file you created earlier.

When you see the confirmation message, type bcdedit /v again and press Enter. Make sure that there is no entry for Windows XP anymore. Reboot the computer to make sure that you can boot into Windows 7, and that the boot loader is no longer presenting the boot menu. If this is the case then you are all done now.

How to rebuild an existing BCD store using bootrec

If you still see the boot menu, or if you are unable to boot into Windows 7, then you will have to do one of two things.

  • A: Restore the BCD using the backup file you created earlier (see instructions below).
  • B: You can rebuild the BCD using a tool called Bootrec.

To do either one of these things you will need to enter the System Recovery Options.

  1. Reboot the computer
  2. Press and hold the F8 key right after the POST, until you see the Advanced Boot Options menu. The POST is the power-on-self-test, this is the first screen that appears when you start the computer.
  3. Select the Repair Your Computer option and press Enter. This should take you to the System Recovery Options, also known as WinRE (Windows Recovery Environment).

When you get to the System Recovery Options click on the Command Prompt link to open up a command prompt. To try to rebuild the existing BCD store as it is type bootrec /rebuildbcd and press Enter. Now it will scan hard disk drives for Windows installations.

If the bootrec finds any Windows installations it will ask you whether or not you want to add it to the boot list. To say yes press Y, to say no press N, and to say yes to all press A. If Windows 7 was previously removed from the boot list then this operation should add it back to the boot list.

How to rebuild a new BCD store using bootrec

If the bootrec does not find any Windows installations, then you will have to delete the BCD completely and then run the bootrec /rebuildbcd command again and bootrec will create a brand new working BCD store.

The BCD store is located in C:\Boot. But instead of deleting the BCD you can also rename it from BCD to BCD.old. This has the same effect as deleting it - Windows will no longer use it, but the benefit is that you have one extra layer of backup of the BCD. To rename the BCD you will first have to change its attributes.

  1. Type attrib c:\boot\bcd -h -r -s and press Enter This will remove the attributes Hidden, Read-only and System.
  2. Type ren c:\boot\bcd bcd.old and press Enter
  3. Type bootrec /rebuildbcd and press Enter To add found Windows installations to the boot list press Y or A for all. This should create a new BCD file in C:\Boot. This new file will be different from the old one that was previously renamed.

Reboot the computer and see if you are able to boot into Windows 7, and if you get the boot menu. If you don't see the boot menu and you are able to boot into Windows 7 then everything is alright now.

Import BCD settings from backup

If you for some reason want to restore your BCD to the backup copy you created earlier you can use the bcdedit /import c:\bcdbackup command. You can use this command either from within Windows, or from the WinRE command prompt.

Reminder

For the future, make sure to remove the old Windows entry from the boot list before deleting the Windows folder. To do that, you can use the msconfig tool, as I'm sure you're familiar with that. It is only after you have removed the boot list entry for the Windows version you plan on removing that you can delete its Windows folder.

I would personally prefer to completely format that disk partition. If you are concerned about your personal files that are still stored on the old disk then you should back them up or simply copy them over to the new disk. It's also a good practice to store personal files on a separate partition. That way you will be able to access them easily from other operating systems.

share|improve this answer
    
I get this: "C:\Windows\system32>bcdedit /delete {466f5a88-0af2-4f76-9038-095b170dc21c} This entry cannot be deleted unless the /f switch is specified on the command line. Run bcdedit /? for more information. Access is denied." bcdedit /? doesn't list the /f flag, and it doesn't work if I try putting it in there. –  AndyD273 Aug 23 '12 at 13:03
    
To get more information about the F switch you can type bcdedit /delete /?. –  sammyg Aug 23 '12 at 13:12
    
This is because this entry has a well known identifier, i.e. it is a Windows operating system entry. Can you please confirm, is this indeed the UUID for your Windows XP entry? And are you logged in as an administrator in Windows 7? And you have administrator privileges (elevated command prompt)? If so, then it should be safe to use the F switch. –  sammyg Aug 23 '12 at 13:13
1  
If the UUID stated above is indeed your Windows XP entry then you should try the same command with the F switch as suggested by the program. So type bcdedit /delete {466f5a88-0af2-4f76-9038-095b170dc21c} /f and press Enter. –  sammyg Aug 23 '12 at 13:16
1  
Of course, syntax is very important. If you use the bcdedit /delete /? command you will see that the F switch is actually supposed to come after the UUID. The last switch you could use is the cleanup switch. So bcdedit /delete {your UUID} /f /cleanup. Reboot and see if the problem is solved. If this doesn't solve the issue then ultimately you can use the method described above to create a completely new BCD store in WinRE and have the bootrec /rebuildbcd re-create all entries. You can also create a BCD store with bcdeditbut it will be empty and you will have to add everything manually. –  sammyg Aug 23 '12 at 13:27
show 2 more comments

Since I have done this before, here it is:

  1. Go to cmd or boot with a bootable disk which takes you to command prompt and execute

    C:> fdisk /mbr

    and press Enter key.

  2. Reboot.

  3. Go into BIOS, and set the Windows 7 Drive to boot before any other drive, and you wont have a bootloader option anymore. It will boot directly into Windows 7

share|improve this answer
    
C:\>fdisk /? 'fdisk' is not recognized as an internal or external command, operable program or batch file. –  AndyD273 Aug 23 '12 at 13:25
    
if your Running it on XP check out this video : ehow.com/video_4992226_run-fdisk-windows-xp-pro.html and for additional documentation check : support.microsoft.com/kb/69013 If you have a windows 98 bootable CD.. boot with CD-ROM support, and that will also run fdisk –  aliasgar Aug 23 '12 at 13:34
    
@AndyD273 If you from within Windows 7 command prompt type fdisk and press Enter it is normal to get the kind of error you are getting. This is because the fdisk command doesn't exist. As simple as that. Type helpand press Enter and you will see a complete list of internal commands you can use, and you will not find fdisk to be one of them. To check for external commands type start c:\windows\system32. This will open the search path in Explorer. Now try to locate fdisk and you will not find it. So this is all very normal for Windows 7. –  sammyg Aug 23 '12 at 15:14
    
Windows 98? Use Windows 98 to fix Windows 7? That's like saying use a hammer to fix a rocket launcher. That's one ancient OS. As I understand it the user has Windows 7 installed and working, and this is the one he want to keep. –  sammyg Aug 23 '12 at 15:16
    
That Microsoft article applies to Windows 95, not to Windows 7. You can see that at the bottom of the page. But you can accomplish the same thing with the bootrec command in Windows 7 as you would with fdisk /mbr in Windows 98 and earlier, or the fixmbr in XP. So why not use the fixmbr or the fdisk command instead? –  sammyg Aug 23 '12 at 15:18
show 6 more comments

How to remove a second installation of a Windows operating system from a partition

http://support.microsoft.com/kb/888023

Remove Ubuntu or XP from the Windows 7 Boot Menu

http://www.howtogeek.com/howto/17903/remove-ubuntu-or-xp-from-the-windows-7-boot-menu/

share|improve this answer
add comment

Go to run in your start menu, type msconfig, hit enter, select boot tab find and highlight the OS you want to delete then hit the delete button.

share|improve this answer
1  
"I tried going into MSCONFIG to the boot tab, but it only lists windows 7." OP tried that –  Journeyman Geek Dec 22 '13 at 0:03
    
+1 Journeyman, that one is on me. However, I actually just solved the same issue not 2 hours ago by using the method I mentioned above, so I'll leave it there as an additional option for future OPs. I up-voted Sammy for his answer, and for teaching me something in the process. –  Josh Campbell Dec 22 '13 at 1:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.