Windows 7 setup and repair seems to randomly assign drive letters. Sometimes you get really lucky and the drive you want to install windows to is already
C:. Others, it picks
D: for example, happily installs but then something along the way is hard coded for
C:. The first boot is generally OK because you have windows setup able to boot it for you. Often after I restart the new OS for the first time it fails to boot.
The simplest way to solve this is only ever have one hard drive plugged in at install time and only ever install windows with a CD drive (thankfully windows doesn't assign
C: to these). Fun limitation. However in my case I'm installing to virtualbox from a USB, which I've mapped as a hard drive. I can't change the drive letters after setup has randomly picked them for me.
How did this end up being a thing and why are there not more angry people around?
- How do I fix it?
This is what I've tried so far:
Some windows installs give you an option for repair/recovery mode when hitting F8 during boot, but since my MBR is foobared this doesn't help. I can start it from the windows setup USB though an got myself a command prompt.
Automatic repair wasn't smart enough to figure I want the system partition to be
To change what drive letters I basically followed this guide: https://support.microsoft.com/en-us/kb/223188
However when typing 'regedit' from startup repair, I got the startup repair's registry, not the one for my shiny new OS. Apparently this needs to be mapped.
In my case I had 3 drives showing:
C: -> the usb I was booting startup repair from.
D: -> broken windows install, the one we want
X: -> the startup repair's virtual OS
HKEY_LOCAL_MACHINE, File -> Load Hive, navigated to
D:\Windows\system32\config and choose
System (from here:
foobar or whatever in the box for the name. Then open
Then renamed the
C: entry, replacing
E. Then changed the
D in the
D: entry to
I assumed this fixed the drive mapping, although my MBR/bootloader/whatever was still foobared. The auto-repair startup problems feature got that back though. People often recommend using this and rebooting three times in a row so I did that too.
Finally I can boot, standalone. However I'm left in a desktop with no windows explorer. Starting one (ctrl-alt-del -> new task -> explorer) kind of works but not really. As soon as I try to run anything it says the file/executable can't be found, even from cmd. What's really odd is my system drive is now E.