Partitions, Volumes, and Drives

My Encounter with storage structures while investigating Linux

You will most likely encounter an ISO file for installing Linux on your old XP machine. After I downloaded this file, I dragged and dropped the file on my DVD drive icon in Windows Explorer and then burned the contents to a DVD. I wasn’t all that surprised when I found the ISO file nicely burned on what is now a festive window ornament. Windows does know how to handle an ISO file. In Windows Explorer (W7 or W8), navigate to the location of the ISO file and then right-click it. In the context menu there should be an entry “Burn Disk Image”. If this entry is not there, associate the ISO extension to Windows Explorer. This can be done from the control panel. In W8, bang into the upper right corner and then click on the gear to find the control panel. Search for “associate” to find “Default Programs”. (I Hate Windows 8!).

The Ubunto install that I have been discussing, begins with options requiring some knowledge of drive partitioning. The install can be performed by replacing an existing Windows installation, wiping the drive before a clean install, or creating a new partition and installing Linux alongside Windows.

First, let’s define some terms. A “disk” or “drive” is typically a piece of hardware that stores information. A “partition” is a structure to manage the storage of information on a disk, and can include boot records, bitmaps, file directory structures, as well as data. “Volume” and “Partition” are used almost interchangeably. An Extended Partition is not considered a Volume. A “Logical drive” is a structure that emulates a physical drive. Logical Drives are considered to be Volumes.

So what are these partitions Linux is talking about? In the big inning, computers were started by a process called bootstrapping. An operator entered a very small program, usually about six instructions by hand, that would load a larger program from a tape drive or card deck, that would then load the full operating system from a system card deck, tape, or disk. It wasn’t long before someone figured out how to burn the bootstrap loader onto a ROM chip so the operator need only push the “power” button then a “boot” button. Today, that bootstrap loader is called the BIOS (Basic Input Output System) on a PC. It contains generic, standard op codes to handle the box’s front-end buttons, the keyboard, the display, and any other device where the operating system loader can be expected to reside. The BIOS must know how the disk drive is organized. Since the BIOS is”permanently” part of the hardware, it defines the structure of the system’s drives. The disk structure commonly used by windows is not coincidentally called the BIOS structure. Without getting too complicated, assuming a drive uses 512 byte “sectors” the BIOS system limits a disk’s size to 2 terabytes. Today’s drives use a sector size typically of 4096 bytes meaning the drive’s max size is about 16 terabytes. To increase a drive’s maximum capacity, one must increase the “sector” size of the drive. A sector is the minimum amount of data that can be moved in and out of the drive.

Intel foresaw this limitation and developed the GPT disk structure that loosened up this restriction and is embodied in the Unified Extensible Firmware Interface (UEFI) which Linux uses as the default disk structure. But the Linux people aren’t fools. They know the vast majority of boxes out there are going to be BIOS boxes. A version of UEFI can handle the BIOS structure. If you go “native” with Linux, chances are you will need to “re-burn” your bootstrap to conform to UEFI.
Apart from Install options, there are two ways to manage partitions in Windows; the Microsoft Management Console, and the DiskPart command-line program. You must load a disk management snap-in into the Microsoft Management Console (MMC) to manage disk partitions by a GUI. MMC is a multi-use tool that can cause havoc in the wrong hands. Cuidado!

You can encounter many different uses of partitions on a Windows system:

SYSTEM PARTITION

Contains hardware specific files allowing security tools like Bitlocker and recover tools such as Windows Recovery Environment. Multiple operating systems can exist on a drive if a Master Boot Record (MBR) is in a system partition as a primary partition.

MICROSOFT RESERVE PARTITION

Used on UEFI/GPT drives to support software that formerly used hidden sectors.

RECOVERY PARTITIONS

A partition with a recovery image of another partition.

DATA PARTITIONS

A partition storing only data, often used when the primary OS is likely to be replaced often.

Windows provides users with two different partition types; Primary and Extended. There can be a maximum of four partitions on a drive. Of those four only one can be an Extended. An Extended Partition can have an “unlimited” number of Logical Volumes(Drives). Logical Volumes act like a Primary Partition except you cannot use a logical drive to start an operating system. You cannot have another Extended Partition or a Primary Partition inside an Extended partition. A Primary Partition can contain a Master Boot Record, allowing an operating system to be loaded.

I have a slightly different agenda concerning partitions. I have installed a high capacity drive on my new multi-core machine and I want to reserve a large space on this drive for backups of my major databases residing on another machine; my music, e-books and photos. I want each database to have its own logical drive and be as isolated as possible from the OS of my new machine, which I will use mainly for software design and development. An extended partition would be perfect for this purpose. The disk management MMC will only create an extended partition after three primary partitions have been created. I don’t want three primary partitions on my drive. I only want two. So I must use the command-line DiskPart.

DiskPart is hierarchical. You must give focus to the various objects to manage them further. The only commands that work at the top level is LIST DISK. From the list you can select which one to further manage as in SELECT DISK 0. Now you can get a list of partitions or select a partition to perform further management.

SELECT DISK0
LIST PARTITION
CREATE PARTITION EXTENDED SIZE = 70000
creates the extended partition of 70 gigs
CREATE PARTITION LOGICAL SIZE = 45000
create logical drive for music bkup 45 gigs
FORMAT LABEL = “Music Backup”
format & label the volume
ASSIGN
assign the next drive letter
SELECT PARTITION 0
focus back to extended partition
CREATE PARTITION LOGICAL SIZE = 4000
create logical drive for music bkup 4 gigs
FORMAT LABEL = “eBook Backup”
format & label the volume
ASSIGN
assign the next drive letter
SELECT PARTITION 0
focus back to extended partition
CREATE PARTITION LOGICAL SIZE = 4000
create logical drive for music bkup 4 gigs
FORMAT LABEL = “Photo Backup”
format & label the volume
ASSIGN
assign the next drive letter
SELECT DISK 0
focus back to the disk
EXIT

A list of the partitions and volumes on that disk shows the results

The disk structure can now be managed by the MMC. In W8, bang into the upper right corner and search “MMC”, add the disk management snap-in from the file menu and you’re off to the races.

Leave a Reply