What is a File System
A set of structures that is used to control how information is stored on a disk
Without a file system, no idea when one information ends and the next begins
Common File System types
Hard Disk, Optical Disk, Tape Drive / Magnetic Tapes, Network FS: file systems accessed over the network, files distributed throughout the network (mapped network drive), ensure user does not realize it is a form of network
User FS: file systems which exist temporarily in user space, dynamically on the fly and maintained in RAM
What are some HDD file system types
Describe a FAT file system
FAT - File Allocation Table
FAT12: 1980
FAT16: 1984
FAT32: 1995 - 2^28 of max space
What are the components of a FAT file system
Boot Sector - beginning of partition / contains information on disk geometry (# sectors/cluster)
Root Directory - for every file/folder the RD contains metadata for the file and pointer to beginning of files content
FAT1 &2 - copies of the FAT, which shows which shows the clusters a file occupies
What is the structure of a FAT file system
How can you examine the Boot sector to understand the FAT structure
Number of reserved sectors: 0x0E -> 0x0400 -> (LE) -> 0x04 = 4 sectors, FAT 1 starts at sector 4
Number of sectors in FAT structure: 0x16 (2 bytes) -> 0x2000 -> (LE) 0x20 = 32 sectors in FAT
Max number of entries in root directory = 0x11 (2 bytes) = 0x0002 -> 0x0200 -> 512 entries in root directory
Each entry is 32 bytes in length in root directory - true for all FAT boot sector
512 entries * 32 bytes / entry = 32 sectors
Data Area starts at sector 100 (68 (end of FAT2) + 32 (size of root directory))
How to create a file in FAT
Explain how to delete a file in FAT
Explain how to rebuild a File / Directory in FAT
What are the benefits of exFAT
Larger volumes, files, number of files
What is the file structure of exFAT
Main region Boot (volume boot record and boot code)
Backup Boot region (backup of VBR)
FAT Region (FAT 1 and FAT 2)
Data Region (Data area)
Where is the Boot Sector located in exFAT
Sector 0, Backup copy stored in sector 12
All data stored in LE unless otherwise stated
Parse the following exFAT Boot Sector
eb76 9045 5846 4154 2020 2000 0000 0000
Value in hex is 2 to the power of number in hex (i.e. 0x05 = 2^5)
How can you rebuild a directory structure in exFAT
Access the Root Directory
Extract all file / file name entries
Check file’s attributes
- if its a file, list the name
- if its a folder, extract contents and process each extracted directory / file name repeating above steps
Explain the HFS+ file system structure
Reserved Area ( 2 sector area letting operating system know its a GPT partition)
Volume Header (boot information)
Allocation Block/Data Area (Allocation File, Catalog File, Extents Overflow File, Attributes File)
Copy of Volume Header (for redundancy checks)
Reserved Area
What is the Allocation area in HFS
area between volume headers
What is the Allocation File in HFS
provides block allocation bitmap of files on file system (bitmap in NTFS)
What is the Extent Overflow File in HFS
if file has more than 8 extents of data, this will be used to store remaining contents of file
What is the Catalog File in HFS
Similar to MFT in NTFS, record for every file and folder on FS, each file/folder is identified by CNID, stores metadata, and first 8 extents of file
Explain the features of APFS storage
Containers - stores logical volumes
Space Sharing - allows volumes to reside in same container and share free space
Snapshot - Copy of file system at a specific point
Encryption options - none, volume disk encryption, or multiple key encryption
What are some features of HFS File / Folder Names
Can hold up to 255 characters
Names are case sensitive
Data is stored in extents (similar to run lists, can be fragmented)
Files/Folders identified by CNID (Catalog Node ID)