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:Windowssystem32>bcdedit /vWindows Boot Manager--------------------identifier {9dea862c-5cdd-4e70-acc1-f32b344d4795}device partition=D:description Windows Boot Managerlocale en-USinherit {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 30Windows Legacy OS Loader------------------------identifier {466f5a88-0af2-4f76-9038-095b170dc21c}device partition=D:path ntldrdescription Earlier Version of WindowsWindows Boot Loader-------------------identifier {d703a693-0587-11df-9a8e-e8a34060eec6}device partition=C:path Windowssystem32winload.exedescription Windows 7locale en-USinherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}recoverysequence {d703a694-0587-11df-9a8e-e8a34060eec6}recoveryenabled Yesosdevice partition=C:systemroot Windowsresumeobject {d703a692-0587-11df-9a8e-e8a34060eec6}nx OptIn
After:
C:Windowssystem32>bcdedit /delete {466f5a88-0af2-4f76-9038-095b170dc21c} /fThe operation completed successfully.C:Windowssystem32>bcdedit /vWindows Boot Manager--------------------identifier {9dea862c-5cdd-4e70-acc1-f32b344d4795}device partition=D:description Windows Boot Managerlocale en-USinherit {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 30Windows Boot Loader-------------------identifier {d703a693-0587-11df-9a8e-e8a34060eec6}device partition=C:path Windowssystem32winload.exedescription Windows 7locale en-USinherit {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}recoverysequence {d703a694-0587-11df-9a8e-e8a34060eec6}recoveryenabled Yesosdevice partition=C:systemroot Windowsresumeobject {d703a692-0587-11df-9a8e-e8a34060eec6}nx OptIn
I’ll have to wait until later to restart it and test it out though
Solution:
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.
- Boot into Windows 7
- Log in with an administrator account
- Open up an elevated command prompt
- 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.
And here is an example with the V switch.
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.
- If you have not done so yet, type
bcdedit /v
and pressEnter - Locate the identifier UUID for the entry that has “Windows XP” asdescription.
- To delete the entry type
bcdedit /delete {UUID}
and pressEnter.
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.
- Reboot the computer
- Press and hold the F8 key right after the POST, untilyou see the Advanced Boot Options menu. The POST is thepower-on-self-test, this is the first screen that appears when youstart the computer.
- Select the Repair Your Computer option and pressEnter. This should take you to the System RecoveryOptions, 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.
- Type
attrib c:bootbcd -h -r -s
and press Enter Thiswill remove the attributes Hidden, Read-only and System. - Type
ren c:bootbcd bcd.old
and press Enter - Type
bootrec /rebuildbcd
and press Enter To add foundWindows installations to the boot list press Y orA for all. This should create a new BCD file inC:Boot
. This new file will be different from the old one that waspreviously 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.