I created an image backup and restored it to a VHD file. The original drive has three primary partitions. It also has two CDRom drives, shown as the first two volumes. This is how diskpart lists the volumes of the original disk:
DISKPART> list vol Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 E Jun 06 2018 UDF DVD-ROM 125 MB Healthy Volume 1 L DVD-ROM 0 B No Media Volume 2 SYSTEM NTFS Partition 100 MB Healthy System Volume 3 C OS NTFS Partition 1384 GB Healthy Boot Volume 4 D HP_RECOVERY NTFS Partition 12 GB Healthy
I don't know where the "Info" column values come from. Notice that Volume 2 (the first primary partition on the drive, which is, I believe, also the Active partition with the MBR information) has NO drive letter assigned.
You can see here that it has the NoDefaultDriveLetter attribute set, and that the second and third primary partitions on the drive do NOT have this attribute set:
DISKPART> sel vol 2 Volume 2 is the selected volume. DISKPART> attributes volume Read-only : No Hidden : No No Default Drive Letter: Yes Shadow Copy : No DISKPART> select volume 3 Volume 3 is the selected volume. DISKPART> attributes volume Read-only : No Hidden : No No Default Drive Letter: No Shadow Copy : No DISKPART> select volume 4 Volume 4 is the selected volume. DISKPART> attributes volume Read-only : No Hidden : No No Default Drive Letter: No Shadow Copy : No
Now, I tried setting the NoDefaultDriveLetter attribute for volume 2, but it affects ALL partitions on the disk, so NONE of the partitions gets a drive letter. The DiskPart documentation clearly states that even though you are asking it to set the attribute for the volume, that it actually operates at the disk level, and will affect all volumes on the same disk. This sounds like, instead of making it work properly, they simply documented that it affects the entire disk.
Now, somehow my Dell computer was partitioned with only the very first partition having the NoDefaultDriveLetter attribute set. So I would think there must be SOME software out there to do this? So my first question would be, does anyone know how to do this?
I have a follow up question in case the answer to the first question is that there is no way I can do it.
This system partition has the Boot hidden folder and the BCD file in it. There is not much else there. Are any of these options viable?
1) Since this is a VM (for Hyper-V) can I just create a new VHD, and move the system partition to that drive, deleting it off the original, and set the NoDefaultDriveLetter attribute on the new VHD. Then use the BootRec program to make sure it finds and points to what I hope will now be the OS on the C drive?
2) Can I simply delete that entire partition, and put the MBR/BCD on the C drive using the BootRec program? Or can you not put this on the same partition that the OS is on?
Any advice appreciated!