Drive letters swapped after system restore (C: → D:)
Solution 1
Boot to a recovery console and use diskpart.
Just run the command diskpart
lis vol
sel vol #
(select the volume number of the current C: partition [the old D:])
inactive
sel vol #
(select the current D: [old C:])
active
Hopefully that will allow it to boot to the proper volume. There might be a problem with the volume D: [old C:] and may need to run a chkdsk -f
on it.
Solution 2
Or go to: HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
Remove \DosDevices\C
Then remove OS wrong disk letter in diskpart in recovery mode
list vol
select volume 0
assign remove=e
assign letter=c
Solution 3
just wanted to add a solution to this problem, since this question is one of the top google search results. Hope others find it useful!
I had to change the drive letter back to C after reinstalling windows and finding that some essential drivers assume the drive letter is C and therefore can never be installed. There is a super easy solution, and you can effectively change the drive letter back to C after reinstalling windows or whatever. Just create a symbolic link.
Right click My Computer, go to Computer Management, shrink a drive down 8MB, and create a new drive C:/.
Then just open the command prompt as administrator (type cmd into start menu, right click run as administrator), and and type commands like this, as necessary.
mklink /J "C:\Program Files" "D:\Program Files"
mklink /J "C:\Program Files (x86)" "D:\Program Files (x86)"
mklink /J "C:\Users" "D:\Users"
mklink /J "C:\Windows" "D:\Windows"
Sadly, it appears that it is not possible to go directly from D to C, but this will fix any program installation issues and works for all practical purposes. But at least this works immediately with no loss of time or risk of headache.
Related videos on Youtube
Brice
Updated on September 18, 2022Comments
-
Brice almost 2 years
I’ve been having problems with my Gateway desktop recently. I decided to do a system restore (in safe-mode), and the next thing I knew, the drive letter had been changed from C: to D:.
I can’t do another system restore because the Repair PC menu only shows two options: Startup Repair and Factory Settings. I also can’t log into any accounts because they’re not listed, even in safe-mode (probably because they’re on a different drive letter). It’s now asking for a username and password that has never been created.
Is there a way to change the drive letter back without having to log in to an account?
-
Synetech over 10 yearsWhen you say you did a system-restore in safe-mode, do you mean you actually booted Windows into Safe Mode or into System Recovery Options?
-
Brice over 10 yearsI booted it into safe mode before having this problem (Drive swap)
-
Synetech over 10 yearsThat’s pretty odd because for Recovery Options, you actually boot into a separate, stripped-down “PE” version of Windows and the drive letters are indeed reassigned (
C:
is the virtual drive for the PE OS and your regular drive isX:
by default). But in safe-mode, it should not be changing drive letters at all; the system drive should appear asC:
as normal. You said you had some problems before using system restore; perhaps something you used to try to fix it changed the drive letter but didn’t change it back. Had you done anything else that before the system restore? -
Brice over 10 yearsI uninstalled a couple programs. It could have been PowerISO, cause that was one of the few i uninstalled. After i uninstalled it (in safe mode) i restarted my PC (again in safe mode). It loaded fine that time so i decided to do a system restore. After it finished, i started having this problem.
-
-
Brice over 10 yearsI'm not able to boot to the recovery console. I only get two options in repair PC.
-
jredd over 10 yearsDo you have an OS recovery CD/DVD ? You can download an iso for Windows 7 here: msft.digitalrivercontent.net/win/X17-24209.iso
-
Will about 6 yearsDon't do this if it is your boot partition appearing as c: as then you won't get your machine to do anything!
-
StanTastic over 2 yearsJust a note, it's not "assign remove=e" but "remove letter=e".