View Single Post
  #2  
Old November 3rd 20, 03:38 PM posted to alt.comp.hardware.pc-homebuilt
Paul[_28_]
external usenet poster
 
Posts: 1,467
Default Difficulty Assigning Drive Letters

John B. Smith wrote:
Last weekend I installed a new boot drive after months of intermittent
problems. I used Macrium Reflect to image my two booting partitions
onto the new drive. I was anticipating a huge fight but it went
amazingly well. I bought a larger drive this time 1T. About half of it
was left after I partitioned for the XP and Win7. With both booting
successfully I decided to use the remainder of the drive for data
partitions. I made two equal size partitions, using Win7 Disk
Management. The first one insisted on being a Primary partition, I
couldn't find a way to make it anything else??? I wanted to use drive
letters that followed the letters on my other data drive, so 'N' and
'O'. When I booted XP I went to its Disk Management. XP had decided to
call them 'E' and 'F'. The second partition, which Win7 had deigned to
desigate a logical drive, renamed no problem to 'O'. But the primary
partition that Win7 had made drove XP Disk Management into lala land
when I tried to rename it, and it took forever for XP to close down
after my attempt.
So.... I guess I want to make two logical drives, instead of one that
is a primary, in order to name them the same letter in both OS's.
Or a way to defeat XP's naming hangup? I kind of thought I wanted to
do my partitioning in Win7, to keep the boundaries right (or
something). Anybody have ideas about the best way to approach this?


The lettering is stored in the Registry, as far as I know.

There should not be a problem having multiple OSes, and each OS
having a different "letter map".

This is in part, because when a particular OS boots, its partition
becomes C: , and if some other letter was assigned in another OS time
interval, and there wasn't flexibility, then you would be playing
whack-a-mole worse than you are at present. Nobody wants to boot
an OS, and discover the OS drive is F: or something. There are ways
to finagle things to make that happen, but it doesn't happen
without setting a trap for the OS.

Drive lettering only becomes a problem for third party utilities,
such as Kaspersky Rescue Disc. It presents a menu of drives to
scan, and the menu has to be made from "some" map. If you had
WinXP and Win7, it would select one of the OSes as "boss of the definition"
and use the drive lettering it contains. Proof of which one, would
exist in the form of figuring out which drives pagefile.sys is being
used as a temporary Linux swap for the Linux OS on the Rescue CD.
That's an example of when somebody has to make a choice as
to what to do. Windows users are not normally forced to
make a decision as to "which Registry runs things".

Part of the information is in the Mountvol key.

In WinXP, in Command Prompt, you can type

mountvol

And stuff like this is printed on the screen.

*******
Creates, deletes, or lists a volume mount point.

MOUNTVOL [drive:]path VolumeName
MOUNTVOL [drive:]path /D
MOUNTVOL [drive:]path /L

path Specifies the existing NTFS directory where the mount
point will reside.
VolumeName Specifies the volume name that is the target of the mount
point.
/D Removes the volume mount point from the specified directory.
/L Lists the mounted volume name for the specified directory.

Possible values for VolumeName along with current mount points a

\\?\Volume{50acaf00-3981-11e6-97f4-806d6172696f}\
E:\

\\?\Volume{50acaf01-3981-11e6-97f4-806d6172696f}\
F:\
*******

Those two drive letters are next to one another, on the
same disk. The first chunk, you can see a single digit
changing, to separate the values used.

That's not particularly important, but it's to show that
each OS is keeping some sort of record. I would hope
(but have not verified) that the string is the same in
every OS, but the letter assignment can change.

To assign a letter, you'd likely need an account belonging
to the administrator group. It's possible a Guest account
would not have permission to assign a new drive letter.

You can assign a letter, even to a RAW volume. A RAW volume
has a partition type, like 0x07 NTFS, but the first sector
is missing a file system header. For example, when formatted
NTFS, the first sector of an NTFS volume has the string "NTFS"
part way down the sector. I use that occasionally as verifying
"I might be on target". Unfortunately, you'll find similar
looking sectors all over the place, so it's easy to get fooled
doing that. I'm only using that when using dead reckoning
math. If you can set a drive letter on a RAW volume, that
tells you the drive letter is not stored inside the actual
volume.

To look around a raw disk, HxD has a menu for opening a disk
drive read-only. The menu is functional if the program is
started using 'Run As Administrator' on Windows 7. It has to be
elevated, as does using "dd.exe" or PTEDIT32.exe .

https://mh-nexus.de/en/hxd/

Anyway, there's not much point of heading in this direction,
because it's not solving your lettering problem. There can
be conflicts between mapped drives and USB keys that have
just been inserted. I don't know if that is somehow
involved in your conundrum. Uwe Sieber's "USBDLM" drive letter
manager program, can be used to better manage automatic letter
assignment under those conditions (using mapped drives a lot).

There is also

subst /?

which allows assigning a drive letter to a path. This
allows "making a volume from a tree on some partition".
It would typically be used as a way to shorten a path
name, to stay within the roughly 260 character limit,
and might be used if access was otherwise denied. It's
from the MSDOS era, and I don't know how it stores its
letter assignments. Since the letter would not show up
in Disk Management, there might be no way to track it...
other than learning how it is stored in the Registry.
As SUBST would need to store the details somewhere in
the registry.

I doubt "mountvol" will provide any useful intelligence,
as far as solving the "lalaland" problem. But something
is interfering with the letter process. I can't be sure
just what that is.

Paul