Absolute Beginners Guide to A+ Certification. Covers the Hardware and Operating Systems Exam

 < Day Day Up > 

No matter which version of Windows you use to get a hard disk ready for use, you have two big decisions to make:

  • What file system to use

  • What partition type to choose

Read on to discover what this means, which versions of Windows support which type, and when to select a particular option.

File Systems Used by Windows

What exactly is a file system, anyway?

A file system describes how data and drives are organized. In Windows, the file system you choose for a hard disk affects the following:

  • The rules for how large a logical drive (drive letter) can be, and whether the hard disk can be used as one big drive letter, several smaller drive letters, or must be multiple drive letters

  • How efficiently a system stores data; the less wasted space, the better

  • How secure a system is against tampering

  • Whether a drive can be accessed by more than one operating system (an important point if you want to install Windows XP and still use the existing Windows 98 operating system in a dual boot configuration, for example)

How quickly do you need to decide this? You must choose a file system during disk preparation, although you can sometimes change to a better one later.

Early versions of Windows 95 only support FAT16. As Mr. T would say, "I pity the fool still using that version of Windows." As you'll learn shortly, FAT16 is a lousy match for large hard disks.

What are your options?

Windows 9x and Windows Me give you these choices:

  • FAT16

  • FAT32

Windows NT/2000/XP can create the following file systems on a new drive:

  • FAT16

  • FAT32

  • NTFS

Allocation Units (Clusters) and File Systems

There are many reasons to choose one file system over another when you prepare a hard disk with Windows, but one of the most important reasons has to do with how Windows creates and keeps track of the files you and Windows make. As you learned in Chapter 14, "Storage," the basic unit of disk management is called the sector. Each and every sector on any hard or floppy disk contains exactly 512 bytes of data if you use standard Windows disk-preparation tools.

Windows NT 4.0 before Service Pack 4 uses an older version of NTFS than Windows 2000 and Windows XP, and doesn't support FAT32. If your version of Windows NT has Service Pack 4 or greater, it uses what some folks call NTFS 5 , which works with Windows 2000 and Windows XP.

Life would be really simple if Windows could use individual sectors when it stores data. Instead, in almost every case, Windows uses various groups of sectors called clusters (by old-timers) or allocation units (a more recent term that sounds bureaucratic but means exactly the same thing) to store data on most types of disk drives. An allocation unit is the smallest amount of disk space an operating system can use to store a file. Even if a file uses less than an allocation unit, the operating system must still allocate the entire allocation unit to that file. Various file systems use varying numbers of allocation units to save a file and, to make matters worse , the allocation unit size varies with the size of the disk.

Some magneto-optical drives use a nonstandard sector size.

Why does Windows use allocation units (groups of sectors) instead of individual sectors to store files? Because in most cases the number of sectors is too big for Windows to keep track of on a disk drive.

Here are two examples:

Example #1 : A 3.5-inch 1.44MB floppy disk has an allocation unit (cluster) size of 512 bytes. In other words, a sector equals an allocation unit. How many allocation units are there on a floppy disk? Let's do the math:

  1. A floppy disk contains 1,457,664 bytes.

  2. Divide 1,457,664 by 512 to determine the number of sectors.

  3. My calculator says 2,847 sectors (and, in this case, the same number of allocation units).

With floppy disks, Windows uses a file system that can keep track of no more than 4,096 (2 12 ) files on a disk. Because 2,847 (the number of sectors) is less than 4,096, it's no problem to use each sector individually for data storage.

What happens with a hard disk? The 12-bit (2 12 ) file system that Windows uses for floppy disks isn't large enough to handle a hard disk, even a modestly sized one.

Example #2 : One of my computers has an old 1.2GB hard disk, which contains 2,503,872 sectors. At 512 bytes per sector, the drive has a capacity of 1,281,982,464 bytes. This hard disk was introduced when Windows 95 was new.

Windows 95 originally used a file system called FAT16, which was designed to handle up to 65,536 (2 16 ) files per drive for hard disks. This number is many times smaller than the number of sectors on the drive. The solution? Divide the sectors into groups called allocation units. The number of allocation units must be at or below the maximum number of files the file system can manage.

How many sectors are needed to make an allocation unit with this drive? Let's try some math, and this time let's use a table (see Table 15.1) to set up the calculations.

Table 15.1. Calculating a Valid Allocation Unit (Cluster) Size

Sector Size (S)

Sectors Per Cluster (C)

Number of Bytes Per Cluster (SxC=B)

Disk Capacity (Sx512=D)

Number of Files Per Drive (D/B=N)

Is N <65,536?

512

2

1,024

1,281,982,464

1,251,936

No

512

4

2,048

1,281,982,464

625,968

No

512

8

4,096

1,281,982,464

312,984

No

512

16

8,192

1,281,982,464

156,492

No

512

32

16,384

1,281,982,464

78,246

No

512

64

32,768

1,281,982,464

39,123

Yes

Here's what's going on in Table 15.1. The allocation unit (cluster) size must result in less than 65,536 files per drive so that Windows 95 can manage the hard disk. To calculate this value, we start by taking the sector size (S) and multiplying it by different values of sectors per cluster (C). This calculation (SxC) creates the value in "Number of Bytes Per Cluster" (B). When B is used to divide the disk capacity (D) to determine the number of files per drive (N), N is compared to 65,536 (the maximum number of files that Windows 95 can manage on the drive). A value for N that is equal to or less than 65,536 can be used as the allocation unit (cluster) size for the drive.

As you can see from Table 15.1, this hard disk must use a cluster size of 32,768 (64 sectors) to store a file if the drive is used as a single drive letter. However, smaller hard disk drives using the same FAT16 file system can use smaller cluster sizes. Table 15.2 shows how the cluster sizes vary with hard disk drive sizes. If a large drive is split up into two or more drive letters, the allocation unit size is determined from the size of each drive letter.

Table 15.2. FAT16 Drive and Allocation Unit Sizes

Drive Minimum Size

Drive Maximum Size

Allocation Units

Sectors

Bytes

Kilobytes ( KB )

16MB [1]

127MB

4

2,048

2

128MB

255MB

8

4,096

4

256MB

511MB

16

8,192

8

512MB

1,023MB

32

16,384

16

1,024MB (1GB)

2,047MB (2GB)

64

32,768

32 [2]

[1] Drives smaller than 16MB use the FAT12 file system, which uses an 8KB allocation unit size .

[2] Windows NT/2000/XP also support a 64KB allocation unit size for drives up to 4,095MB (4GB), but this is not supported by Windows 9x/Me and is not recommended .

What is the practical impact of larger allocation unit sizes as drive size increases ? Because an operating system must use an entire allocation unit to store a file, even if the file is smaller than the allocation unit, larger allocation unit sizes waste disk space.

Let's assume that you want to save a file that requires 5,684 bytes of disk space. How many sectors does this file require? 5684/512=7. However, in the real world, when you save a file on a hard disk, you use allocation units, not individual sectors to save a file. Figure 15.1 shows you how much disk space is wasted when you save this file on drives with varying allocation unit sizes.

Figure 15.1. As allocation unit (cluster) sizes increase from 2KB (4 sectors) up through 32KB (64 sectors), a file with an actual size of 7 sectors uses less and less of an allocation unit.

As you can see from Figure 15.1, the remainder of the allocation unit cannot be used by another file, and is wasted space.

Because of the way that computers work, each possible cluster size shown in Table 15.1 and Figure 15.1 is a power of two larger than the previous one. For example, the number 16,384 is also 2 14 , and cluster size required for the 1.2GB hard disk, 32,768, is also 2 15 . The number 65,536 (the number of files early versions of Windows 95 can manage) is 2 16 . This provides the name FAT16 (for the 16-bit file allocation table) used by this version of Windows.

You might be wondering what has happened to enable Windows to use 40GB, 80GB, 120GB, and even larger drives. More efficient file systems that use fewer sectors per cluster is the answer, and in the following sections you'll learn more about these newer file systems.

FAT16

FAT16 (also referred to as FAT) is the oldest and simplest file system used by modern versions of Windows, dating back to MS-DOS versions 3.3 and above. Windows 9x's version of FAT16 is similar to that of MS-DOS, but it permits the use of long filenames and enhanced file attributes, storing the date a file was created, last modified, and last viewed .

FAT16's highlights include

  • The 16-bit file allocation table (FAT) (which is where the name comes from, by the way), which allows for a maximum of 65,536 allocation units (2 16 ). As you learned in the previous section, an allocation unit (cluster) can be occupied by a file. What about folders (subdirectories)? As far as the FAT is concerned , a folder is a type of file that points to the location of other files, so whenever you create a folder, this counts against the limit as well.

  • A limit of 512 entries in the root directory or root folder. Because 32-bit versions of Windows, such as Windows 98, store both the actual long filename and its 8-character plus 3-character short filename (or DOS alias) as separate entries, the actual number of files and folders in the root directory cannot exceed 256 (5122) assuming that each file uses only 2 entries. Some long filenames are so long they use up many entries. See Figure 15.2 for an example of a file that uses three entries (one for the DOS alias and two for the long filename, or LFN). So, make sure you store files with long filenames on floppy or hard disks in a folder, not the root directory! If you run out of entries in the root directory, the disk is "full."

    Figure 15.2. When the file Verisignseal trans.gif is stored, Windows 95 creates a DOS alias from the first six characters of the name and the file extension. The actual long filename (LFN) is also stored, using as many entries as necessary (in this case, two additional entries ).

  • A maximum logical drive size of 2,048MB (2.1GB) because of the limit of 65,536 files/folders per drive; Fdisk must split larger physical drives into multiple logical volumes . So, even a modest 10GB hard disk must be split into at least five drive letters (C, D, E, F, and G)!

  • File allocation unit sizes that range from 2,048 bytes (2KB) up to 32KB, depending on the size of the logical drive (refer to Table 15.1).

A long filename is no big deal today, but when Windows 95 was introduced, it was exciting. Before Windows 95, filenames were limited to eight characters plus a file extension of up to three characters. Because having only eleven characters made naming files difficult, some users created their own file extensions such as .LTR (letter), .MEM (memo), and so forth instead of using the default file extensions. Nonstandard file extensions confuse Windows, which looks at the extension to figure out which program to use to open a file. Fortunately, long filenames give you the freedom to create filenames that make sense without changing the file extension.

Now you can create a filename of up to 256 characters, but don't go overboard! The total size of the filename includes the folder names (or path ) that lead to the file, such as \My Documents\General\Budget\ 1 st Quarter Draft.XLS . You might think the filename is 1 st Quarter Draft.XLS , but Windows also counts the characters in the entire path as part of the filename for the purposes of calculating the maximum size of the filename.

As you have already learned from Figure 15.1, if you use hard disk drive sizes of 1,024MB or above with the FAT16 file system, the 32KB allocation unit size could cause as much as 30% 40% of your disk to be wasted!

So, there are lots of reasons not to use FAT16 anymore:

  • Large allocation unit sizes cause a lot of wasted disk capacity.

  • Efficient allocation units (8KB or smaller) require multiple drive letters for drives more than 512MB in size.

  • Preparing a hard drive more than 2,047MB in size with FAT16 requires that the drive be divided into multiple drive letters, which can interfere with network drives and CD-ROM drive letter assignments.

Although long filenames are a terrific convenience, there might be situations in which you access a file created with Windows 95 or later versions of Windows when the long filename can't be seen, such as if you start the computer with an ESD (boot disk) or use a network connection from a computer running DOS or an older version of Windows. To enable older operating systems to access files created with long filenames, Windows creates a DOS alias name from the first six characters of the filename, adds a number to distinguish it from other files in the same folder that might also have the first six characters in common, and stores it with the file (see Figure 15.2). Systems that can't read long filenames see the DOS alias instead.

To overcome these limitations, FAT32 (large disk support) is the default for preparing drives with the Windows 98 and Windows Me Fdisk program, and it's an option with the Windows 95B and Windows 95C Fdisk program. Note that FAT16 is the only file system supported by the original version of Windows 95 and Windows 95a.

FAT32

FAT32 was introduced with late OEM versions of Windows 95 (Windows 95 OSR 2.0 and above; also referred to as Windows 95B or Windows 95C ). FAT32 is also known as large disk support . FAT32 has the following benefits when compared with FAT16:

  • The 32-bit file allocation table, which allows for 268,435,456 entries (2 32 ) per drive. Remember, an entry can be a folder or an allocation unit used by a file.

  • The root directory can be located anywhere on the drive and can have an unlimited number of entries. Hooray!

  • The allocation unit (cluster) size is much smaller on similarly sized drives than is possible with FAT16 (see Table 15.3). Smaller allocation unit sizes make FAT32 drives far more efficient, especially for the storage of small files. Note that FAT32 uses an 8KB allocation unit size for drives as large as 16GB; a FAT16 drive using the same 8KB allocation unit size is limited to 511MB as its maximum size.

  • The maximum logical drive size allowed is 2TB (more than 2 trillion bytes). Large drives no longer must be partitioned into multiple drive letters, although many users still prefer this option for safety.

Table 15.3. FAT16 and FAT32 Disk Usage Compared

Allocation Unit Size

FAT16 Drive Sizes

FAT32 Drive Sizes

4KB

128255MB

2608,192MB (8GB)

8KB

256511MB

816GB

16KB

5121,023MB

1632GB

32KB

1,0242,047MB

32GB2TB

Obviously, FAT32 is a much better choice than FAT16 with any hard disk these days. So, what do you need to prepare a hard disk with a bigger, smarter FAT?

You can prepare a drive as a FAT32 drive if the following requirements are met:

  • Enable FAT-32 support when you start Fdisk Fdisk calls this feature "large hard disk support," and when you Fdisk a drive with more than 512MB of capacity, you are offered the opportunity to use this feature.

  • Have adequate BIOS support Fdisk can work with only as much of your drive as it can see. As you learned in Chapter 14, "Storage," Logical Block Address ( LBA ) support is required for any drive more than 504MiB (528MB) used with Windows. To use a drive larger than 8GB, your system must also have an enhanced BIOS (eBIOS ) that supports extended Int13h functions; these functions are enabled automatically on compatible BIOSs when LBA mode is enabled. Any system built since 1999 should have both LBA and extended Int13h provisions built in.

Virtually all systems shipped with Windows 98 or Windows Me preinstalled will use FAT32 for their hard drives. (Windows 95B or Windows 95Cbased systems often used FAT16.) But, if you're curious , follow this procedure to determine what file system has been used on a hard drive in a system running Windows:

  1. Open Windows Explorer.

  2. Right-click the drive letter in the Explorer Window and select Properties.

  3. The Properties sheet for the drive will list FAT for a drive prepared with FAT16, and FAT32 for a drive prepared with FAT32 (see Figure 15.3).

    Figure 15.3. A hard disk formatted with FAT16 (top) compared to a hard disk formatted with FAT32 (center) and a hard disk formatted with NTFS version 5 (bottom).

Unless the system occasionally must be booted with MS-DOS or older versions of Windows, FAT32 is the recommended file system for use with Windows 98 or Me because of its efficient use of disk capacity. If you must boot a Windows 98 or Me system with older versions of Windows, or with MS-DOS, you will need to use the FAT16 file system for any drives you want to access with older versions of Windows or with MS-DOS. However, if a Windows 98 system is accessed over a network, any operating system used on the network can access the files on a FAT32 drive because Windows reads the files before sending them to the other stations on the network.

NTFS

The New Technology File System (NTFS) is the native file system of Windows NT and its descendants (Windows 2000 and Windows XP). NTFS has many differences from FAT16 and FAT32, including

  • Access control Different levels of access by group or user can be used with both folders and individual files.

  • Built-in compression for individual files, folders, or an entire drive .

  • A practical limit for drive sizes of 2TB The same as with FAT32, although drives theoretically can reach a maximum size of 2 exabytes (2 billion billion bytes).

  • A recycle bin for each user .

NTFS 5.0, the version of NTFS used by Windows 2000 and Windows XP (and by Windows NT 4.0 when Service Pack 4 is installed), supports these additional goodies :

  • Support for the Encrypted File System (EFS ) EFS enables data to be stored in an encrypted form. No password, no access to files!

  • Support for mounting a drive Drive mounting enables you to address a removable-media drive's contents, for example, as if its contents are stored on your hard disk. The hard disk's drive letter is used to access data on both the hard disk and the removable media drive.

  • Disk quota support The administrator of a system can enforce rules about how much disk space each user is allowed to use for storage.

  • Hot-swapping of removable-media drives that have been formatted with NTFS (such as Jaz, Orb and others ).

  • Indexing service support, helping users locate information more quickly when Search is used .

So, what happens when a system running Windows NT 4.0 gets updated to Windows 2000 or Windows XP? When a Windows NT 4.0 system using NTFS 4.0 is upgraded to Windows 2000 or Windows XP, the NTFS 4.0 file system is upgraded to NTFS 5.0.

Windows 2000 and Windows XP can't create a FAT32 partition larger than 32GB. However, if the partition already exists, they can use it.

If you plan to dual-boot Windows NT 4.0 and Windows 2000, you'd better make sure Windows NT 4.0 has been upgraded to Service Pack 4 or above; older versions of Windows NT 4.0 cannot access an NTFS 5.0 partition. Windows 2000 and Windows XP drives can be prepared with FAT16 or FAT32 partitions, but this is recommended only if the drive will be used in a dual-boot configuration with Windows 98 or Windows Me or a similar operating system that does not support NTFS.

Follow these steps to determine what file system was used to prepare a Windows NT, 2000, or XP hard drive:

  1. Open Windows Explorer.

  2. Right-click the drive letter in the Explorer Window and select Properties.

  3. The Properties sheet for the drive will list FAT for a drive prepared with FAT16, FAT32 for a drive prepared with FAT32, and NTFS for a drive prepared with NTFS (see Figure 15.3).

HPFS

The OS/2 High Performance File System (HPFS ) was supported by Windows NT 4.0 but is not supported by Windows 2000 or Windows XP. HPFS partitions should be converted to NTFS with the Convert.exe program before you upgrade a system running HPFS drives to Windows 2000 or Windows XP.

Primary and Extended Partitions

There are two steps involved in preparing a hard disk:

  • Creating partitions and logical drives

  • Formatting partitions and logical drives (which assigns drive letters)

What is a disk partition? A disk partition is a logical structure on a hard disk drive that specifies the following:

  • Whether the drive can be bootable

  • How many drive letters (one, two, or more) the hard disk will contain

  • Whether any of the hard disk's capacity will be reserved for a future operating system or other use

Although the name "disk partition" suggests the drive will be divided into logical sections, every ATA/IDE and SCSI hard disk must go through a partitioning process, even if you want to use the entire hard disk as a single drive letter. All versions of Windows support two major types of disk partitions:

  • Primary A primary partition can contain only a single drive letter and can be made active (bootable). Although a single physical drive can hold up to four primary partitions, you need only one primary partition on a drive that contains a single operating system. If you install a new operating system in a dual-boot configuration with your current operating system (Windows 98 and Windows XP, for example), a new version of Windows can be installed in a different folder in the same drive, or can be installed in an additional primary partition. If you want to use a non-Windows operating system along with your current operating system, it might require its own primary partition.

  • Extended An extended partition differs from a primary partition in two important ways:

    • An extended partition doesn't become a drive letter itself but can contain one or more logical drives (sometimes called logical DOS drives ).

    • Neither an extended partition nor any drive it contains can be bootable.

Only one extended partition can be stored on each physical drive.

If the drive will be used by a single operating system, one of these three ways of partitioning the drive will be used:

  • Primary partition occupies 100% of the physical drive's capacity This is typically the way the hard disk on a system sold at retail is used, and is also the default for disk preparation with Windows. This is suitable for the only drive in a system or an additional drive that can be used to boot a system, but should not be used for additional drives in a system that will be used for data storage.

  • Primary partition occupies a portion of the physical drive's capacity, and the remainder of the drive is occupied by an extended partition This enables the operating system, applications, and data to be stored on separate logical drives (drive letters created inside the extended partition), but requires the partitioning process be performed with different settings than the defaults. This configuration is suitable for the only drive or first drive in a multiple-drive system. Systems running early versions of Windows 95 used this method to cope with drives over 2.1GB because of the limitations of the FAT16 file system.

  • Extended partition occupies 100% of the physical drive's capacity The drive letters on the extended partition can be used to store applications or data, but not for the operating system. An extended partition cannot be made active (bootable). This configuration is suitable for any drive in a system except for the first drive; an extended partition can contain only one logical drive or multiple logical drives.

You can also leave some unpartitioned space on the hard disk for use later, either for another operating system or another drive letter.

Partitioning creates drive letters; formatting creates file systems on the drive letters created during partitioning. Figure 15.4 helps you visualize how these different partitioning schemes can be used on a typical hard disk.

Figure 15.4. Typical disk partitioning schemes used for the first hard disk (first four examples) or an additional drive (last two examples).

Drive Letters and Partition Types with Windows 9x/Me

If you're adding an additional hard disk to a system running Windows 9x/Me, it's critical that you partition it with an extended partition. If you prepare it the same way the original drive is prepared (with a primary partition and possibly logical drives) and if the original system has hard disk drive letters C: and D: or C:, D:, and additional drive letters, the new drive will take over drive letters starting with D:.

Table 15.4 indicates how Fdisk (the disk partitioning program used by Windows 9x/Me) assigns drive letters; study this for a moment and you'll understand why.

Table 15.4. Fdisk Drive Letter Assignments by Priority

Physical Drive

Partition Type

Order

1st

Primary

1st

2nd

Primary

2nd

1st

Extended

3rd

2nd

Extended

4th

What kind of a mess can happen?

Assume that you have a single hard drive divided into C: and D: logical drives. C: is the primary partition; D: is a logical drive inside an extended partition. When you add a second hard drive to expand capacity, you want to use the next available drive letters, starting with E:.

Figure 15.5 compares the results of placing a primary partition and an extended partition (containing one logical drive) on the second hard disk versus preparing the second hard disk as an extended partition with logical drives with Fdisk (the disk partitioning tool used by Windows 9x/Me).

Figure 15.5. Comparing an unpartitioned second hard disk (top) with the same drive partitioned with a primary and extended partition (middle) and as an extended partition (bottom). Note how the drive letters are scrambled when the second drive has a primary partition, but the drive letters are in proper sequence when an extended partition is used.

Note that setting up a primary partition on the second drive creates an almost unmanageable problem, because you will need to copy all the contents of the "old D:" (now E:) drive to the "new D:" drive, and so on. The chances of data loss are fairly high in such a case. And, the primary partition on the second drive is virtually useless because you would need to use advanced BIOS options or a boot manager to use any drive other than C: as a bootable drive.

If you are adding a second (or third or fourth) hard drive to a system running Windows 9x/Me and you want its drive letters to follow the existing drive letters, prepare the new drive with an extended partition occupying 100% of the space on the drive. There's no need to use a primary partition for any drive other than the first hard drive in a system unless you are installing an additional operating system. If an additional drive is added as an extended partition, its logical drives will follow the existing drive letters (refer to Figure 15.5).

tip

If you have an optical or removable-media drive set up as D: and you install a second hard drive, hard disks rule! Your removable-media or optical drive will be kicked up to the next available drive letter. You can use the Device Manager to set these drives to use a different drive letter (all the way to Z:) that isn't likely to be bothered by additional hard disks.

In Windows NT/2000/XP, you can use Disk Management to change the letter of almost any drive, including hard disks, except for the system's default boot drive.

 < Day Day Up > 

Категории