1. Inodes and the File System

How the Kernel Identifies Files

Just as the kernel identifies users by UID (not username), it identifies every file by a number called an inode number, not by its filename.


Hard Disk Structure — From Raw to Usable

Raw Disk Space
      |
      v
Partition Table (MBR or GPT)
      |
      v
Partitions (each has a start and end sector/block)
      |
      v
Format each partition with a File System (ext4, xfs, etc.)
      |
      v
Inode Table + Data Blocks (usable storage)

MBR Structure

The MBR (Master Boot Record) at the start of the disk contains three parts:

Part Purpose
Bootloader Loads the operating system
Partition Table Records where each partition starts and ends (in blocks/sectors)
Magic Number Identifies this as a valid MBR

Common File Systems

OS File Systems
Windows FAT32, NTFS
Linux ext2, ext3, ext4, XFS, Btrfs

Key differences:


What is an Inode?