1. File Systems and Disk Access

What is a File System?

A file system is the format applied to a partition that controls how data is stored and retrieved on it. Without a file system, a partition cannot be mounted or used.

Common File System Types

File System Platform Notes
NTFS Windows Modern Windows default
FAT32 Windows Older, still used for USB drives
ext2 Linux Old Linux standard
ext3 Linux Added journaling to ext2
ext4 Linux Current common Linux standard
XFS Linux High performance, default on RHEL/Rocky
Btrfs Linux Advanced features, copy-on-write

Partition Table Types

Before partitioning, a disk must have a partition table (disk label). Two types exist:

Feature MBR (DOS) GPT
Max primary partitions 4 128
Max disk size 2 TB 9.4 ZB
Redundancy One copy (start of disk) Two copies (start and end)
Boot firmware BIOS UEFI (and BIOS with workaround)
Identified as dos label gpt label

MBR Partition Limits and Workaround

MBR Partition Table (64 bytes total, 16 bytes per partition entry)
= maximum 4 partition entries

Solution: use one slot as "Extended" partition
Extended partition acts as a container for Logical partitions

Primary 1  (sda1)
Primary 2  (sda2)
Primary 3  (sda3)
Extended   (sda4)
  Logical  (sda5)   <-- logical always starts at 5
  Logical  (sda6)
  Logical  (sda7)

How Linux Mounts File Systems

In Windows, each partition gets its own drive letter (C:, D:, E:).

In Linux, everything is under a single root /. Partitions are mounted into directories:

/          (root -- lives on one partition)
/home      (can be a separate partition mounted here)
/var       (can be a separate partition mounted here)
/mnt/data  (any directory can be a mount point)

Mounting means: "point this directory at this partition."


Disk Device Naming in Linux