Re: Windows drive letters (was Re: Is there an alternative filesystem hierarchy that could be adapted to Debian.)

2021-03-12 Thread David Wright
On Fri 12 Mar 2021 at 04:33:00 (-0500), The Wanderer wrote:
> On 2021-03-11 at 23:05, David Wright wrote:
> > On Thu 11 Mar 2021 at 16:02:55 (-0400), Cmdte Alpha Tigre Z wrote:
> 
> 
> 
> > I'm not familiar with how Windows assigns drive letters,
> 

[ … ]

> For removable disks (e.g. USB drives), whenever a new one is connected
> the next currently-not-known-used letter is assigned, for a definition
> of "used" that doesn't count letters taken up by being mapped to network
> drives. *Usually* it seems to recognize a previously-connected drive and
> assign it the same letter as it got before, but not always; I've yet to
> identify any recognizable pattern to how it handles things when two
> drives previously got the same letter and you connect them both.
> 
> > particularly ones that are meant to be Stable.
> 
> I'm not entirely sure how you're defining this.

I'm probably conflating …

> Fixed disks basically always get the same letter. Removable ones only
> sometimes do.

… those two things. I've used Disk Manager to stop assigning *any*
letter to my fixed disk linux partitions so that it doesn't nag my
wife about reformatting them.

Reading the OP's use of E: and F:, and storing device names in the
filesystem, I assumed that Stable/Remembered names was some ability of
Windows that the OP missed in linux. (Like much of the thread seems
to be.) Hence the exposition on my own scheme for stable mount points.

[ … ]

> > But AIUI you're fighting hard to go backwards. Under the right 
> > circumstances, I am led to believe that you can mount devices onto
> > directories in Window's NTFS filesystems, thereby avoiding letters.
> 
> You still have to have the letters, or at least "letter" singular, so
> that you have a place to create directories onto which to do the
> mounting. Other than that, yes, this is possible.

Yes, I wasn't discounting the system drive being a letter (C:),
but just pointing out the recent ability to make a hierarchy out of
Windows's C: D: E: F: disjointed filesystem.
(IOW "letters" stood for having all these separate "roots".)

> To be clear: I think this entire proposal (except for the part about how
> Windows should automatically proceed to AA: after hitting Z:) is
> wrongheaded, not worth the effort, virtually certain to never be
> implemented in practice, and would cause far more problems than it would
> solve. As a thought exercise it is interesting, but primarily for how it
> helps us dig up and see the problems which would result from trying to
> implement it.

Agreed. (No opinion on the parenthesised bit.)

Cheers,
David.



Windows drive letters (was Re: Is there an alternative filesystem hierarchy that could be adapted to Debian.)

2021-03-12 Thread The Wanderer
On 2021-03-11 at 23:05, David Wright wrote:

> On Thu 11 Mar 2021 at 16:02:55 (-0400), Cmdte Alpha Tigre Z wrote:



> I'm not familiar with how Windows assigns drive letters,

Basically, there's an internal device ID list (hexadecimal GUIDs, if I'm
not mistaken), and a mapping in the Registry. Beyond that it probably
involves the internal device paths which underlie e.g. devmgmt.msc
(Device Manager), and I've only recently begun to learn about that
syntax in the first place.

For fixed disks, no letter is assigned by default, one has to be set up
explicitly. The GUI tool for doing this is diskmgmt.msc, and I believe
it can also be done using command-line tools that I've rarely had
occasion to touch.

For removable disks (e.g. USB drives), whenever a new one is connected
the next currently-not-known-used letter is assigned, for a definition
of "used" that doesn't count letters taken up by being mapped to network
drives. *Usually* it seems to recognize a previously-connected drive and
assign it the same letter as it got before, but not always; I've yet to
identify any recognizable pattern to how it handles things when two
drives previously got the same letter and you connect them both.

> particularly ones that are meant to be Stable.

I'm not entirely sure how you're defining this.

Fixed disks basically always get the same letter. Removable ones only
sometimes do.

> Nor what happens if two devices with the same (Stable) name are
> plugged in simultaneously.

I can't completely swear to this, but I believe it's one of two things:
either whichever one gets connected first gets the letter and the other
one doesn't show up except in e.g. diskmgmt.msc (and an error is
probably logged), or whichever one gets connected second gets a
different letter automatically.

The exception is for letters consumed by network drives. If you have
e.g. enough USB drives connected for one of them to automatically get
the letter G:, and you already have G: mapped to a network location,
Windows will silently allow the network location to take precedence;
diskmgmt.msc will show the drive-letter mapping of the USB drive and
allow you to change it, but otherwise it will mostly look as if the
drive wasn't recognized in the first place.

>> The boot device could always be An: (with "n" being some number),
>> so the system could automatically do: "mount An: /" at boot.  If
>> you would prefer some operating system interoperability, we could
>> use Cn: instead of An:
> 
> I don't think you'll gain any interoperability from these proposed
> changes to your filesystem. And any hope that you did have would
> immediately be destroyed if you used a letter other than C: to
> represent the system drive. That's not because it has to be C:, but
> because everybody has respected that convention since its invention.
> (IOW it's more like the convention that usr is called usr, and not
> UlSteR.)
> 
> But AIUI you're fighting hard to go backwards. Under the right 
> circumstances, I am led to believe that you can mount devices onto
> directories in Window's NTFS filesystems, thereby avoiding letters.

You still have to have the letters, or at least "letter" singular, so
that you have a place to create directories onto which to do the
mounting. Other than that, yes, this is possible.


To be clear: I think this entire proposal (except for the part about how
Windows should automatically proceed to AA: after hitting Z:) is
wrongheaded, not worth the effort, virtually certain to never be
implemented in practice, and would cause far more problems than it would
solve. As a thought exercise it is interesting, but primarily for how it
helps us dig up and see the problems which would result from trying to
implement it.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature