File Allocation Table File System (FAT, FAT12, FAT16)
File Allocation Table File System (FAT, FAT12, FAT16)
is actually a family of file systems. The basic name for this file system is FAT; the name comes from one of the main logical structures that the file system uses: the file allocation table. This file system is the one that was used by DOS on the first IBM PCs, and it became the standard for the PCs that followed. Today, most PCs still use a variant of the basic FAT file system created for those early machines over two decades ago. The most common name of the file system, "FAT", is problematic, even though it is still often used. The first FAT file system used 12-bit file allocation tables; this was later expanded to 16 bits, and became the most common file system implementation for hard disks from the late 1980s to the late 1990s. To distinguish these versions of FAT from the 32-bit successor called FAT32, the older FAT variants are now sometimes called FAT12 or FAT16. However, you will still hear just "FAT" used a lot; if so, you need to find out what specifically is being referred to, if it matters in that particular context. For more elaboration on the differences between FAT12, FAT16 and FAT32, see this page. While designed specifically for MS-DOS and used by all of the Microsoft operating systems that followed (in one way or another) FAT's ubiquitousness has caused support for it to become an important characteristic for other operating systems as well. Virtually all PC operating systems can support the basic FAT file system, even ones that bear little resemblance to Microsoft DOS or Windows. FAT12 and FAT16 partitions are the "least common denominator" of file systems--while they are limited in many ways, they are the easiest file systems to use when compatibility is a concern. Even non-PC platforms can in many cases read disks formatted in the FAT file system. Note: Most of the other subsections of the Hard Disk Logical Structures and File Systems section describe the structures and operation of the FAT file system family in more detail, so I will not get into a larger discussion of FAT here. Please refer to the other sections for details on how FAT works. Virtual FAT (VFAT) When Microsoft introduced Windows 95 in, well, 1995, they made several improvements to the operating system when compared to its predecessors. One of the changes made was an enhancement to the classical FAT16 file system that had been in use up until that point. The new variation of FAT was called Virtual FAT or VFAT for short. (Note that many people use the terms "FAT" and "VFAT" interchangeably, even though they are technically not the same. All "FAT" partitions created under Windows 95 or later operating systems are really VFAT partitions.) VFAT has several key features and improvements compared to FAT12 and FAT16:
Long File Name Support: One of the most annoying limitations of operating systems prior to Windows 95 was the eleven-character file name restriction. For most people, VFAT's most important accomplishment was enabling the use of long file names by the Windows 95 operating system and applications written for it, while maintaining compatibility with older software that had been written before VFAT was implemented. Improved Performance: The disk access and file system management routines for VFAT were rewritten using 32-bit protected-mode code to improve performance. At the same time, 16-bit code was maintained, for use when required for compatibility. Better Management Capabilities: Special support was added for techniques like disk locking, to allow utilities to access a disk in "exclusive mode" without fear of other programs using it in the meantime.
Despite the new name and new capabilities, VFAT as a file system is basically the same as FAT. Most of the new capabilities relate to how the file system is used, and not the actual structures on the disk The only significant change in terms of actual structures is the addition of long file names. Even here, VFAT supports these using what is basically a hack, as opposed to anything really revolutionary. See the discussion of long file names for more information on how VFAT implements longer file names under Windows 9x/ME. Note that as with FAT, much of the rest of the discussion of file systems in other subsections in this area of the site deals with VFAT. 32-Bit FAT (FAT32) As hard disks continued to increase in size through the 1990s, the limitations of the FAT16 and VFAT file systems began to become obvious. The use of large cluster sizes led to a significant amount of wasted hard disk space (slack). Eventually, hard disk manufacturers started to create drives so large that FAT16 could not be used to format a whole drive in a single partition. PC makers complained that FAT16 was unwieldy for modern machines, and users were confused with PCs that came with what seemed like two or three different "hard disks" (which were of course really just different partitions created to get around the FAT16 volume size limit.) To correct this situation, Microsoft created FAT32. This newest FAT variant is an enhancement of the FAT/VFAT file system (even though the "V" was dropped from the name, FAT32 is based more on VFAT than FAT). It is named FAT32 because it uses 32bit numbers to represent clusters, instead of the 16-bit numbers used by FAT16. FAT32 was created primarily to solve the two problems mentioned above. It allows single partitions of very large size to be created, where FAT16 was limited to partitions of about 2 GiB. It also saves wasted space due to slack when compared to FAT16 partitions, because it uses much smaller cluster sizes than FAT16 does.
FAT32 was first introduced in Windows 95's OEM Service Release 2, and was originally available only in later versions of Windows 95 when purchased from a hardware manufacturer. FAT32 support was later included in Windows 98, Windows ME and Windows 2000 as well. Many non-Microsoft operating systems can also now either read from or read/write FAT32 partitions. With hard disk sizes headed into the stratosphere, FAT32 has all but replaced FAT16 for those using "consumer grade" Microsoft operating systems. Note: Operating systems older than Windows 95 OSR2, including the first version of Windows 95 ("Windows 95A"), Windows 3.x, and all versions of DOS before version 7.1, cannot read FAT32 partitions. Aside from the difference in the way clusters are assigned and numbered, FAT32 is at its essence the same as regular VFAT, and the descriptions of FAT file structures apply to FAT32 as well in most cases. There are, however, some minor structural differences between FAT32 and its predecessors, in areas such as the use of file allocation tables, and the location and size of the root directory. The matter of using regular FAT16 vs. FAT32, and choosing partition and cluster sizes, is discussed in detail here. New Technology File System (NTFS) Version 1.1 / 4.0 When Microsoft created Windows NT, it built the operating system pretty much from scratch--it was based on certain existing concepts, of course, but was totally different from older Microsoft operating systems. One of the key elements of NT's architecture was the file system created especially for the operating system, called the New Technology File System or NTFS. NTFS enables many of the goals of Windows NT to be realized. NTFS is a much more complex and capable file system than any of the FAT family of file systems. It was designed with the corporate and business environment in mind; it is built for networking and with the goals of security, reliability and efficiency. It includes many features, including file-by-file compression, full permissions control and attribute settings, support for very large files, and transaction-based operation. It also does not have the problems with cluster sizes and hard disk size limitations that FAT does, and has other performance-enhancing features such as RAID support. Its most significant drawbacks are increased complexity, and less compatibility with other operating systems compared to FAT. The NTFS file system actually has more than one version. The one used by Windows NT is commonly called either version 1.1 or version 4.0, and has a few less features than the newer NTFS 5.0 used by Windows 2000. You can find a full discussion of NTFS in this subsection of the site, and a discussion of different NTFS versions and their differences here.
While originally created for Windows NT and now used primarily by Windows NT and its successor, Windows 2000, limited NTFS support has also been added to other operating systems. For example, operating systems like Linux (as well as some other UNIX variants) and BeOS can read NTFS partitions, which helps with the interoperability of different operating systems on the same machine. However, nonMicrosoft operating systems usually cannot write to NTFS partitions, generally because of the security features built into NTFS by Microsoft. New Technology File System (NTFS) Version 5.0 With the creation of Windows 2000, Microsoft added several new features to the operating system originally known as Windows NT 5.0. Several of these features are tied closely to the characteristics of the file system, which Microsoft updated at the same time. The new variation of NTFS is called NTFS 5.0. In fact, Windows 2000 relies on the changes that NTFS 5.0 includes so much that NTFS 5.0 is required; the operating system will convert older NTFS volumes to NTFS 5.0, and in some cases NTFS is required to enable key Windows 2000 capabilities. NTFS 5.0 includes several new and useful features compared to the older NTFS versions used in Windows NT 4.0 and earlier. You can find a full discussion of NTFS in this area of the site, and a discussion of different NTFS versions and their differences here. NTFS 5.0 was designed for Windows 2000 and that is the only operating system that provides full support for the file system. Windows NT 4.0 can also access NTFS 5.0 partitions if the operating system is updated with service pack #4 (SP4), however, it cannot make use of the new features that NTFS 5.0 facilitates. Much in the way that alternative operating systems have had third-party drivers created for them to allow them to read the older NTFS file systems, I would imagine that similar drivers will be created to allow Linux, BeOS and other operating systems to read NTFS 5.0 partitions, if this has not been done already. High Performance File System (HPFS) When Microsoft and Intel created OS/2, they sought to create an operating system that was more capable than the DOS and Windows versions then available. At the time, the only file system widely used on the PC was the FAT file system, which had a number of significant limitations. The FAT file system was restricted in terms of the size of partitions it could support, only allowed 11-character names, and it had none of the organization, security and reliability features that are so important to corporate, business and individual "power" users. To address these concerns, a new file system was created specifically for OS/2: the High Performance File System or HPFS. HPFS offers many significant improvements over the FAT file system. These include the following:
Support for long file names (up to 254 characters) and mixed-case file names.
More efficient use of disk space, since files are stored on a per-sector basis instead of using multiple-sector clusters. Better performance due to overall design, including an internal architecture designed to keep related items closer to each other on the disk volume. Less fragmentation of data over time, and less need to defragment the file system.
Considering how much more advanced it was than FAT, one might have expected that HPFS would have become quite popular. Unfortunately, HPFS's wagon was hitched to OS/2, and for a number of reasons (many of them related to politics between IBM and Microsoft) OS/2 never really caught on. As interest in OS/2 waned, so did support for HPFS. While early versions of Windows NT (3.51 and earlier) supported HPFS volumes natively, this support was removed in Windows NT 4.0. Support for HPFS volumes can be added to some non-OS/2 operating systems by using third-party support software, but overall this file system seems to be firmly in a "niche status". Many of its features were incorporated into NTFS by Microsoft, one should note--or at least, NTFS has some definite similarities to HPFS. You can find more information about HPFS by reading this HPFS FAQ, which isn't "official" but seems to be well-written and fairly detailed. This page includes a discussion of the internal architectural characteristics of HPFS volumes. Note that you'll find them easier to understand if you comprehend the internal structures of FAT file systems first. Comprehending NTFS also helps. :^) UNIX / Linux File Systems All file systems perform the same basic functions, based on their fundamental goals: the intelligent organization of data and efficient control of and access to that data. As a result, most of them resemble each other to some extent, even if they are also different from each other in important ways. Even if two PC file systems differ greatly in terms of their internal architecture and structures, they can be made to resemble each other closely in their outward appearance. For example, Windows NT will support both FAT and NTFS partitions, which are totally different in terms of their internal structures, but have virtually the same interface for the user (and for software applications). UNIX has been around for many decades, making it the oldest of all file systems used on PC hardware. UNIX file systems are also probably the most different from the other file systems used on PC, both internally and externally (referring to how the user accesses the file system). While most Windows users are accustomed to the Explorer-type interface for managing files and folders, UNIX files are usually managed with discrete text commands--similar to how DOS works (in fact, many principles of the FAT file system are based on UNIX.). There are graphical UNIX shells as well, of course, but many UNIX users (myself included) never use them. The more important differences, however, are internal. UNIX file systems are designed not for easy use, but for robustness, security and flexibility. UNIX file systems offer the following features, and have for many years:
Excellent expandability, and support for large storage devices. Directory-level and file-level security and access controls, including the ability to control which users or groups of users can read, write or execute a file. Very good performance and efficient operation. The ability to create "flexible" file systems containing many different devices, to combine devices and present them as a single file system, or to remotely mount other storage devices for local use. Facilities for effectively dealing with many users and programs in a multitasking environment, while requiring a minimum of administration. Ways to create special constructs such as logically linked files. Reliability and robustness features such as journaling and support for RAID.
If these features sound similar to those of NTFS, that's because UNIX and Windows NT/2000 now compete for much of the same market, so NTFS was given most of the capabilities that UNIX has. There are many other features as well, which differ from one implementation to another--there is no single "UNIX file system", any more than there is a single "UNIX operating system". Each UNIX variant (including the popular Linux for the PC, which itself has many different flavors) has a slightly different file system, though they are of course very similar to each other, and it is usually possible for different UNIX implementations to read each other's files. UNIX file systems were one of the first (if not the first) to use the hierarchical directory structure, with a root directory and nested subdirectories. (Most of us are familiar with this from using it with the FAT file system, which works the same way). One of the key characteristics of UNIX file systems is that virtually everything is defined as being a file-regular text files are of course files, but so are executable programs, directories, and even hardware devices are mapped to file names. This provides tremendous flexibility to programmers and users, even if there is a bit of a learning curve at first. Since few PC users run UNIX on their own machines, it's unlikely that you will ever actually use a UNIX file system directly. However, you may find yourself using a UNIX file system if you run a web site, for example, so understanding the basics of how UNIX works is a good idea. For more information, you may wish to consult this page, which provides a nice overview of the file system. This page provides more detail and also describes common UNIX file-manipulation commands. There are literally thousands of other sites and pages about UNIX on the Internet! BeOS File System (BFS) The BeOS operating system is designed to use its own file system, called (unsurprisingly) the BeOS File System, abbreviated BFS or sometimes befs. BFS is based strongly on the fundamental design concepts of the UNIX file systems, so those experienced with UNIX will find much that is familiar in BFS. However, BFS has also been tailored to meet some of the goals of the Be operating system, so BFS also has some special features that reflect Be's objective of positioning BeOS as a multimedia-friendly operating system.
The ability to represent multiple media devices as a single partition or volume. Support for advanced caching methods. Performance optimizations for multimedia applications. Portability; BFS partitions can be moved between different hardware platforms easily.
These are in addition to most of the benefits associated with UNIX file systems, though there are of course tradeoffs; it wouldn't be accurate to say that BFS was "better than" UNIX file systems, for example. BFS is not used on many PCs, for the simple reason that BeOS is not widely implemented. To my knowledge, Windows operating systems cannot access BFS partitions, but someone may have written a third-party driver that will allow DOS or Windows to access BFS. There is also an interface that will allow BFS partitions to be used by Linux, which to some extent reflects the fact that both Linux and BeOS tend to attract the same user base--technically knowledgeable PC users looking for something outside the realm of Microsoft operating systems. For more information on BFS, see this page.
simplification.) Master Boot Record (MBR) When you turn on your PC, the processor has to begin processing. However, your system memory is empty, and the processor doesn't have anything to execute, or really even know where it is. To ensure that the PC can always boot regardless of which BIOS is in the machine, chip makers and BIOS manufacturers arrange so that the processor, once turned on, always starts executing at the same place, FFFF0h. This is discussed in much more detail here. In a similar manner, every hard disk must have a consistent "starting point" where key information is stored about the disk, such as how many partitions it has, what sort of partitions they are, etc. There also needs to be somewhere that the BIOS can load the initial boot program that starts the process of loading the operating system. The place where this information is stored is called the master boot record (MBR). It is also sometimes called the master boot sector or even just the boot sector. (Though the master boot sector should not be confused with volume boot sectors, which are different.) The master boot record is always located at cylinder 0, head 0, and sector 1, the first sector on the disk (see here for more on these disk geometry terms). This is the consistent "starting point" that the disk always uses. When the BIOS boots the machine, it will look here for instructions and information on how to boot the disk and load the operating system. The master boot record contains the following structures:
Master Partition Table: This small table contains the descriptions of the partitions that are contained on the hard disk. There is only room in the master partition table for the information describing four partitions. Therefore, a hard disk can have only four true partitions, also called primary partitions. Any additional partitions are logical partitions that are linked to one of the primary partitions. Partitions are discussed here. One of the partitions is marked as active, indicating that it is the one that the computer should use for booting up. Master Boot Code: The master boot record contains the small initial boot program that the BIOS loads and executes to start the boot process. This program eventually transfers control to the boot program stored on whichever partition is used for booting the PC.
Due to the great importance of the information stored in the master boot record, if it ever becomes damaged or corrupted in some way, serious data loss can be--in fact, often will be--the result. Since the master boot code is the first program executed when you turn on your PC, this is a favorite place for virus writers to target. Primary, Extended and Logical Partitions
In order to use the space in a hard disk, it must be partitioned. Partitioning is the process of dividing the hard disk's space into chunks, so they can be prepared for use, or even dedicated to different uses. Even if the entire disk is intended to be left in one piece, it must be partitioned so that the operating system knows that it is intended to be left in one piece. There are many different considerations that go into deciding how to partition a hard disk. The rules that determine how partitions are used were set down very early in the original design of the PC, and have remained virtually unchanged since that time. Recall that when the PC was first invented there was only (really) one type of file system. Still, it was envisioned that in the future, multiple operating systems and/or file systems might be wanted on a single machine. Therefore, provision was made in the partitioning scheme to allow for several different partitions. The rules that govern partition setup are as follows:
A maximum of four partitions can be placed on any hard disk. These are sometimes called primary partitions. The limitation of four is one that is imposed on the system by the way that the master boot record is structured. Only one partition may be designated, at any given time, as active. That partition will be used for booting the system. See here for more on active partitions and switching active status between partitions. DOS (and the operating systems that depend on it for booting, which includes all consumer Windows operating systems) will only recognize the active primary partition. Any other primary partitions will be ignored. One of the four partitions may be designated as an extended DOS partition. This partition may then be subdivided into multiple logical partitions. This is the way that two or more logical DOS volumes can be placed on a single hard disk.
Alright, I realize that this is somewhat confusing, so let's take a look at some examples of systems, to show you how this scheme is used:
Single Partition Windows PC: Many PCs have all of their disk space made into a single partition, and use one of the FAT file systems. Such a machine would have just a single FAT primary partition on it, and nothing else. The other three "slots" for partitions on the disk would be empty. Multiple Partition Windows PC: To use more than one partition at a time on a DOS/Windows system, two partitions are used. One is a regular DOS primary partition (which becomes the "C:" drive). The other is the extended DOS partition. Within the extended DOS partition, all the other logical drives are created. So a drive with four logical drive letters would have the first (C:) be the active primary partition, and the other three (D:, E: and F:) would be logicals within the extended DOS partition. Multiple Operating System PC: A system with multiple operating systems could use one primary partition for each of up to four different file systems.
If you want, you can also combine multiple partitions with multiple operating systems. For example, you could have a primary DOS partition, an extended DOS partition, and a Linux partition. Such setups are far less common than the simpler examples above. The extended DOS partition causes most of the confusion on the part of those setting up new DOS/Windows PCs. It really functions as a "container" that holds all DOS partitions except for the first (primary) volume. The reason that this structure was used is that the original design, with its limit of four partitions, was too restrictive. The extended DOS partition system allows you to have up to 24 disk partitions in a single system, without violating compatibility with older hardware and software designed based on the original four-partition limit. Of course, nobody would use that many partitions on a system in most cases, because it would be a data organization nightmare! :^) Within the extended DOS partition, the logical drives are stored in a linked structure. The extended partition's information is contained in the master partition table (since the extended partition is one of the four partitions stored in the master boot record). It contains a link to an extended partition table that describes the first logical partition for the disk. That table contains information about that first logical partition, and a link to the next extended partition table which describes the second logical partition on the disk, and so on. The extended partition tables are linked in a chain starting from the master partition table. In terms of how the disk is used, there are only two main differences between a primary and a logical partition or volume. The first is that a primary partition can be set as bootable (active) while a logical cannot. The second is that DOS assigns drive letters (C:, D: etc.) differently to primary and logical volumes. Here's an example to hopefully make all of this a bit more clear. Let's suppose you are setting up a new system and starting with an empty 60 GB hard disk. You could create a single 60 GB partition, which would be a primary DOS partition. However, in many cases dividing up such a large disk will make it easier to manage the space, will reduce lost disk space due to slack, and will reduce defragmentation time on partitions containing more actively-used data. (See here for much more on the issues involved in partitioning.) So instead, let's say you want to split up this drive as follows:
One 8 GB primary partition for Windows and other operating system and program files. One 12 GB partition for data. One 16 GB partition for games. The rest of the disk in a 24 GB partition for large multimedia files, short-term backups and "future expansion".
I'm assuming no complicating factors here, just a simple example. To do this, you will first set up a primary DOS partition 8 GB in size. This is the first of your four partitions. You will then create an extended DOS partition that is 52 GB in size. This is the second partition on the hard disk. Within the extended DOS partition you will create three logical
volumes: one 12 GB, one 16 GB and one 24 GB. These are your second, third and fourth volumes (logical partitions). The first partition will be your C: drive from which you boot the machine, and DOS will (normally) assign D:, E: and F: to the other three logical partitions. Your hard disk will have one primary DOS partition, and one extended DOS partition containing three logical DOS volumes.
Graphical depiction of the partitioning of a 60 GB hard disk, as described in the example above. Each square represents 1 GB of space on the hard disk. The blue squares are the 8 GB primary partition; the green, red and purple squares are the 12 GB, 16 GB and 24 GB partitions respectively. The latter three partitions are logical partitions contained within an extended DOS partition, indicated by the larger, gray-shaded rectangle. Once the system is set up, there is no functional difference between these partitions, other than the fact that C: is the only bootable one and is where all the DOS system files reside. Regular files can reside wherever you want them to. Volume Boot Sectors Each partition (also sometimes called a "logical DOS volume" in the DOS/Windows world) has its own volume boot sector. This is distinct from the master boot sector (or record) that controls the entire disk, but is similar in concept. It is also sometimes called the volume boot record or partition boot sector. Each volume boot sector contains the following:
Disk Parameter Block: Also sometimes called the media parameter block, this is a data table that contains specific information about the volume, such as its specifications (size, number of sectors it contains, etc.), label name, and number of sectors per cluster used on the partition. Volume Boot Code: This is code that is specific to the operating system that is using this volume and is used to start the load of the operating system. This code is called by the master boot code that is stored in the master boot record, but only for the primary partition that is set as active. For other partitions, this code sits unused.
The volume boot sector is created when you do a high-level format of a hard disk partition. The boot sector's code is executed directly when the disk is booted, making it a favorite target for virus writers. The information contained in the disk parameter block is used by the operating system to determine where other internal structures of the partition are located, such as the file allocation tables. Active Partitions and Boot Managers Only primary partitions can be used to boot the operating system, and of these, only the specific primary partition that is set to be bootable. DOS calls the bootable partition the active partition. Only one partition can be set active at a time because otherwise, the master boot record does not know to which volume's boot code to give control of the boot process when the machine is turned on. If you partition a new hard disk and create a primary DOS partition using the standard DOS utility FDISK, but forget to set the primary partition active, the BIOS will be unable to boot the operating system. This usually results in an error message like "No boot device available". Some BIOSes will give much more cryptic messages; older AMI BIOSes are (in)famous for giving the bizarre "NO ROM BASIC - SYSTEM HALTED" message when it cannot find a boot device. The reason for this error is that early IBM systems had a hard-coded version of the BASIC language built into its BIOS ROM. If no boot device could be found, the BIOS would execute this hard-coded BASIC interpreter instead. Since non-IBM systems don't have this BASIC ROM, their BIOSes must display an error message instead of going into BASIC. Why AMI chose this confusing message is a mystery to me, but at least you understand its history now. :^) Most people are only going to have one primary partition on their PC, because most people only use one operating system. Remember that even if you want to split your disk up into multiple FAT file system partitions, only the first will be a primary partition--the rest will be logical drives within an extended partition. However, if you are using more than one operating system--meaning ones that use different file formats, like Linux and Windows ME, not DOS and Windows ME, which use the same file systems generally-then you may want to set up multiple primary partitions, one per operating system. You then have the problem of telling the system at boot time which operating system you want to use. There are programs specifically designed for this task; they are usually called boot managers or boot loaders. What a boot manager does is insert itself into the very beginning of the boot process, sometimes by setting up a special boot manager partition and making itself the active partition. When you boot up the PC, the code in this partition runs. It analyzes the primary partitions on the disk and then presents a menu to you and asks which operating system you want to use. Whichever one you select, it marks as active, and then continues the boot process from there. Other methods may also be used to accomplish the same general objectives.
Boot managers are in many ways indispensable when working with multiple operating systems. However, you still want to take care when using one, since it does modify the disk at a very low level. Some boot managers require their own, dedicated partitions to hold their own code, which complicates slightly the setup of the disk. There are now a variety of different boot manager products on the market, including some that come included with utilities like Partition Magic Partition Management Utilities (Partition Magic, etc.) Microsoft provides basic utilities that let you partition and format hard disks for use with their operating systems. These include FDISK, which creates and deletes partitions, and FORMAT, which allows you to format a hard disk to ready it for use. These programs are functional, but rather crude. They let a "typical user" do the basics, but nothing else. If you are someone who tinkers with hard disks a great deal, or works with many systems, you will quickly discover that the tools built into DOS and Windows are inadequate for doing many things you will need and want to do. To fill this gap, several companies have created third-party partition management utilities, which can do everything that FDISK and FORMAT can do, and a lot more as well. The most famous of these is the Partition Magic program, which is produced by PowerQuest. There are also other programs that compete with Partition Magic, though PM is the leader in this segment of the market. (Quarterdeck used to have a program called Partition-It that was similar, but Quarterdeck was swallowed up by Symantec and the Partition-It product seems to have disappeared.)
Main screen of Partition Magic 5.0, with a pull-down menu open to show some of the operations that the program offers. In addition to the mundane--letting you see the partitions on each of your hard disks, partitioning and formatting disk volumes, assigning labels and so on--partition management utilities typically include the following features:
Non-Destructive Partition Manipulation: You can shrink, expand or move partitions without losing the data on them. This is the primary claim of fame of Partition Magic and programs like it, because this addresses a major weakness of Microsoft's FDISK: it does not allow you to change partitions in any way. Partition Copying: You can copy a partition from one hard disk to another. This is very useful for those upgrading systems. File System Conversion: If your system supports FAT32, you can convert disks of the appropriate size from FAT16 to FAT32, or vice-versa. You can also convert from FAT16 or FAT32 to NTFS, or vice-versa, on newer versions. This conversion is also non-destructive.
Cluster Resizing: You can change the cluster size of an existing partition, again, non-destructively. Other: Depending on the software and its specific version, you can also do things like setting up a boot manager for multiple operating systems, creating rescue disks, and so on.
As you can see, this software provides you with a host of capabilities; you probably knew just from reading that list if this type of program is right for you. A typical PC user who buys a retail PC, uses it for a few years and buys a new one, doesn't need this kind of software. For the hobbyist, homebuilder, upgrader or system administrator, it's hard to do without... Warning: An important caveat about partitioning utilities: some of their operations can take a fair bit of time. This applies particularly to tasks such as resizing partitions or changing cluster sizes. During the time that this work is taking place, your hard disk is vulnerable to data loss in the event of a hardware or power failure. It is highly recommended that you back up your data before working on your partitions; when I am doing this sort of work, I try to make sure the PC is plugged into a UPS, just in case. (This is also true of using FDISK and in fact any software that works intimately with the hard disk, but since FDISK is normally used when the disk is empty, there isn't the same concern about data loss.) Warning: Some companies that produce hard disk controllers, such as Promise (the maker of the popular Promise Ultra series of IDE/ATA hard disk controllers) have publicly made warnings that third-party partitioning and formatting utilities should not be used on drives connected to their hardware. Frankly, I have never seen a reasonable explanation for why this should be a problem, and I know that many people do use Partition Magic and other similar programs on such drives with no problems. I suspect that this exclusion exists primarily to let Promise "cover themselves" in the event of bugs in third-party software, or problems that arise due to software they have not tested. So, I provide this warning so you know their position, and you can decide for yourself what you want to do. Be aware that due to this statement, they will probably not be of much help if you encounter problems with their hardware after using third-party software. The DOS Boot Process The system boot sequence is the series of steps that the system performs when it is turned on (or rebooted with the reset switch, for example). This always starts with the special boot program software that is in the system BIOS ROM. The BIOS has several steps that it must perform to test the system and set it up, before any operating system can be loaded. These steps are described in detail here. Once the BIOS has completed its startup activities, the last thing it does is to begin the process of loading the operating system. It does this by searching for a boot device
containing boot code to which it can hand off the boot process. It will search for boot devices in the order specified by the BIOS setting that controls the boot sequence. If it cannot find a boot device it will terminate with an error. Assuming that the BIOS finds a boot sector on a device, the process of loading the operating system begins. If the operating system is DOS, or any variant of Windows that starts out by booting the equivalent of DOS--which is all of them other than Windows NT or Windows 2000--then a specific operating system load sequence commences, which is normally called the DOS Boot Process. In the case of Windows, additional steps are added to the end of the process after the underlying DOS operating system has loaded. The process below outlines how booting from the hard disk functions. Booting from the floppy disk differs only in the first few steps, because the floppy disk's structures are slightly different. Floppies cannot be partitioned, and hence have no master boot record or partitions. This means that the steps where the master boot record are searched are skipped. Here are the steps in the DOS boot process: 1. The BIOS, having completed its functions, loads the boot code in the master boot record and transfers control to it. The master boot record code begins execution. If the boot device is a floppy disk, the process continues with step 6. 2. The master boot code examines the master partition table. It is searching for two things. First, it must determine if there is an extended DOS partition. Second, it must determine if there is a bootable partition specified in the partition table. 3. If the master boot code finds an extended partition on the disk, it loads the extended partition table that describes the first logical volume in the extended partition. This extended partition table is examined to see if it points to another extended partition table. If it does, then that table contains information about the second logical volume in the extended partition, so it is loaded and examined. (Recall that logical volumes in the extended partition have their extended partition table chained one to the next.) This process is continued until all of the extended partitions have been loaded and recognized by the system. 4. After loading the extended partition information (if any), the code attempts to boot the primary partition that is marked active (bootable). If there are no partitions marked active, then the boot process will terminate with an error. The error message is often the same one that occurs if the BIOS finds no boot device, and is generally something like "No boot device", but can be the infamous "NO ROM BASIC - SYSTEM HALTED". 5. If there is a primary partition marked active, the code will boot it. The rest of the steps assume this is a DOS primary partition. 6. The volume boot sector is loaded into memory and tested, and the boot code that it contains is given control of the remainder of the boot process. 7. The volume boot code examines the structures on the disk that it is booting to ensure that everything is correct and in the right place. If not, the boot process will end in an error here as well.
8. The code searches the root directory of the device being booted for the operating system files that contain the operating system. For a system running MS-DOS these are the files "IO.SYS", "MSDOS.SYS" and "COMMAND.COM". 9. If the operating system files are not found, the boot program will display an error message, which is usually something like "Non-system disk or disk error Replace and press any key when ready". Some people think that this message means the system was never booted, that the BIOS examined the floppy disk for example and just rejected it because it couldn't boot it. As you can see from this description of the boot process, the volume boot code was indeed loaded and executed, and in fact it is what prints the message when it can't find the operating system files! See here for an explanation of why this distinction is so important. 10. If the operating system files are found, the boot program will load them into memory and transfer control to them. First, IO.SYS is loaded and its code executed. IO.SYS will then executed MSDOS.SYS (in pure DOS systems-MSDOS.SYS is just a text file in Windows 95 and later.) Then the more complete operating system code loads and initializes the rest of the operating system structures. For MS-DOS, this means loading the command interpreter (COMMAND.COM) and then reading and interpreting the contents of the CONFIG.SYS and AUTOEXEC.BAT system control files. At this point the operating system code itself has control of the PC. In the case of 32-bit Windows versions like Windows 95/98/ME, the steps above are only the beginning of the process. The initial DOS operating system files control the loading and execution of many more routines as the boot progresses, which perform tasks such as reading the system registry, initializing hardware devices and starting the graphical operating system shell. In fact, it is surprising in some ways just how many different pieces of code have a hand in starting up the PC. Boot Sector Viruses Computer viruses are small programs designed to attach themselves to your computer, running without your knowledge and spreading themselves to "infect" other systems. Sometimes malicious, and sometimes just annoying, they are always a concern to the modern computer user. Viruses are discussed in substantial detail here. The boot code that is stored on the hard disk and executed when the disk is booted up, is a prime target for viruses. The reason is simple: the goal of the virus writer is to get the virus code executed as often as possible, to allow it to spread and cause whatever other mischief it is written to create. What better place to put the virus than in code that is executed every time the PC is run, automatically, and before anything else is in memory? One of the major classes of viruses, called boot sector infectors, targets the vulnerable boot areas of the hard disk. (The other major groups of viruses attack individual files, or spread using email and other Internet protocols.) Some infect the code in the master boot record while others infect the code in the volume boot sector(s). By infecting this code, the virus assures itself of always being able to load into memory when the machine is
booted, as long as you boot from the volume that is infected. There is always code in any disk (hard or floppy) that is formatted, whether or not the system files are present on the disk. Many people think that when you boot a system from a floppy or hard disk that has no system files--because it was formatted without transferring them--that the system doesn't boot. It's worth pointing out that in truth, it does boot; the boot process just halts very quickly when no operating system files can be found, as described here. In fact, the error message "Non-system disk or disk error - Replace and press any key when ready", is printed by the volume boot code that is read from the volume boot sector on the disk. The importance of this distinction has to do with the spread of viruses. Since the volume boot code is always executed when the system attempts to boot from a device, a virus can be present on a floppy disk even if you don't format it with the system files on it using "FORMAT /S" or the "SYS" command. As soon as you see the "Non-system disk..." message, the virus could already be in your system memory. IDE/ATA Controllers Every PC system that uses the IDE/ATA interface has at least one IDE/ATA controller. Now, as soon as you read that, a question probably formed in your mind: isn't the drive controller built into the drive in IDE, and in fact, wasn't that the whole point of how the name "IDE" came about? And you're absolutely right. Unfortunately, naming conventions in the PC world often leave much to be desired. A device that resides within the system and interfaces with a peripheral device is often commonly called a "controller", even though this isn't technically accurate. (As just one other example, the circuit on the motherboard that interfaces to the keyboard is called a "keyboard controller" even though keyboards also have their own built-in controllers.) At any rate, "a rose is a rose" and all that... :^) So what exactly does this so-called IDE/ATA controller do, if not control the hard disk? Well, it acts as the middleman between the hard disk's internal controller and the rest of the system. As such, its less common name is the more accurate one: IDE/ATA interface controller. The controller (whatever its name) is what manages the flow of information over the IDE/ATA channels, allowing the hard disk to talk to the rest of the PC. Traditionally--meaning: "back in the olden days" :^)--the IDE/ATA controller was a discrete interface card that plugged into a system expansion slot. The first IDE/ATA controllers were ISA bus cards. These were functional, and appropriate for technology of the late 1980s and early 1990s, but the ISA bus is very slow--throughput was limited to a maximum of about 8 MB/s. Other uncommon buses of that era such as EISA and MCA also had IDE/ATA controllers to suit, but those technologies never caught on. The creation of the VESA local bus meant a great improvement in performance for hard disks using controllers on that bus. In some cases, multi-function controller cards were used, providing both IDE/ATA interfacing, floppy drive interfaces and serial and parallel ports as well.
IDE/ATA controllers were transformed with the creation of the PCI bus in the mid1990s, and Intel's decision to integrate the interface control functions into their new chipsets. Since that time, virtually every new motherboard has come with the interface controller built in, saving the cost of a separate controller card and also saving a PCI bus slot. The IDE/ATA cables simply connect to appropriate connectors on the motherboard; a much simpler arrangement.
A pair of IDE/ATA interface connectors on a typical motherboard. If you look closely, you can see the word "PRIMARY" above the top connector, identifying it as the connector for the primary IDE/ATA channel. Of course, discrete PCI controllers continue to be made, and they are relatively inexpensive. These are commonly used for two main reasons: for expansion, if more IDE/ATA devices need to be used on a system, or to get around BIOS limitations of the built-in IDE/ATA controllers, enabling access to larger drives or faster transfer modes. In most cases, it is possible to use both the built-in and added-in controllers, as long as they are properly configured--or the built-in controllers can be disabled to free up system resources. Tip: Another reason that sometimes add-in controllers are installed in a system is to provide support for IDE/ATA RAID. You can read more about RAID in general here.
An after-market, PCI-based IDE/ATA controller (the Promise Ultra66). Note the PCI interface connector on the bottom. The two IDE/ATA channel connectors on the top of the card are where IDE/ATA cables from the drives are attached to the card. Some time in the next few years, even PCI will eventually become too limiting to handle the maximum throughput of the fastest IDE/ATA drives. The practical limit of the standard 32-bit, 33 MHz PCI bus is about 100 MB/s, and that's already the interface speed of current Ultra DMA/100 drives; maximum sustained transfer rates are about half that. It won't be long before regular PCI is just not up to the task. In fact, this is already happening with SCSI, because SCSI drives are faster and more than one can transfer data at a time. SCSI host adapters ("controllers") are now showing up using enhancements to the PCI bus such as 64-bit PCI, or PCI-X. Note: Add-in ATA controllers may appear to the system as if they were actually SCSI controllers. This means that they may be listed as SCSI controllers in the Windows device manager. To enable booting from the device you may also have to set your BIOS's boot sequence to be SCSI first. See this page for more on configuration issues.
The data pathway over which information flows in the IDE/ATA interface is called a channel. Each IDE channel is capable of communicating with up to two IDE/ATA devices (including ATAPI devices if they are supported by the BIOS). Despite Western Digital going so far as to define "dual IDE channels" as part of its enhanced IDE "standard", there has never really been anything barring the use of more than one IDE/ATA channel in a PC. It just wasn't regularly done prior to the mid 1990s. Before the popularity of ATAPI CD-ROMs and removable drives, and plentiful and cheap hard disk storage, the vast majority of PCs used one or two hard disks on a single IDE channel, and so a single channel was sufficient. In fact, it is theoretically possible to configure and use as many as four (or even more) different IDE/ATA interface channels on a modern PC. There is nothing inherently different in concept between these channels, although there can be a difference in terms of how they are implemented. In theory, they are independent system devices, each using their own set of system resources. If configured correctly (so they don't try to use the same resources and therefore conflict), each IDE channel can behave basically independently.
Single, Master and Slave Drives and Jumpering Each IDE/ATA channel can support either one or two devices. IDE/ATA devices of course each contain their own integrated controllers, and so in order to maintain order on the channel, it is necessary to have some way of differentiating between the two devices. This is done by giving each device a designation as either master or slave, and then having the controller address commands and data to either one or the other. The drive that is the target of the command responds to it, and the other one ignores the command, remaining silent. Note that despite the hierarchical-sounding names of "master" and "slave", the master drive does not have any special status compared to the slave one; they are really equals in most respects. The slave drive doesn't rely on the master drive for its operation or anything like that, despite the names (which are poorly-chosen--in the standards the master is usually just "drive 0" and the slave "drive 1"). The only practical difference between master and slave is that the PC considers the master "first" and the slave "second" in general terms. For example, DOS/Windows will assign drive letters to the master drive before the slave drive. If you have a master and slave on the primary IDE channel and each has only one regular, primary partition, the master will be "C:" and the slave "D:". This means that the master drive (on the primary channel) is the one that is booted, and not the slave. Devices are designated as master or slave using jumpers, small connectors that fit over pairs of pins to program the drive through hardware. Each manufacturer uses a different combination of jumpers for specifying whether its drive is master or slave on the channel, though they are all similar. Some manufacturers put this information right on the top
label of the drive itself, while many do not; it sometimes takes some hunting around to find where the jumper pins are on the drive even once you know how the jumpers are supposed to go. The manufacturers are better about this now than they have been in the past, and jumpering information is always available in the manual of the hard disk, or by checking the manufacturer's web site and searching for the model number. I describe (and illustrate) the jumpers on IDE/ATA disks in detail in the section on hard disk construction. For a fundamental description of what jumpers are, see here. ATAPI devices such as optical, Zip and tape drives are jumpered in pretty much the same way as hard disks. They have the advantage of often having their jumpers much more clearly labeled than their hard disk counterparts. Most optical drives, for example, have three jumper blocks at the back, labeled "MA" (master), "SL" (slave) or "CS" (cable select). If you are using two drives on a channel, it is important to ensure that they are jumpered correctly. Making both drives the master, or both the slave, will likely result in a very confused system. Note that in terms of configuration, it makes no difference which connector on the standard IDE cable is used in a standard IDE setup, because it is the jumpers that control master and slave, not the cable. This does not apply when cable select is being used, however. Also, there can be electrical signaling issues if one connects a single drive to only the middle connector on a cable, leaving the end connector unattached. In particular, the use of Ultra DMA is not supported in such a configuration; see the discussion of the 80-conductor Ultra DMA cable for more information. As long as one drive is jumpered as master and the other as slave, any two IDE/ATA/ATAPI devices should work together on a single channel. Unfortunately, some older hard disks will fail to work properly when they are placed on a channel with another manufacturer's disk. One of the reasons why drives don't always "play nicely together" has to do with the Drive Active / Signal Present (/DASP) signal. This is an IDE/ATA interface signal carried on pin #39, which is used for two functions: indicating that a drive is active (during operation), and also indicating that a slave drive is present on the channel (at startup). Some early drives don't handle this signal properly, a residue of poor adherence to ATA standards many years ago. If an older slave drive won't work with a newer master, see if your master drive has an "SP" (slave present) jumper, and if so, enable it. This may allow the slave drive to be detected. Drive compatibility problems can be extremely frustrating, and beyond the suggestion above, there usually is no solution, other than separating the drives onto different channels. Sometimes brand X won't work as a slave when brand Y is the master, but X will work as a master when Y is the slave! Modern drives adhere to the formal ATA standards and so as time goes on and more of these older "problem" drives fall out of the market, making all of this less and less of a concern. Any hard disk bought in the last five years should work just fine with any other of the same vintage or newer. When using only a single drive on a channel, there are some considerations to be aware of. Some hard disks have only a jumper for master or slave; when the drive is being used
solo on a channel it should be set to master. Other manufacturers, notably Western Digital, actually have three settings for their drives: master, slave, and single. The last setting is intended for use when the drive is alone on the channel. This type of disk should be set to single, and not master, when being used alone. Also, a single device on an IDE channel "officially" should not be jumpered as a slave. In practice, this will often work despite being formally "illegal". Many ATAPI drives come jumpered by default as slave--because they are often made slaves to a hard disk's master on the primary IDE channel, this saves setup time. However, for performance reasons they are sometimes put on the secondary channel, and often the system assemblers don't bother to change the jumpers. It will work, but I don't recommend it; if nothing more, it's confusing to find a slave with no master when you or someone else goes back into the box a year or two later to upgrade. For performance reasons, it is better to avoid mixing slower and faster devices on the same channel. If you are going to share a channel between a hard disk and an ATAPI device, it is generally a good idea to make the hard disk the master. In some situations there can be problems slaving a hard disk to an optical drive; it will usually work but it is non-standard, and since there is no advantage to making the ATAPI device the master, the configuration is best avoided. There are many more performance considerations to take into account when deciding how to jumper your IDE devices, if you are using several different ones on more than one channel. Since only one of the master and slave can use any channel at a time, there are sometimes advantages to using more than one IDE/ATA channel even if not strictly necessary based on the number of devices you are trying to support. There can also be issues with using a drive that has support for a fast transfer mode like Ultra DMA with older devices that don't support these faster modes. See this section for a discussion of performance issues and IDE/ATA configuration.