0

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.

  1. How did this end up being a thing and why are there not more angry people around?
  2. 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 C:.

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

I ran regedit, selected HKEY_LOCAL_MACHINE, File -> Load Hive, navigated to D:\Windows\system32\config and choose System (from here: https://en.wikipedia.org/wiki/Windows_Registry). Entered foobar or whatever in the box for the name. Then open foobar -> MountedDevices.

Then renamed the C: entry, replacing C with E. Then changed the D in the D: entry to C.

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.

1 Answer 1

0

OK, it seems the mapping was originally correct and it was a combination of a missing MBR and startup repair mapping drives strangely that was confusing me.

Repeating the steps in the question to swap drives E and C, followed by a bootrec /fixboot for good measure seemed to work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .