Move Partitions Around on Vista

Technology
Move Partitions Around on Vista

gparted_vista.png

One of the cool things about Vista is its ability to resize partitions using diskmgmt.msc. This works great for those times when you need to shrink or grow a partition. Unfortunately, if you need to move things around as I did this weekend, you won’t be able to use the built-in tool.

I needed to delete a partition I wasn’t using and also give more space to my Vista partition. So I turned to the trusty Gparted (a free alternative to tools like Partition Magic). It performed the partitioning flawlessly, but Vista refused to boot after that. I was prepared for that, thanks to the Gparted Vista HOWTO, and had my Vista boot DVD ready to perform the post-Gparted operation:

  • Boot up the installation DVD
  • Choose the repair option
  • Let the installation DVD repair the disk automatically when prompted to do so

This let Vista boot, but there was still a problem… one that I remember from messing up drive letter assignments in previous versions of Windows: Vista booted up, took me to the login screen, but wouldn’t show my desktop. (In theory, the HOWTO should have worked perfectly, but I have a dual boot Vista/XP system, and things got confused).

So I had to do one more thing:

  • Boot Vista into Safe Mode
  • Log in
  • Hit Ctrl-Alt-Del to get Task Manager to appear (the desktop will not appear normally when the drive letter is messed up)
  • Use Task Manager to run Regedit and make my way to HKEY_LOCAL_MACHINESYSTEMMountedDevices and fix the drive letter assignments.

The drive letter assignments can be tricky, because you probably need to do something like rename DosDevicesC: to DosDevicesD: and vice versa, but you can’t have duplicate names, so you’ll need to change one of them to something temporary, like:

  • DosDevicesC: to DosDevicesX:
  • DosDevicesD: to DosDevicesC:
  • DosDevicesX: to DosDevicesD:

Once I did that, I rebooted, and all was right with the world!

Related:

  • Gparted – Link
  • How to restore the system/boot drive letter in Windows – Link
  • Howto move Vista – Link
  • LH Top 10: Free Computer System Recovery Tools – Link
  • How to Shrink and Extend NTFS Volumes in Windows Vista – Link

6 thoughts on “Move Partitions Around on Vista

  1. TrinitronX says:

    I recently was able to get this to work on a DELL laptop after moving the Vista partition. Vista saw the drive as D:, and using this registry tweak fixed it.

    However, I tried the same procedure with a new Gateway C140x laptop, and no such luck. I resized the partition fine, but again Vista was seeing the “old” drive C: as drive D: due to the registry storage of drive information. I attempted the same fix detailed here (also in extreme hex address detail here: http://channel9.msdn.com/ShowPost.aspx?PostID=277099 … the post by RichardRudek explains what the actual value means).
    Sadly, after each attempt to change this value, my registry changes were somehow thrown out the window upon reboot. I could not get this fix to work for some reason, and attempted to call Gateway tech support for answers. According to the one troubleshooter I contacted, they did not know why it wasn’t working, I explained the process to them and why vista was changing the drive letter since it wasn’t seeing my moved partition at the same byte offset. I asked them if there was some kind of system restore utility that was detecting the changes and tossing them at each reboot, but they didn’t know what was going on.

    I guess it just doesn’t want to work on the Gateway. I’ve made an image of the partition in case I can figure out in the future how to restore it, but for now I’m forced to reinstall Vista, this time using the partition setup I want, not the factory one with the 10 gigs of wasted space on a Recovery partition which I did not plan to use. I prefer instead to manage my backups through incremental disk images that I do on an external drive, rather than waste the limited space on a laptop.

    Just putting this out there in case you or anyone else has an answer, and to thank you for the tip since it did work on the Dell machine ;).

    Thanks

  2. TrinitronX says:

    I’ve finally figured out how to correctly fix this problem on the drive. The fix involves booting up the Vista Recovery Environment FIRST (either found upon booting the OS install Disk or pressing F8 if it’s installed on your machine); and selecting Repair. After you get to the screen with a bunch of recovery options, select the option to open a command prompt.

    Next, run regedit from the prompt, and click on the HKEY_LOCAL_MACHINE key. Click on the file menu and select “Load Hive”. Next you will need to browse to the location of the SYSTEM registry hive on the mounted vista disk in question.
    If the recovery console managed to mount the disk as C:, it will be located in: C:WINDOWSsystem32configSYSTEM .
    Note that there may be two “SYSTEM”‘s shown… one is actually “SYSTEM.sav”… if in doubt, right click and check the actual extension… the one you want is without any extension, simply named “SYSTEM”.

    After opening the file, It will ask for a name, just enter something like “Offline”. Next you’ll notice the word “Offline” under HKEY_LOCAL_MACHINE. Open that key and navigate to “SYSTEMMountedDevices”.

    From here, perform the registry editing as above.
    Now you should have the correct DiskID and offset in the right Drive key, so you can click back on the “Offline” key and goto File->Unload Hive.

    Exit out of the Recovery Environment and then boot the computer normally, hopefully the changes will be reflected and you can boot with a normal profile and everything intact.

    The main problem I was having with this was I was attempting to edit the registry from within the broken vista, using Ctrl+Alt+Delete and then using the task manager to start explorer and regedit from there.
    The problem with this way is that it was not saving my changes to the registry, since I think it was a temporary hive that was copied into memory from the “new” drive letter it found, then edits had no effect on the actual registry hive. Doing so from within the Recovery Environment worked wonders :D.

  3. Reggie says:

    This worked for me, fiddled with partitions on a triple boot and vista broke so….

    1) Run recovery tool on Vista DVD
    2) Restart
    3) ctrl alt del to load task manager
    4) Click new task, then type explorer.exe
    5) Vista will load a temporary profile (firefox worked for me in this profile which was lucky (browsed for the fix)
    6) Open up regedit from the windows Dir.
    7) Rename the keynames in HKEY_LOCAL_MACHINE/SYSTEM/MOUNTEDDEVICES
    8) Renamed DosDevicesC: to M:, G: to C:, and M: to G:
    etc, (my letters were very messy)
    9) Click file->export, save current branch to a drive root G: for example.
    10) Reboot and run recovery on vista dvd
    11) open command line
    12) Type ‘g:’ Then type ‘dir’, should see the something.reg file, if not go through ‘c:’ ‘dir,’d:’ ‘dir’ etc till you find it, then just type something.reg and click ok to add to the registry
    13) Reboot and it works….

    That isnt the easy solution folks, just stressing the point that if i had booted into vista in SAFEMODE as suggested then I’d say that the registry may have been saved and rebooted as I had left it.

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

I'm a tinkerer and finally reached the point where I fix more things than I break. When I'm not tinkering, I'm probably editing a book for Maker Media.

View more articles by Brian Jepson

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK