09 Jan 2007

Change drive letter on a boot device

27 Comments Technology

I've been running Vista and XP side by side for a few months now, and what I designated as a small partition has slowly got bigger and bigger until there was no space left on my Vista partition, so today I decided to re-jig my partitions. No problem, but due to the lack of partition managers for Vista, I had to boot back to XP and fire up Partition Magic. The problem started when I tried to boot back to Vista, which gave me loads of errors about files not being found before refusing to boot. I was pretty baffled by this point, because from XP I could see that the files that Vista was complaining were missing were right there where they were supposed to be. To fix Vista, I had to boot from the install CD and use the automated recovery tool, but then when I started Vista, my drive letters were all wrong. Now I could see which partitions matched which drive letters, but windows wouldn’t let me change them because they were for the system drive. After a good two hours of trawling through technet, I eventually found a solution:

1. Go to the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
2. Find the drive letter you want to change to (new). Look for "\DosDevices\C:".
3. Rename it to an unused drive letter "\DosDevices\Z:".
This frees up drive letter C.
4. Find the drive letter you want changed. Look for "\DosDevices\D:".
5. Rename it to the appropriate (new) drive letter "\DosDevices\C:".
6. Click the value for \DosDevices\Z:, click Rename, and then name it back to "\DosDevices\D:".

MS KB article

written by
The author didn‘t add any Information to his profile yet.

27 Responses to “Change drive letter on a boot device”

  1. Reply alex says:

    Thx mate!
    Thats what I looked for!

  2. Reply Jim says:

    Thanks a lot. I've been looking for this.

  3. Reply Carric says:

    Yep; I am amazed it was that easy. I had imaged a 30G to a 80G drive, and Windows was hosed on bootup (C: and D: had switched places). This little regedit did the trick!!

  4. Reply Ultimate Tomato says:

    That worked! And so simple.
    Thanks!

  5. Reply Nathan says:

    Thanks champ! I was just about ready to boot in to another OS and swap both of the drive letters at the same time, that would’ve been a pain!

  6. Reply mr x says:

    That’s all fine and dandy, but I hope the drive letter swap is done immediately after a fresh install! Why you ask? Well keep in mind any software that was installed with the mixed up letters will point to the new drive contents and more than likely will error out or crash. Also, all those shortcuts on your desktop, and in the start menu will also be pointing to the wrong drive. I have found it easier just to live with the stupid vista drive letter swap. Just my 2c!

  7. Reply Echilon says:

    If you’re going to change the drive letter, you’d change it after a fresh install anyway. The same problem happens if you move your program files directory to another partition and don’t copy the Microsoft apps installed in C:\Program Files\ to the new directory.

  8. Reply Highlander says:

    My Vista installed on J: Drive for some reason. I have a couple of programs that give me an error as they want the operating system to be installed on C: Drive. Will this solution work for me – I have a lot of programs installed on the drive and it is fully mirrored (a good thing in that I have had two failed 500 gig seagate drives so far)
    Thanks for any thoughts

  9. Reply Highlander says:

    My Vista installed on J: Drive for some reason. I have a couple of programs that give me an error as they want the operating system to be installed on C: Drive. Will this solution work for me – I have a lot of programs installed on the drive and it is fully mirrored (a good thing in that I have had two failed 500 gig seagate drives so far)
    Thanks for any thoughts

  10. Reply Echilon says:

    If all of your data's mirrored onto the new partition, you shouldn't have any problems.

  11. Reply Echilon says:

    If all of your data's mirrored onto the new partition, you shouldn't have any problems.

  12. Reply Highlander says:

    My Vista installed on J: Drive for some reason. I have a couple of programs that give me an error as they want the operating system to be installed on C: Drive. Will this solution work for me – I have a lot of programs installed on the drive and it is fully mirrored (a good thing in that I have had two failed 500 gig seagate drives so far)
    Thanks for any thoughts

  13. Reply Echilon says:

    If all of your data’s mirrored onto the new partition, you shouldn’t have any problems.

  14. Reply bod says:

    didnt work for me, i changed drive letters as above but now when boots takes a few minutes with message on screen saying preparing desktop then just get blank desktop screen with mouse pointer!!!!!!

  15. Reply Echilon says:

    Sounds like it worked perfectly. You probably can't boot because you didn't copy the windows files to your new partition before you renamed. You might be able to copy them over with the recovery console.

  16. Reply Cameron says:

    Hi,
    how do I “go to” a registry?
    Thanks

  17. Reply Echilon says:

    To go to a key, Start->Run->Regedit, then navigate to the key.

  18. Reply Abdullah says:

    man you are the best !, i didn't believe it was that easy.

    thanks

  19. Reply Terri Hyland says:

    For this, I ABSOLUTELY LOVE YOU. YOU HAVE NO IDEA OF THE PAIN IVE GONE THROUGH ALL DAY!!!!!!

  20. Reply Danilson says:

    Thank you man. It helped

  21. Reply OnuR says:

    wow, you saved my time to fix this issue.
    I got the similar problem.
    now fixed thanks to you.

    thanks man.
    Cheers!

  22. Reply Recover grub bootloader with Vista, Xp and Linux (new) « /home says:

    […] his boot driver lettre to C when it has finsihed to boot…). I have followed those steps  http://leghumped.com/blog/2007/01/09/change-drive-letter-on-a-boot-device/ Then reboot Vista 1 or 2 times and all show be fine for this […]

  23. Reply Martin says:

    Thanks
    Not only did this help to get vista working again after extra drives had been removed but it solved another problem with vista /xp drives not swapping the same drive letters.
    If only i found this 18 months ago.
    Shame i still hate vista.

  24. Reply Keith says:

    Hurray!

    Like many posting here, I have been googling like crazy to find a solution to my Vista using drive letter D: instead of C: after ghosting my two partition dual boot hard drive from a 200 Gb drive to a 500 Gb drive.

    Tried EasyBCD and Vista DVD boot repair and several other guides, all failed.

    Symptom: After cloning a dual boot XP and Vista hard drive from a 200 Gb drive to a 500 Gb drive (partition 1 – XP boots as C Drive (sees Vista as D Drive; partition 2 – Vista boots to C Drive, sees XP as D Drive), XP boots ok, but Vista boots as D Drive so nothing works properly, ie all user profiles try are recreated on D:, even though OS is on C Drive.

    Solution: While in Vista, follow the leghumped guide above and swap the C and D drives in the registry. Reboot and now Vista should be back on the C Drive.

    Solution #2: Another fantastic trick I have found is when your user profile refuses to load (as a result of the above problem or any other reason) in Vista you have to delete a registry key:

    HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList

    Find the profile name you are having a problem with and delete the key, e.g. S-1-5-21-XXXetc

    Log off and on and your original profile should work again.

    Good luck everyone, so happy to finally be on my laptops new 500 Gb hard drive with dual boot still working.

  25. Reply Lemonkid says:

    Yep another happy googler here. I have been messing around trying to get mac osx to work on my pc, I have been formatting and changing drives letters all over the place. Each failed attempt meant a repair or new vista install onto another partition and then delete the mac install. All was well until I changed the old ‘c’ drive to ‘e’ and lost profiles etc etc.
    Now i can delete the fresh vista install and in the words of my wife ‘leave the damn thing alone!!!’ But you know and I know I wont ;-)

    Thank you soooo much.

  26. Reply Joe S says:

    know how some people burst a capillary when you post in an old thread, but THIS post saved me! I was working on a Laptop, whose hidden boot partition became visible, and as a result, pushed the OS partition off from C:\ to D:\.

    I booted off a Windows 7 CD, into repair, into Command Prompt, used BCDedit, used the command

    “bcdboot c:\windows /s c:” where C: = whatever drive letter your system wants to say Windows is currently on (mine was D:). the command puts the boot files onto your said partition, laying the path so you can nuke, or remove, the old boot partition (typically 100megs-1Gig).

    ….Anyway, after removing that old boot partition and my Windows Drive had the boot loader on it, the system after said it was C according to my OS repair disc. However, Windows kept assigning my OS to D: still! This simple Registry change worked like magic & I can’t thank you enough for posting the solution to my problems so many years ago.

    P.S. Google showed me the light (your post)

  27. Reply Peter says:

    I love you :-) I didn’t think to check the registry until I stumbled onto this 2 hours later!

    Thanks

Leave a Reply