Upgrading and Repairing PCs Free Open Book

Upgrading and Repairing PCs

Previous Section Next Section

FAT32

When the FAT file system was being developed, 2GB hard disk drives were a fantasy and no one expected the partition size limitation imposed by the combination of 16-bit FAT entries and 32KiB cluster sizes to be a problem. Today, however, even low-end PCs come equipped with hard drives holding at least 20GB, and 80GB and larger drives are common. When you use the standard FAT16 file system with these larger drives, you must create several partitions, each no larger than approximately 2GiB. To many users, having multiple drive letters representing a single disk is confusing, making organizing and locating files difficult.

To address this problem, Microsoft released an enhanced version of the FAT file system, called FAT32. FAT32 works just like the standard FAT; the only difference is that it uses numbers with more digits, so it can manage more clusters on a disk. Unlike VFAT, which is a Windows 9x innovation that uses existing file system structures, FAT32 is an enhancement of the FAT file system itself. In other words, whereas VFAT is implemented as part of the Windows 9x Virtual Machine Manager (Vmm.vxd), FAT32 is implemented by the FDISK program before the Windows GUI is even loaded. FAT32 was first included in the Windows 95 OEM Service Release 2 (OSR2, also known as Windows 95B) and is also part of Windows 98/Me, Windows 2000, and Windows XP operating systems.

Note

Because the FDISK utility can implement the FAT32 file system when you partition the drive, you can't use FAT32 on a floppy disk or any removable cartridge that does not use a partition table. However, any medium you can partition with FDISK can use FAT32.

The most obvious improvement in FAT32 is that by using 32-bit values for FAT entries instead of 16-bit ones, the maximum number of clusters allowed in a single partition jumps from 65,536 (216) to 268,435,456. This value is equivalent to 228, not 232, because 4 bits out of the 32 are reserved for other uses. FAT32 also uses 32-bit values for the low-level operating system calls used to retrieve a specific disk sector.

These expanded values blow the top off the 2GiB limit on partition sizes. Because each FAT32 cluster is up to 64 sectors (32KiB) in size, FAT32 disks or partitions can theoretically be up to 17,184,062,816 sectors (32 sectors for the boot record + 2,097,152 sectors per FAT x 2 FATs + 268,435,445 clusters x 64 sectors per cluster), which equals a capacity of 8.8TB or 8TiB. Note that this capacity is theoretical because the 32-bit sector numbering scheme used in the partition tables located in the MBR limits a disk to no more than 4,294,967,295 (232–1) sectors, which is 2.2TB or 2TiB. Therefore, even though FAT32 can in theory handle a volume of up to 8.8TB, the reality is that it's currently limited by the partition table format of the MBR to only 2.2TB. At the current rate of hard disk capacity growth, single drives of that size will come into existence between the years 2009 and 2011. Of course, by that time the MBR limitation should be addressed.

Individual files can be up to 1 byte less than 4GiB in size and are limited by the size field in the directory entry, which is 4 bytes long. Because the clusters are numbered using 32-bit values instead of 16-bit ones, the format of the directory entries on a FAT32 partition must be changed slightly. The 2-byte Link to Start Cluster field is increased to 4 bytes, using 2 of the 10 bytes (bytes 12–21) in the directory entry that were reserved for future use.

Windows 2000 and Windows XP are intentionally limited to format FAT32 volumes of up to only 32GiB in size but can read larger FAT32 partitions. The limit is there not for any technical reason, but because Microsoft wants to encourage people to use NTFS instead of FAT32.

Another important difference in FAT32 partitions is the nature of the root directory. In a FAT32 partition, the root directory does not occupy a fixed position on the disk as in a FAT16 partition. Instead, it can be located anywhere in the partition and expand to any size. This eliminates the preset limit on root directory entries and provides the infrastructure necessary to make FAT32 partitions dynamically resizable. Unfortunately, Microsoft never implemented that feature in Windows, but third-party products such as PowerQuest's PartitionMagic can take advantage of this capability.

The main drawback of FAT32 is that it is not compatible with previous versions of DOS and Windows 95. You can't boot to a previous version of DOS or (pre-OSR2) Windows 95 from a FAT32 drive, nor can a system started with an old DOS or Windows 95 boot disk see FAT32 partitions. Most recent distributions of Linux now support FAT32, and even the Mac OS 8.1 and later can read and write FAT32 volumes. For all but the oldest of equipment, FAT32 is the most universally understandable format that supports larger volumes.

FAT32 Cluster Sizes

Because FAT32 partitions can have so many more clusters than FAT16 partitions, the clusters themselves can be smaller. Using smaller clusters reduces the wasted disk space caused by slack. For example, the same 2GiB partition with 5,000 files on it mentioned earlier would use 4KiB clusters with FAT32 instead of 32KiB clusters with FAT16. Assuming the same amount of slack for each file, the smaller cluster size reduces the average amount of wasted space on that partition from more than 78MB to less than 10MB.

To compare FAT16 and FAT32, you can look at how a file would be stored on each. For FAT16, I'll use the same example as before. With FAT16 the cluster numbers are stored as 16-bit entries, from 0000h to FFFFh. The largest value possible is FFFFh, which corresponds to 65,535 in decimal, but several numbers at the beginning and end are reserved for special use. The actual cluster numbers allowed in a FAT16 system range from 0002h to FFF6h, which is 2–65,526 in decimal. All files must be stored in cluster numbers within that range. That leaves only 65,524 valid clusters to use for storing files (cluster numbers below 2 and above 65,526 are reserved), meaning a partition must be broken up into that many clusters or less. A typical file entry under FAT16 might look like Table 24.25.

Table 24.25. FAT16 File Entries

Directory

Name

Starting Cluster

Size

USCONST.TXT

1000

4

FAT16 File Allocation Table

FAT Cluster #

Value

Meaning

00002

0

First cluster available

00999

0

Cluster available

01000

1001

In use, points to next cluster

01001

1002

In use, points to next cluster

01002

1003

In use, points to next cluster

01003

FFFFh

End of file

01004

0

Cluster available

65526

0

Last cluster available

With FAT32, the cluster numbers range from 00000000h to FFFFFFFFh, which is 0–4,294,967,295 in decimal. Again, some values at the low and high ends are reserved, and only values between 00000002h and FFFFFFF6h are valid, which means values 2–4,294,967,286 are valid. This leaves 4,294,967,284 valid entries, so the drive must be split into that many clusters or less. Because a drive can be split into so many more clusters, the clusters can be smaller, which conserves disk space. The same file as shown earlier could be stored on a FAT32 system as illustrated in Table 24.26.

Table 24.26. FAT32 File Entries

Directory

Name

Starting Cluster

Size

USCONST.TXT

1000

8

FAT32 File Allocation Table

FAT Cluster #

Value

Meaning

0000000002

0

First cluster available

0000000999

0

Cluster available

0000001000

1001

In use, points to next cluster

0000001001

1002

In use, points to next cluster

0000001002

1003

In use, points to next cluster

0000001003

1004

In use, points to next cluster

0000001004

1005

In use, points to next cluster

0000001005

1006

In use, points to next cluster

0000001006

1007

In use, points to next cluster

0000001007

FFFFFFFFh

End of file

0000001008

0

Cluster available

4,294,967,286

0

Last cluster available

Because the FAT32 system enables many more clusters to be allocated, the cluster size is usually smaller. So, although files overall use more individual clusters, less wasted space results because the last cluster is, on average, only half filled.

Note

How much space does your current cluster size waste? To find out, you can download a free Windows utility called Karen's Disk Slack Checker from former Windows Magazine editor Karen Kenworthy's Web site. Go to http://www.karenware.com/powertools/ptslack.asp.

Table 24.27 lists the cluster sizes for various FAT32 partition sizes.

Table 24.27. FAT32 Cluster Sizes

Volume Size

Maximum Volume Sectors

Sectors per Cluster

Cluster Size

0–32.52MiB[1]

66,600

FAT12/16

FAT12/16

>32.52MiB–260MiB[2]

532,480

1

0.5KiB

>260MiB–8GiB

16,777,216

8

4KiB

>8GiB–16GiB

33,554,432

16

8KiB

>16GiB–32GiB

67,108,864

32

16KiB

>32GiB–2TiB[3]

4,294,967,295

64

32KiB

MB = Megabyte = 1,000,000 bytes

GB = Gigabyte = 1,000MB = 1,000,000,000 bytes

TB = Terabyte = 1,000GB = 1,000,000,000,000 bytes

KiB = Kibibytes = 1,024 bytes

MiB = Mebibyte = 1,024KiB = 1,048,576 bytes

GiB = Gibibyte = 1,024MiB = 1,073,741,824 bytes

TiB = Tebibytes = 1,024GiB = 1,099,511,627,776 bytes

[1] FAT32 cannot be used on volumes 66,600 sectors (32.52MiB) or less.

[2] Volumes smaller than 512MiB will default to FAT16, although FAT32 can be forced by altering the format parameters.

[3] Windows 2000 and XP format FAT32 volumes only up to 32GiB; however, they do support existing FAT32 volumes up to 2TiB.

Some additional limitations exist on FAT32 volumes. Volumes less than 512MiB default to FAT16, but FAT32 partitions as small as 32.52MiB can be forced using the proper utilities or commands. Anything smaller than that, however, must be either FAT16 or FAT12.

Windows 2000/XP or later will not format a volume larger than 32GiB using FAT32. If you attempt to format a FAT32 partition larger than 32GiB under Windows 2000/XP or later, the format operation will fail near the end of the process and you might receive the following error message: Logical Disk Manager: Volume size too big. If you want to use a larger FAT32 partition under Windows 2000/XP or later, you can format the partition using Windows 9x/Me because Windows 2000/XP or later will mount and support larger FAT32 partitions without any problems. The only limitation with FAT32 partitions under Windows 2000/XP or later is in the formatting process. Finally, remember that DOS 6.22 and earlier, Windows 95a, and Windows NT (through 4.0) do not recognize FAT32 partitions and are incapable of booting from a FAT32 volume.

Using smaller clusters results in many more clusters and more entries in the FAT. A 2GiB partition using FAT32 requires up to 524,288 FAT entries, whereas the same drive needs only 65,536 entries using FAT16. Thus, the size of one copy of the FAT16 table is 128KiB (65,536 entries x 16 bits = 1,048,576 bits/8 = 131,072 bytes/1,024 = 128KiB), whereas the FAT32 table is 2MiB in size.

The size of the FAT has a definite impact on the performance of the file system. Windows 9x/Me uses VCACHE to keep the FAT in memory at all times to improve file system performance. The use of 4KiB clusters for drives up to 8GiB in size is, therefore, a reasonable compromise for the average PC's memory capacity. If the file system were to use clusters equal to one disk sector (1 sector = 512KiB) in an attempt to minimize slack as much as possible, the FAT table for a 2GiB drive would contain 4,194,304 entries and be 16MB in size.

This would monopolize a substantial portion of the memory in the average system, probably resulting in noticeably degraded performance. Although at first it might seem as though even a 2MB FAT is quite large when compared to 128KiB, keep in mind that hard disk drives are a great deal faster now than they were when the FAT file system was originally designed. In practice, FAT32 typically results in a minor (less than 5%) improvement in file system performance. However, systems that perform a great many sequential disk writes might see an equally minor degradation in performance.

FAT Mirroring

FAT32 also takes greater advantage of the two copies of the FAT stored on a disk partition. On a FAT16 partition, the first copy of the FAT is always the primary copy and replicates its data to the secondary FAT, sometimes corrupting it in the process. On a FAT32 partition, when the system detects a problem with the primary copy of the FAT, it can switch to the other copy, which then becomes the primary. The system can also disable the FAT mirroring process to prevent the viable FAT from being corrupted by the other copy. This provides a greater degree of fault tolerance to FAT32 partitions, often enabling you to repair a damaged FAT without an immediate system interruption or a loss of table data.

Creating FAT32 Partitions

Despite the substantial changes FAT32 provides, the new file system does have a large effect on the procedures you use to create and manage partitions. You create new FAT32 partitions in Windows 9x/Me using the FDISK utility from the command prompt, just as you would create FAT16 partitions. When you launch FDISK, the program examines your hard disk drives and, if they have a capacity greater than 512MiB, presents the following message:

Your computer has a disk larger than 512MB. This version of Windows
includes improved support for large disks, resulting in more efficient
use of disk space on large drives, and allowing disks over 2GB to be
formatted as a single drive.

IMPORTANT: If you enable large disk support and create any new drives on this
disk, you will not be able to access the new drive(s) using other operating
systems, including some versions of Windows 95 and Windows NT, as well as
earlier versions of Windows and MS-DOS. In addition, disk utilities that
were not designed explicitly for the FAT32 file system will not be able
to work with this disk. If you need to access this disk with other operating
systems or older disk utilities, do not enable large drive support.

Do you wish to enable large disk support (Y/N)...........? [N]

If you answer Yes to this question, any partitions you create that are larger than 512MiB will be FAT32 partitions. If you want to create partitions larger than 2GiB, you must use FAT32. Otherwise, you can choose which file system you prefer. All the screens following this one are the same as those in previous versions of FDISK.

Normally, the FDISK utility determines the cluster size used when you format the partition, based on the partition's size and the file system used. However, you can override FDISK using an undocumented switch for the FORMAT utility. If you use the command

FORMAT /Z:n

where n multiplied by 512 equals the desired cluster size in bytes, you can create a partition that uses cluster sizes that are larger or smaller than the defaults for the file system.

Caution

The /Z switch does not override the 65,534-cluster limit on FAT16 partitions, so it is recommended that you use it only with FAT32. In addition, you should not use this switch on a production system without extensive testing first. Modifying the cluster size can increase or decrease the amount of slack on the partition, but it also can have a pronounced effect on the performance of the drive. Some disk utilities might not work with nonstandard cluster sizes.

Converting FAT16 to FAT32

If you want to convert an existing FAT16 partition to FAT32, Windows 98 and Me later include a FAT32 Conversion Wizard that enables you to migrate existing partitions in place.

The wizard gathers the information needed to perform the conversion, informs you of the consequences of implementing FAT32, and attempts to prevent data loss and other problems. After you have selected the drive you want to convert, the wizard performs a scan for applications (such as disk utilities) that might not function properly on the converted partition. The wizard gives you the opportunity to remove these and warns you to back up the data on the partition before proceeding with the conversion. Even if you don't use the Microsoft Backup utility the wizard offers, backing up your data is a strongly recommended precaution.

Because the conversion must deal with the existing partition data in addition to creating new volume boot record information, FATs, and clusters, the process can take far longer than partitioning and formatting an empty drive. Depending on the amount of data involved and the new cluster size, the conversion can take several hours to complete.

After you convert a FAT16 partition to FAT32, you can't convert it back with Windows tools, except by destroying the partition and using FDISK to create a new one. Aftermarket partitioning utilities are available that can convert FAT32 back to FAT16 if you want. You should take precautions before beginning the conversion process, such as connecting the system to a UPS. A power failure during the conversion could result in a loss of data.

Third-Party Partitioning Utilities

Windows includes only basic tools for creating FAT32 partitions, but programs such as Partition Commander from VCOM (www.v-com.com) and PartitionMagic from PowerQuest (www.powerquest.com) provide many other partition manipulation features. These programs can easily convert partitions back and forth between FAT16, FAT32, NTFS and other file systems, as well as resize, move, and copy partitions without destroying the data they contain. They also allow changes in cluster sizes beyond what the standard Windows tools create.

    Previous Section Next Section


         Main Menu
    Main Page
    Table of content
    Copyright
    About the Author
    Acknowledgments
    Introduction
    Chapter 1. Development of the PC
    Chapter 2. PC Components, Features, and System Design
    Chapter 3. Microprocessor Types and Specifications
    Chapter 4. Motherboards and Buses
    Chapter 5. BIOS
    Chapter 6. Memory
    Chapter 7. The ATA/IDE Interface
    Chapter 8. The SCSI Interface
    Chapter 9. Magnetic Storage Principles
    Chapter 10. Hard Disk Storage
    Chapter 11. Floppy Disk Storage
    Chapter 12. High-Capacity Removable Storage
    Chapter 13. Optical Storage
    Chapter 14. Physical Drive Installation and Configuration
    Chapter 15. Video Hardware
    Chapter 16. Audio Hardware
    Chapter 17. I/O Interfaces from Serial and Parallel to IEEE-1394 and USB
    Chapter 18. Input Devices
    Chapter 19. Internet Connectivity
    Chapter 20. Local Area Networking
    Chapter 21. Power Supply and Chassis/Case
    Chapter 22. Building or Upgrading Systems
    Chapter 23. PC Diagnostics, Testing, and Maintenance
    Chapter 24. File Systems and Data Recovery
    File Systems
    File Allocation Table
    NTFS
    Disk and File System Structures
    VFAT and Long Filenames
    FAT32
    FAT File System Errors
    FAT File System Utilities
    New Technology File System
    High Performance File System
    Data Recovery
    Common Drive Error Messages and Solutions
    General File System Troubleshooting for MS-DOS, Windows 9x, and Windows Me
    General File System Troubleshooting for Windows 2000/XP
    Appendix A. Glossary
    Appendix B. Key Vendor Contact Information
    Appendix C. Troubleshooting Index
    List of Acronyms and Abbreviations
    Index


    More Books
    PHP Hacks
    Processing Xml With Java - A Guide To Sax, Dom, Jdom, Jaxp, And Trax
    The Koran (Holy Qur'an)
    Macromedia Flash 8 Bible
    Search Engine Optimization for Dummies
    YouTube Traffic
    PHP 5 for Dummies
    Harry Potter and The Chamber of Secrets
    Harry Potter and the Sorcerer's Stone
    The Pilgrim's Progress
    Wireless Hacks
    Flash Hacks. 100 Industrial-Strength Tips & Tools
    PayPal Hacks. 100 Industrial-Strength Tips and Tools
    Amazon Hacks
    Pdf Hacks
    The Da Vinci Code
    Google Hacks
    The Holy Bible
    Windows XP For Dummies
    Harry Potter and the Half-Blood Prince
    Seo Book
    Upgrading and Repairing Networks
    Macromedia Dreamweaver 8 UNLEASHED
    Windows XP Annoyances
    Windows XP Hacks
    Microsoft Windows XP Power Toolkit
    Teach Yourself MS Office In 24Hours
    iPod & iTunes Missing Manual
    PC Hacks 100 Industrial-Strength Tips and Tools
    PC Overclocking, Optimization, and Tuning - 2th Edition
    PC Hardware In A Nutshell 3rd Edition
    PC Hardware in a Nutshell, 2nd Edition
    Upgrading and Repairing PCs
    Google for Dummies
    MySQL Cookbook
    Teach Yourself Macromedia Flash 8 In 24 Hours
    PHP CookBook
    Sams Teach Yourself JavaScript in 24 Hours
    PHP5 Manual
    Free Games Paper Airplanes
    500 Juegos Gratis 500 Giochi Gratis 500 Jeux Gratuits 500 Jogos Gratis 500 Kostenlose Spiele