Step By Step 8 - Drive Partitioning

Originally published in Australian Personal Computer magazine, June 1998.
Last modified 03-Dec-2011.

 

Most IBM compatible computers run one, and only one, operating system.

But where's the fun in that?

If you feel a hankering to set up two or more operating systems (OSes) on your computer - perhaps Windows 95 and NT, or 95 and Linux, or Linux and OS/2 and MS-DOS and NetBSD and OS/9 - you'll probably need to know about multi-format partitioning. Different operating systems often use different disk formats - and, even if they're compatible with the same disk format, they don't necessarily work when they're all installed on the one partition.

Step-by-step instructions on setting up a machine for all the weird and wonderful possible combinations of operating systems would take rather a while, so this article is of necessity more of a data source than a recipe.

The basics

First, Partitions 101. A partition is a section of the hard drive which behaves, as far as the user is concerned, like a whole separate drive unto itself. It's still really just part of another drive, so you can't copy data from one partition to another as fast as you can from one real drive to another. Ignoring performance considerations, though, a separate partition might as well be a real separate drive. A 4Gb drive can have, say, three partitions, adding up to its total capacity but referred to by the computer as C:, D: and E:.

Partitions are useful for two basic reasons - they get around the drive size limitations of older operating systems, and they let you have multiple, differently formatted "drives" on one physical hard drive.

The MS-DOS hard disk partition table, the little chunk at the beginning of the disk that tells the computer where partitions begin and end, has room for only four "primary" partitions. If you want more than four partitions on one physical disk, you have to designate one of these primary partitions as an "extended" partition, which lets you subdivide it into "logical" partitions. Your first hard drive must have at least one primary partition, but subsequent drives can have only extended partitions, if you like.

Other operating systems get around this inelegant limitation by using different kinds of partition tables. They generally still need a basic MS-DOS-style partition table on the first active partition, though, which points to their own partition information. It's this sort of thing that causes people to be so rude about the backward compatibility of IBM compatible computers.

Getting back to the antiquated MS-DOS partitioning system - which, realistically, is probably what you're going to end up using - primary partitions are named before extended partitions. If you have two hard drives, each containing a primary and two extended partitions, the primary partition on the first drive is C:, the primary partition on the second drive is D:, then the extended partitions on the first drive are E: and F: and the extended partitions on the second drive are G: and H:. This is a point to remember for multi-drive OS installations, if you add or remove drives. If you add another hard drive with a primary partition on it, it'll push all of your drive letters along one, and OSes on re-lettered drives will probably stop working.

Shuffling systems

When you've got multiple operating systems installed, the only elegant way to boot the one you want is by using a "boot manager" of some description. Operating systems can only be booted from a primary partition; the one to boot is marked as "active" in the partition table. Boot managers get around this by residing on a primary, active partition themselves, and making it possible for operating system components on different partitions to load.

Probably the best of the currently available boot managers is V Communications' System Commander. It supports all of the popular operating systems, and even lets you run Windows, OS/2 and DOS from the same primary FAT (MS-DOS format) partition. You make your partitions, install your first OS, and then install System Commander; now, when you install more OSes, System Commander automatically detects them and adds them to its menu.

Setting it up

Rearranging partitions used to be a painful exercise. If you had a 600Mb and a 400Mb partition, and wanted to change their sizes, you had to back up all of your data, delete the partitions, repartition the drive, reformat the partitions, and restore your data. Fortunately, modern partition management software like Powerquest's very popular Partition Magic lets you create, remove, squeeze and stretch partitions at will - although, of course, you can't make a partition smaller than the size of the data it contains.

Every OS also comes with its own program for creating and deleting partitions, usually inventively called FDISK. Without a program like Partition Magic, you have to use an operating system's own FDISK to make the partition that operating system will reside on, unless the OS manual explicitly says the MS-DOS FDISK will do. MS-DOS FDISK only writes the MS-DOS System ID to partitions it creates. The System ID is a one-byte code in the partition table which identifies each partition's allegiance. A dedicated FDISK for a particular OS will write the correct System ID.

Current Microsoft OSes cohabit well on the one machine. Dual-installing Windows 95/98 and Windows NT is easy enough - all you have to do is install 95/98, and then install NT on the same partition, and NT will automatically detect the other OS and set up a boot menu. Microsoft OSes are, however, less flexible in their installation options than OS/2 or Linux, the most popular other choices. MS-DOS has to be installed on C:. Windows 95/98's boot files must also be on C:, though its data files can be elsewhere. Windows NT has to install a loader on your first FAT partition. But OS/2 and Linux can be installed anywhere.

Using Partition Magic gets you around the multiple-FDISKs problem; you use Partition Magic to build all of your partitions, specifying what kind they should be. With the help of a good boot manager like System Commander it gets even simpler - make the partitions, install your Microsoft must-be-on-C OS (assuming you want to install a Microsoft OS), then install System Commander and keep installing OSes, with System Commander adding each new OS to its menu automatically as you go.

The only trick here applies to those who want Windows 95 and MS-DOS 6 as well - if you installed DOS 6 as your first OS, installing System Commander and then Windows 95 will prevent System Commander from booting, until you boot from a DOS 6 floppy and run the SCIN program in the System Commander directory.

Overall, setting up multiple OSes is becoming easier and easier, even as the number of "sensible" operating systems for average IBM compatible folks to use drops towards one. As things stand, it's Windows 95/98 for the masses and Windows NT for the power users, with MS-DOS for the hardy traditionalists. Fortunately, Linux is going great guns, and recent versions are becoming almost user-friendly. So you still don't have to be a TOTAL propellorhead to care about this stuff.

Partitioning Glossary

Active Partition - The active partition on a disk is the one the computer will try to boot from. Only one partition per drive can be marked active at a time.

ATA - Short for AT Attachment, another term for IDE. Not to be confused with EIDE.

BIOS - Basic Input/Output System, the clunky old 16 bit ROM code that governs the very start of the booting process in most IBM compatible PCs.

EIDE - A more advanced form of IDE. Modern "IDE" drives are actually EIDE, which for most people's purposes is as good as SCSI.

IDE - Integrated Drive Electronics, the old-style PC drive interface that has the advantage that it requires no controller hardware in the PC - every drive has a controller onboard - but which has various and assorted functional limitations compared with SCSI, and EIDE. For instance, IDE drives must have a boot partition completely within the first 1024 cylinders of the disk. If the boot partition is larger than this and files that the BIOS wants to read during booting are moved out of the first 1024 cylinders, the machine will fail to boot.

SCSI - Small Computer Systems Interface, the connection system that has done all along what EIDE is only now attempting. SCSI allows devices other than hard drives to be connected, like scanners and tape backups. EIDE provides some broadly similar features, but lacks SCSI's standardisation and performance.

 

Popular file systems at a glance

Ext2 - Linux, the most popular PC UNIX OS, uses this format for its partitions. Linux partitions have the odd property of being invisible to other operating systems; OS/2 will see, for instance, an NTFS partition as a drive it cannot access, but will not perceive the existence of Ext2 partitions at all.

FAT - Also known as FAT16, this is the old-fashioned MS-DOS file system, now definitely showing its age and supplanted by FAT32. FAT doesn't support partitions larger than two gigabytes, and on partitions larger than 512Mb it uses space very inefficiently. A 1Gb or bigger FAT partition allocates space in 32 kilobyte blocks (or "clusters"), so that even the tiniest of files uses 32K of disk space, and every file wastes an average of 16K.

FAT partitions can only have 512 entries in their root directory - and long file names, as they are implemented by Windows 95/98's "VFAT", take up more than one entry. This is because the extra text is stored as a series of linked directory entries - one entry for the standard DOS "eight dot three" character filename, and then another entry for every 13 characters in the long name.

FAT32 - The file system that was introduced with the OSR2 release of Windows 95 (version 4.00.950 B). It's like FAT, except it can handle partitions up to two terabytes in size, and uses smaller clusters - only 4Kb on drives smaller than 8Gb. Windows NT does not yet support FAT32, though apparently version 5 will.

HPFS - the file system used by IBM's now-defunct OS/2. Windows NT 3.51 supported HPFS, but version 4.0 does not, unless you upgraded from 3.51 or manually installed the 3.51 driver.

NTFS - Windows NT's favourite file system. NTFS is a Proper File System with access permissions and security features and lots of other stuff that average users don't need. Windows NT comes with a FAT16 to NTFS converter, inventively named "Convert"; from the command line enter "convert <drive letter>: /fs:ntfs". This only works one way - you can't re-FAT NTFS partitions. If you tell Convert to convert your system partition, it'll happen the next time you reset the computer.

The Windows NT system partition must reside entirely within the first 7.8Gb of a drive. If your NT boot partition is bigger than this and system files are moved beyond the first 7.8Gb (by disk defragmentation, for example), NT won't be able to boot.



Give Dan some money!
(and no-one gets hurt)