Skip to content

Filesystem

Zack Didcott edited this page Apr 7, 2025 · 2 revisions

Summary

The IGEL filesystem is used within IGEL OS, in order to manage various operating system components in a self-contained, independent manner; each partition is responsible for a specific OS component, such as the root filesystem, bootsplash, or a specific userspace application.

Each component can be updated individually, by replacing the partition. Whether an update is available is determined by the update_hash attribute of the partition header.

Most partitions are read-only SquashFS images, which are mounted to a particular mountpoint at boot, with a few exceptions for licensing or encrypted user data.

Disk

Once installed, there are usually three partitions on UEFI systems, in the following format:

  • Partition #1
    • IGEL FS
  • Partition #2
    • FAT32, ESP #1
  • Partition #3
    • FAT32, ESP #2

For OS 12, it appears the IGEL FS partition is #4, and partition #1 is small (~9 MiB) and filled with null bytes.

igelfs can operate directly on these device files, or on an image of these physical partitions.

Filesystem

The filesystem is structured into fixed-length sections (262144 bytes). The first section (section #0) is reserved for the boot registry, which contains persistent configuration data used during boot, and the directory, which is used to efficiently look-up the location of partitions within the filesystem.

Please see the following snippet from igelfs.__init__ for a description of the filesystem structure:

  • Section #0
    • Boot Registry
      • Boot Registry Entries
    • Directory
      • Partition Descriptors
      • Fragment Descriptors
  • Section #1, Partition Minor #1
    • Section Header
    • Partition Block
      • Partition Header
      • Partition Extents * PartitionHeader.n_extents
    • Hash Block, optional
      • Hash Header
      • Hash Excludes * HashHeader.count_excludes
      • Hash Values => HashHeader.hash_block_size
    • Partition Data
      • Extents
      • Payload
  • Section #2, Partition Minor #1
    • Section Header
    • Partition Data
  • Section #3, Partition Minor #2...

In short, all partitions are stored in sections as a linked list. Each section has a section header, which contains the partition minor (ID) and the next section for the partition until 0xffffffff. The first section of a partition also contains a partition header and optionally a hash header.

Further Reading

For more information about these data structures, see Models.

Clone this wiki locally