How-To Geek Forums / Windows 7
(Solved) - Windows XP Removal
(12 posts)- View Accepted Answer
- Remove Solved Status
I assumed you are dual booting xp and 7. Foremost is to make sure you have a backup image of your drive. This is just a protection if something goes wrong during the process.
When you create a dual-boot system and install Windows 7 on a second partition, setup installs all the Windows Boot Manager files on the first partition, which in this case is the Windows XP partition (this why you can not format the XP partition (in use). You need to copy the Windows Boot Manager files from the Windows XP partition to the Windows 7 partition. Boot into XP, in open Windows Explorer > Tools menu > Folder options >View tab and make sure that the "Show Hidden Files and Folders" option is selected and that "Hide Extensions for Known File Types" and "Hide Protected Operating System Files" are cleared. Go to the root folder of the XP drive (C:\) and copy the Boot folder and the bootmgr file to the root of your W7 drive.
Boot from your Windows 7 DVD, select "Repair Your Computer" option. From the System Recovery Options dialog box choose Command prompt option. At the Command prompt type
DISKPART
To select the harddrive type
SELECT DISK 0
Type LIST PARTITION to list all the partition on the drive and take note of the partition number.
To select the first partition (XP) by typing the command:
SELECT PARTITION 1 (if its #1)
(note: you may want to double-check that you have the Windows XP partition selected by typing the command}
DETAIL PARTITION
Delete the Windows XP partition by typing the command:
DELETE PARTITION
Now select the Windows 7 partition by typing the command:
SELECT PARTITION 2 (if It is #2)
Make the Windows 7 partition the active primary partition by typing the command:
ACTIVE
Exit Diskpart by typing EXIT.
Still at the Command prompt, write the master boot record to the Windows 7 partition by using the command:
Bootrec /fixmbr
write a new boot sector to the Windows 7 partition by using the command:
Bootrec /fixboot
Exit and Restart your system (remove your W7 dvd)
To remove the Windows XP item from the Windows Boot Manager menu, open Command prompt with Administrator privileges. (Right-click and select Run as Administrator.) Then, type the command:
BCDEdit /delete {ntldr} /f
Now, restart the system and you should boot right into Windows 7.
Reclaim the unallocated space (formerly XP) in Disk Management.
Your XP partition is the active partition with the bootmgr. If you delete it, your Win7 will not boot any more. I have written a tutorial how to go about that correctly. See here: http://www.sevenforums.com/tut.....te-os.html
Doesn't the diskpart 'Active' command solve that? Or can it not make the first logical partition an active primary one?
However, I'm concerned the partition numbers may change after deleting the XP one - can you confirm that's not a problem, G41M?
Edit: (I've never seen a partitioning scheme like that before, with only one primary where there's two Windows OS!)
Edit: (Answering my second question) I guess the partition numbers don't change until you run bootrec /fixmbr
1. You need only one primary partition in the whole system if this is the active partition. It will contain the bootmgr where the BCDs of several Operting Systems can reside.
2. If you have a primary, active partition, you can install an OS into a logical partition.
3. In this case, it would not be enough to make another partition (other than the XP partition) active. You also have to move the bootmgr. 'Active' means the partition CAN have a bootmgr, but unless you move it there, it will not show up by itself.
4. I would not worry about the partition number. The running OS is usually C. And it has nothing to do with fixmbr. That will resolve itself by moving the bootmgr.
5. Rick, I completely miss your point.
G41M's 'howto' includes instructions to copy across the needed boot files. But what the 'active' command can achieve is crucial. What raphoenix says makes sense to me; it doesn't seem likely 'active' can pull off the necessary transformation. (I can't test diskpart nowadays; all the PCs I can currently readily access are system encrypted.)
Topic Closed
This topic has been closed to new replies. Please create a new topic instead.
