How do I change the partition that Windows 7 boots from (the "system" partition)?

26,533

From XP

Open up cmd and type

diskpart

and then

list partition

Make note of the number of the partition that you want to mark as active.

type

diskpart

and at the diskpart prompt

select partition *the partition number you wrote down*

at the diskpart prompt

active

Now use bcdboot.exe to copy the Windows 7 boot files to the new system partition.

Bcdboot D:\Windows /c C:

Bcdboot copies the required boot environment files for Windows 7 to the C: partition, and creates a new BCD store to boot Windows 7 from the D: partition.

Now The legacy boot files are: NTDETECT.COM, NTLDR, and BOOT.INI. To copy these hidden files from the root directory of the legacy OS partition to the new system partition, execute the following commands:

xcopy /h C:\NTDETECT.COM C:
xcopy /h C:\ntldr C:
xcopy /h C:\Boot.ini C:

Now reboot to windows 7 to establish the new system partition. This i believe should fic your issue. To see where i got this answer ho here: http://technet.microsoft.com/en-us/library/ee829686(v=ws.10).aspx#BKMK_Step1

Since youre not going to dual boot XP and 7 you should not have to do anything after rebooting to windows 7. Then you should be able to delete the XP partition.

Share:
26,533

Related videos on Youtube

Alexand3rS
Author by

Alexand3rS

Updated on September 18, 2022

Comments

  • Alexand3rS
    Alexand3rS over 1 year

    (I've searched around but most cases deal with having two hard drives, not two partitions on one hard drive.)

    My 1TB hard drive has two partitions: one for Windows XP and one for Windows 7. The Windows XP partition was created first, before the Windows 7 installation. I'm trying to delete my Windows XP partition but I find that I cannot format it from Windows 7 because this partition is still the "system" and "active" partition. I've tried changing the Windows 7 partition to "active" and rebooting, trying to repair the installation with the Windows 7 disc (to add the "system" data to the Windows 7 partition) but that just sent me through a nightmare of "BOOTMGR is missing" and my Windows 7 partition suddenly becoming RAW format, which I just recovered from (dodged a bullet, there).

    My question is: how would I make my Windows 7 partition the "system" drive, removing the reliance on the Windows XP partition so I could format it?

    I have my original Windows 7 installation disc and an Ubuntu 12.04 livecd at my disposal.

    My disk management screen:

    my disk management screen

  • Alexand3rS
    Alexand3rS over 10 years
    I did what you said, with the BCDboot command as: bcdboot D:\Windows /s C: from the Windows Recovery Environment command prompt. Upon restart, I got a BOOTMGR IS MISSING error, and chose to repair my startup with my Windows 7 disc. After the repair, I boot into Windows 7 to see that my Windows 7 partition is the system partition and can now format the Windows XP partition. In other words, this worked. Thanks!
  • cbalos
    cbalos over 10 years
    Your're welcome, glad to see it worked!
  • SuperTempel
    SuperTempel over 8 years
    Uh, I believe the xcopy cmds are wrong because they copy from C: to C:, don't they?