How do I assign a drive letter to a partition from command prompt in Server 2008 foundation ...

... or change the place AD looks for edb.log?


I can't start my server 2008 foundation because AD can't access adb.log etc on virtual drive D, which I deleted to extend the partition used as C: so I could install SQL Server 2012.


Short history - Physical drive partitioned in to C and D: with C the OS drive, and D labelled as DATAPART.

C too small, so copied everything off D; to another physical drive in server, deleted the DATAPART partition assigned as D:, and extended the OS/C: partition,

Server won't restart as it can't find edb.log on D:,

Now I can only get to a command prompt. To make it worse, this reassigns the drives as C: - RECOVERY and the OS drive as D, (formerly C), and I can't see how use DISKPART to assign a drive letter to the extended partition on the OS volume, and make it persist.


Using DISKPART I tried to re assign the other physical disk, (G) as D, so it would appear correctly at restart, but it seems DISKPART is only valid for the current session, and at restart the original settings were restored., so D: went back to being G:


I've also tried creating an autoexec.bat file with SUBST G:\D_DRIVE D: but I guess autoexec is obsolete now, because it didn't work.


The alternative is to change the location that AD looks for the edb.log, but with only a command prompt, I guess that's tricky.


Any help in plain English greatly appreciated - I'm a SQL Server developer. and not a hardware builder!


Autoexec.bat went out of fashion with Windows ME, more than 10 years ago. It was never used under Windows NT. There was an autoexec.nt but I doubt that this would help you. Here is what you could do instead.
  1. Boot into Repair Mode.
  2. Locate the correct System Drive (Could be any of the lower letters of the alphabet. Can't be X:.)
  3. Create a backup of all registry files.
  4. Run regedit.
  5. Load the System hive (the one located on the correct System Drive).
  6. Navigate to this location: HKEY_LOCAL_MACHINE\{HiveName}\SYSTEM\MountedDevices
  7. If the value \DosDevices\D: exists (bottom, right-hand pane), rename it to \DosDevices\Q:
  8. Rename one of the other values to \DosDevices\D:. Which one it should be I have no idea. It's trial and error.
  9. Unload the System hive.
  10. Reboot and check things out.
  11. If things do not work, try a different value in Step 8.
Note also that you're posting in the wrong forum. This forum caters for home users. To attract the attention of server experts you need to post your question in a Technet server forum.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.


Question Info

Last updated August 31, 2019 Views 8,439 Applies to: