Q1 To Describe FAT, Boot Sector, Directory Area, Data Area
Q1 To Describe FAT, Boot Sector, Directory Area, Data Area
FAT
Initially designed in 1977 for use on floppy disks
Later used on PC operating systems such as MS-DOS and early versions of Microsoft
Windows.
disk is divided into clusters, the unit used by the file allocation, and
FAT describes which clusters are used by which files.
FAT provides the index of the files in the system and is statically allocated at the time
File Allocation of formatting the drive.
The FAT's entries contain either the number of the next cluster in the file, or a marker
indicating EOF (end of file), unused disk space, or other areas of the drive that are
specially reserved.
File allocation table is a table for describing the allocation status of the clusters
, which are boot sector, file allocation table area, root directory area and data area.
Boot sector: It is also called reserved sector, and located in the first part. It includes: the boot
loader code needed by the operating system to start computer, the partition table of the main
boot record (MBR) which describes how the drive is organized, and the BIOS parameter block
(BPB) which describes the physical outline of the data storage volume.
For FAT32 file systems, the reserved sectors include a File System Information Sector at logical
FAT area: This section usually contains two copies of the file allocation table for redundancy
Root directory area: This area is a directory table containing information about directories and
files. It only works with FAT12 and FAT16. It has a fixed maximum size and is configured at
creation time.
FAT32 usually stores the root directory in the data area, so it can be extended as needed.
Data area: This is where directory data and existing files are stored. It occupies most of the
The general types of file system (FAT12, FAT16 or FAT32) are determined by the width of the
First sector of a FAT system is the boot sector / reserved sector/ the zeroeth sector
Contains most of the information with which to determinethe file system type, and size
and location of data structures
Boot sector format is different for FAT12/16 and FAT32
It includes:
the boot loader code needed by the operating system to start computer, the partition
table of the main boot record (MBR) which describes how the drive is organized,
and the BIOS parameter block (BPB) which describes the physical outline of the data
storage volume
Because the MBR transfers CPU execution to the boot sector, the first few bytes of the FAT
boot sector must be valid executable instructions for an x86 CPU.
From offset 0 to offset 32 of the boot record, there are common parameters of FAT16 and
FAT32. Because parameters after offset 32 are different each other, two file systems are not
compatible.
Jump boot code: The instruction that makes jump to the jump code.
OEM name: Just string stands for OEM company. Any string can be here.
Bytes per sector: This value is how many bytes does one sector has. The following
values are only available - 512, 1024, 2048 and 4096. Usually, this field has 512 as its
value.
Sector per cluster: The number of sector each cluster has. This value must be greater
than zero and be a multiple of two.
Reserved sector count: This field has the number of the reserved sector. The size of the
reserved area occupies one sector at least because the boot record is located at the first
sector of the reserved area. So, this field have not to be zero. In FAT16, this field
usually has one as its value compared to the field of FAT32 has 32.
Number of FATs: This field has the number of FATs in a given volume. This value
must be greater then one and 2 is recommended.
Root directory entry count: (Only for FAT16) This field tells that how many entries
(files and directories are the "entries") can reside in the root directory. This value is
always an even number of the value of "Bytes per sector." For example, if the value of
the bytes per sector is 512, this field can have values like 512, 1024, 2048, and so on.
. But, in case of FAT32, this field must be zero.
Total sector 16: This value reflects total sectors of given volume. It is important that this
value is NOT total sectors of the storage device BUT total sectors of the volume. If this
field has a zero as its value, the "Total sector 32" field is not able to be zero.
Media: This field indicates that this volume resides in what kinds of media device. FAT
size 16: This field has the sector number of the FAT area. This value is not of the sum
total of FAT #1 and FAT #2 area, but of the one FAT area (FAT #1 or FAT #2, because
two area are same exactly). Only FAT12 and FAT16 uses this value and this value must
be a zero for FAT32 file system.
Sector per track: This item is for a kind of interrupt of x86 families - 0x13 interrupt.
But this field is not used by windows now.
Number of heads: This item is for a kind of interrupt of x86 families - 0x13 interrupt.
But this field is not used by windows now.
Hidden sector: This item is for a kind of interrupt of x86 families - 0x13 interrupt. This
field stores the number of sector before the given volume. In volume that is not
partitioned, this field must be a zero. But this field is not used by windows now.
Total sector 32: This value reflects total sectors of given volume
Q2. Explain various file systems - FAT16, FAT32, New Technology File
System(NTFS), High Performance File System(HPFS), Linux file system .
The second implementation of FAT was FAT16, which introduced the 16-bit file
Depending on the operating system and cluster size used, the FAT16 formatted drive
can have a maximum drive size of 2 GB to 16 GB, the latter one which is only available in
In order to overcome the volume size limit of FAT16, Microsoft designed a new version
of the file system FAT32 in 1996, which supported an increased number of possible
clusters , much larger volumes, better performance and more flexibility and robustness
The FAT32 boot sector uses a 32-bit field for the sector count, limiting the maximum
FAT32 volume size to 2 TB with a sector size of 512 bytes. The maximum FAT32 volume
size is 16 TB with a sector size of 4KB
FAT32 uses 32-bit for the FAT entries. In fact, only 28 bits are used, as 4 bits are
reserved for future use
IN FAT32 file system, the maximum number of clusters per partition went increased
Features
FAT32 uses space more efficiently. FAT32 uses smaller clusters (that is, 4-KB clusters for
drives up to 8 GB in size), resulting in 10 to 15 percent more efficient use of disk space
relative to large FAT or FAT16 drives.
FAT32 is more robust. FAT32 can relocate the root folder and use the backup copy of
the file allocation table instead of the default copy. In addition, the boot record on
FAT32 drives is expanded to include a backup copy of critical data structures. Therefore,
FAT32 drives are less susceptible to a single point of failure than existing FAT16 drives.
FAT32 is more flexible. The root folder on a FAT32 drive is an ordinary cluster chain, so
it can be located anywhere on the drive.
The root directory in FAT16 system is fixed size; that is when the medium is
formatted, the maximum number of files that could be created in the root directory is
set , typically 512 B
In FAT32, the root directory is dynamically resizable, like all other directories.
Also in FAT 32 Two special sectors added to the volume: the FS info sector and the
backup boot sector.
FAT16 and FAT32 have drawbacks: they have weak error recovery and no
built-in file security.
NTFS more secure and robust than FAT16 or FAT32, and offers better
recovery from errors
NTFS: Support for transferring big files with no limit. The most ideal file
system for hard drive and external hard drives.
FAT32: Support for transferring a single file within 4GB. Used as the file
system for SD card, U SB flash drive.
also provides access control list (ACL) and file system journaling.
NTFS supports big file storage on high capacity storage devices like an
internal or external hard drive.
While for SD card, USB flash drive, FAT32 will be the best
NTFS Structure
NTFS Boot Sector – This portion contains the BIOS
the recovery related key records .In the event when there
portion is required.
NTFS advantages:
Filenames are saved in NTFS using UNICODE.
On the NTFS configured volume, the files could be accessed easily
owners.
easily.
NTFS can also complete the failed operation by restoring its state.
Features
Naming : File name can be as long as 255 characters ,
File names can have any character other than /\ “ \:*
It provides folder and file security. This is done by passing on NTFS permission to files
and folders. Security works at local as well as network level. Every file and folder in the list has
an Access Control List that includes the users, security identifier, and the access privileges that
are granted to the users.
Files and partition sizes are larger in NTFS than those of FAT. An NTFS partition can be of
a size as large as 16 Exabytes, but practically it is limited to 2TB. File size can range from 4GB to
64 GB.
It provides up to 50% file compression
It is a reliable and recoverable file system which makes use of transaction logs for
updating files and folders automatically.
Uses a change journal to help restore information quickly if power failure or other
system problems occur
It provides bad-cluster mapping. This means that it can detect bad clusters or erroneous
space in the disk, retrieve the data in those clusters, and then store it in another space. To
avoid further data storage in those areas, bad clusters are marked for errors.
FEATURES
Drawbacks:
Sectors 0-15 of a volume (8Kb) are the boot block and contain a
volume name, 32-bit volume ID, and a disk bootstrap program
Sectors 16 and 17 are known as the Super Block and the Spare
Block respectively.
Super Block contains
1. pointers to the free space bitmaps bad block list ,
2. pointers to the directory block band and
3. pointers to root directory.
4. also contains the date that the volume was last checked out
and repaired with CHKDSK /F.
The Spare Block contains various flags and pointers that will be
discussed later it is modified although infrequently as the system
executes.
The remainder of the disk is divided into 8Mb bands. Each band has
its own free space bitmap in which a bit represents each sector. A bit
is 0 if the sector is in use and 1 if the sector is available. The bitmaps
are located at the head or tail of a band so that two bitmaps are
adjacent between alternate bands.
Features.
All data in is organized into files.
All files are organized into directories. These directories are organized into a
tree-like structure called the file system.
All files on a Linux system are stored on file systems which are
Here, the directories ‘/’ is the root directory which lies at the top of file system
hierarchy. The ‘/’ character is also used as a directory separator in the file name,
for example ‘/etc’ is a sub-directory of ‘/’ directory.
Important directories
Location Purpose
/usr Installed software, shared libraries, include files, and static read-
only program data. Important subdirectories include:-