Saturday, May 12, 2012

Fix the windows OS Letter assignment

Hello!

I recently move a few partitions on my hard drive, and when I booted up windows... boot error.

That's somewhat expected so I tried to use startup repair, it worked... until I got stuck right after the loading screen.

I found that "C:" was missing, and "D:" was assigned to what "C:" should be. Here's how I fixed it:
  1. Before you shutdown, make a note of what letter is currently incorrectly assigned, in my case, it was "D"
  2. First of all, you need your windows disk, plop it in, and boot from it. When it finishes loading, do not click install. Instead, click repair.
  3. Lauch command prompt
  4. We can't just use regedit to fix the problem because we are in a windows pre-install enviroment, with it's own registry.  So we need to run a command:
    reg load HKLM\TempOS C:\windows\system32\config\system

    Now, "C" might be the wrong letter! windows preinstall enviroment automatically assigns letters to the drives and partitions of your computer.  You may need to use these commands
    cd /d [Letter]:
    dir

    the first Changes Directory.  /d means change to a different Drive, then you would type C: D: E:, etc.
    the second command lists the folders and files of the drive.  If you see "windows" and "program files" then congrats you found the drive/partition that you want to fix
  5. type regedit to open the registry editor
  6. browse to HKLM/TempOS/CurrentControlSet/MountedDevices
  7. find the value that has \DosDevice\C:
    rename that to any other untaken letter
  8. find the value that has \DosDevice\[the incorrect letter]:
    this should be the letter that you took note of in step 1.  rename that one to \DosDevice\C:
  9. Exit regedit, and run this command
    reg unload HKLM\TempOS
  10. Reboot and all should be well!
Hope that worked.  As always, comment if you have any questions or need help!

No comments:

Post a Comment