What exactly do I need to change the system drive with the boot loader?

I have two drives, A and B. Drive A was my original drive, with windows XP. My BIOS points to it to get into the boot loader.

Eventually I got drive B and installed a new OS (Windows 7) but I kept the old one working with dual booting. So drive A is the one that actually starts the loading process, even though drive B has the \windows directory (for 7)

Now… I want to phase out drive A. The original OS is unimportant to me. So I need to have my BIOS point to drive B, and create a boot loader on drive B to point to the right windows.

So what exactly do I need to do? IIRC, I need to move the boot.ini file over, and change the partitions to point to the right place. Since it’s probably pointing to drive(1)part(0) right now, I’d need to change that to drive(0)part(0) so drive B points to itself. What else do I need to do so that B can boot itself?

Boot.ini no longer exists.

Run cmd.exe as admin (in 7)
“diskpart.exe”
“list volume”
“select volume x” where x is the number for B
“active”
“exit”
“bcdboot B:\windows /s B:” where B is the drive letter of B
Reboot

I did that, and everything seemed to work fine, but it won’t boot. I switch the hard drive boot priority, and it just hangs where the bios would normally hand off to the OS.

Doing diskpart/list volume again still lists Drive A as the system drive, which is where the boot loader is. Marking the drive active doesn’t change the system drive.

BCDBOOT makes it the system drive.

Try this:

In diskpart, select the A drive
“assign letter=x:”
select B drive
“assign letter=c:”
exit
bcdedit /set {default} device partition=c:
bcdedit /set {default} osdevice partition=c:
bcdedit /set {bootmgr} device partition=c:

Shut down and remove the A drive.

Tried, same result - hangs when the BIOS hands off to the OS.

How does BCDEDIT know which boot files it’s modifying? That is… both drive A and drive B now have a \boot directory at their root. It was created on Drive B when I followed this instruction ““bcdboot B:\windows /s B:” where B is the drive letter of B”

But if I were just to type bcdedit /set (whatever), since this windows install recognizes drive A as the system partition, it would be editing the \boot dir on drive A, right? So the changes wouldn’t effect what I’m trying to do with drive B when I disconnect A and try to boot from B.

To make it clear:

DISKPART> list volume

Volume ### Ltr Label Fs Type Size Status Info


Volume 0 D 081015_1301 CDFS DVD-ROM 17 MB Healthy
Volume 1 I DVD-ROM 0 B No Media
Volume 2 E Raptor NTFS Partition 69 GB Healthy System
Volume 3 C 640P1 NTFS Partition 146 GB Healthy Boot
Volume 4 F 640P2 NTFS Partition 449 GB Healthy

“Raptor” is drive A, “640P1” is the first partition on Drive B that holds the Windows 7 install.

So strangely enough, I was installing a different hard drive, and I unplugged the raptor (drive A) to make room to plug the other one in. Somehow in the process I ripped off the SATA connector entirely off the raptor and couldn’t get it to work. So just coincidentally, the same day I was trying to make drive B boot independently of drive A, I happened to break drive A…

Which left me unable to boot, which is the scenario I was fearing in the first place.

Anyway, I was able to get on the interwebs via my ipod, and found out doing one of “bootrec /fixmbr” “bootrec /fixboot” or “bootrec /buildBCD” was able to properly set up the boot loader.

Glad you’re running. There can only be one active partition at a time, that’s what bcdedit works on. System files are copied using bcdboot, the active partition is set with diskpart.