View Single Post
  #3  
Old November 3rd 20, 07:04 PM posted to alt.comp.hardware.pc-homebuilt
VanguardLH[_2_]
external usenet poster
 
Posts: 1,453
Default Difficulty Assigning Drive Letters

"John B. Smith" wrote:

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???


There must be a primary partition, so it can be marked as the active one
in the partition table. The BIOS/UEFI finds an active-marked partition
in the order it searches the drives to find the boot sector for the OS
in that partition. The BIOS bootstraps itself, finds the boot sector,
loads that into memory, and passes control to it. You cannot mark a
logical partition as active, because it is under a parent partition.
Even if the parent were marked as active, the BIOS wouldn't know which
of its children (logical partitions) was the one to use for booting.

That's a limitation of the standard bootstrap program in BIOS. Other
multi-boot managers can load the boot loader in any partition on any
drive, and even give you a menu of which to choose (and some don't
require they even be within a partition nor any part of an OS in a
partition, so they load before any OS loads; i.e., you're trying to use,
for example, Windows boot manager - load Windows boot loader, load its
dual-boot manager, select an OS elsewhere, and load that boot loader.

The max is 4 partitions per drive, because the MBR (Master Boot Record)
has only 4 entries in its partition table. One of those entries can be
for an extended partition, but logical partitions don't really exist.
They are defined as portions or zones of the extended partition. You
cannot mark active an extended partition, but that won't say which of
the logical partition for where to find an OS boot loader.

Newer computers use UEFI (Unified Extensible Firmware Interface) instead
of the old BIOS+MBR scheme (although UEFI keeps a copy of the MBR in a
portion of the UEFI data). The whole UEFI scheme is more complicated;
see:

https://docs.microsoft.com/en-us/win...ive-partitions
https://www.howtogeek.com/56958/htg-...lace-the-bios/

According to https://en.wikipedia.org/wiki/GUID_Partition_Table, looks
like there could be up to 128 partitions per drive defined in LBA 2-33
in the GUID Partition Table. Yikes! Tis probably the reason, along
with switching long ago to LBA (logical block addressing) allowing for
larger drives, why logical partition blocks defined under an extended
partition faded away. Even if still using the old BIOS/MBR scheme, I
never found a need to have more than 4 partitions on a drive, so they
could all be primary partitions.

Linux folks have their grub multi-boot manager. I haven't used it to
know if it occupies a partition with an OS, it's own partition, or can
use the first unassignable cylinder on the disk to store its code.
EasyBCD is another that I've heard about, but don't know where it stores
itself. I've used GAG (Graphical Boot Manager) a *long* time ago.

No matter which multi-boot manager you use, the BIOS loads first, and it
has to find where is the boot loader or manager that it has to load, and
it does that by searching the drives in the order found by looking in
the first cylinder of the active-marked primary partition for the boot
sector. There must be a minimum of 1 primary partition. With BIOS, you
could have up to 4 primary partitions, or a combination of 1 primary
partition and 3 other partitions (because there are only 4 partition
records in the partition table in the MBR on the drive). If you define
an extended partition (which cannot be active-marked) then you can
create logical partitions under it to give more than 4 volumes on the
drive usable by the OS.

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).


When in Disk Management, right-click on a volume (usually a partition)
and select "Change drive letter".

To eliminate the logical partitions (under an extended partition) and
convert them to primary partitions (max of 4 per drive with BIOS/MBR),
it's probably easier to use a 3rd party partition manager to do that.

The MBR has its partition table, and that is where the partition
definitions are stored, not inside any OS. Drive lettering is on a
per-OS basis, because those drive letter assignments are stored in the
Windows registry. Different operating systems can assign different
drive letters to the same partitions across multiple drives. On the
other hand, Linux doesn't use drive letters hence no limitation of 26
drive letters (A to Z) for volumes as there is for Windows.

In the Windows registry, drive letter assignments are stored at:

HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

Each instance of Windows has its own registry hence why the same
partitions can have different drive letter assignments under separate
instances of Windows. That's why no drive has any drive letter
assignment until Windows loads. Before Windows loads, drives have to be
discovered or enumerated by their physical addressing. If your computer
uses the old BIOS/MBR scheme, you can run "bootcfg /list" (which reads
the boot.ini file) to see the physical addressing for the partitions,
which look something like:

multi(0)disk(0)rdisk(0)partition(1)\Windows

Disks are enumerated starting at zero (e.g., drive 1 is disk 0) while
partitions on a disk start with 1. For more information on boot.ini
definitions, see:

https://www.computerhope.com/issues/ch000492.htm

If using UEFI, boot.ini is not used, and bootcfg will complain that
boot.ini was not found.

If you want different drive letter assignments for the same partitions
in different instances of Windows, just load Windows and do the drive
letter assignments during that Windows session to save those drive
letter assignments into the registry of that instance of Windows. Don't
use Disk Management in Windows XP in trying to get the same drive letter
assignment in Windows 7, and visa versa. The drive letter assignments
are separately defined within each OS.