After buying a new case and SSD we decided to reinstall Windows 7, I had a USB stick laying around from when I had to install it on a new UEFI notebook. This USB stick uses EFI to boot.
The install went well, before installing we disconnected all other disks, including the HD that had the Windows 7 install we where going to replace. The machine booted and everything was OK. Until we connected the old HD again.
At this point Windows complained that the installation was broken, and that we should run startup repair, which we did. After rebooting the machine just displays a blinking cursor, nothing else happens.
After inserting the old HD and attempting to boot the BIOS reported a new startup disk named "Windows Boot Manager". When we select to boot from the SSD the blinking cursor appears, when we select to boot "Windows Boot Manager" the startup repair prompt appears, after running it it just appears again.
My first guess was to check whether or not the old boot partition was set active, so I inserted the HD into another Windows 7 machine, but it developed the exact same problem. I had a FreeBSD boot stick laying around, so I booted into it and used gpart to remove the active flag. This didn't solve the problem (afaik EFI ignores the active flag, so I didn't really expect it to work.)
After that I used gpart to install the FreeBSD bootloader onto the disk, basically to wipe the boot sector. This didn't help either.
After that I removed the old Windows 7 partition, then we had to boot from the installation USB stick and run startup repair again, this solved the problem. From this point on the machine boot perfectly.
However, when we create a new partition in the free space the problem returns. Again, removing this partition with FreeBSD solves the problem.
The old disk used MBR instead of GPT, and my guess is that that is part of the problem, although I don't know how.
From this point on the machine is booting the "Windows Boot Manager" instead of just the SSD, but it boots perfectly as long as that first partition is not present on the old HD.