Subject: Re: DOS drive letters
To: John Maier <JohnAM@datastorm.com>
From: Michael L. VanLoon -- HeadCandy.com <michaelv@HeadCandy.com>
List: port-i386
Date: 01/22/1996 22:03:28
On Mon, 22 Jan 96, John Maier <JohnAM@datastorm.com> writes:

>Yes, this too has been my experience with IDE drives.  When using SCSI   
>(BIOS) or a SCSI/IDE mix, I'm not sure what the standard behavior is.

It doesn't have anything to do with the *type* of drive.  Regardless
of type or number of drives, DOS (this includes everything but Windows
NT*) allocates all the Primary Partitions first, in order that the
BIOS(es) discovers the drives.  Then, it goes back and allocates the
other partitions, completing each drive before going on to the other
drives.  For example, a machine with one IDE and two SCSI drives; the
IDE drive has a Primary partition and two Extended partitions, the
first SCSI drive has only a Primary partition, and the second SCSI
drive has a Primary and one Extended partition:

	IDE Primary part.	C:
	SCSI 1 Primary part.	D:
	SCSI 2 Primary part.	E:
	IDE Extended part. 1	F:
	IDE Extedned part. 2	G:
	SCSI 2 Extended part.	H:

Non-DOS (FAT) partitions are ignored by DOS (and Windows).  So, you'd
get this same behavior if there were one or more non-DOS** partitions
on any of these drives.  [*]Windows NT is somewhat of an exception for
two reasons.  First, although this behavior is the default for
compatibility reasons, you can go into the Drive Administrator and
assign fixed drive letters to individual drive partitions for a more
sane layout, overriding the default behavior.  [**]Second, NT can
mount OS/2 HPFS and NT NTFS in addition to FAT (DOS and Win95)
partitions (this is in regards to the "non-DOS partitions" comment
above).

>Martin Husemann <martin@laurin.teuto.de> writes:

>>Does anybody know the algorithm DOS uses to assign drive letters to
>>partitions?

>In my experience it has been
>        - primary DOS partition on each drive, in order of drive #
>          (in the case of a drive with TWO primary partitions, like
>           i've done on my win95/dos disk, they're done in order of
>           which is marked as startable first [i use os-bs 2.0b8 to
>           boot win95 or dos on a disk with a 10M dos partition and
>           a 235M win95 partition; i selected the "set start ID on
>           bootup option or whatever it is in OSBS, so if i boot to
>           DOS only, the 10M is C: and the 235M is D:, but if I boot
>           to win95, its the other way around, because OSBS changes
>           the 'startable' flag])
>        - extended dos drive in each extended partition in order
>
>Thus for example:
>                You have                        Becomes
>                --------                        -------
>  Drive 0:      Primary DOS partition             C:
>                Extended partition
>                        extended dos drive        E:
>                        extended dos drive        F:
>  Drive 1:      Primary DOS partition             D:
>                Extended partition
>                        extended dos drive        G:

This is correct.

-----------------------------------------------------------------------------
  Michael L. VanLoon                                 michaelv@HeadCandy.com
       --<  Free your mind and your machine -- NetBSD free un*x  >--
     NetBSD working ports: 386+PC, Mac 68k, Amiga, HP300, Sun3, Sun4,
                           DEC PMAX (MIPS), DEC Alpha, PC532
     NetBSD ports in progress: VAX, Atari 68k, others...
-----------------------------------------------------------------------------