Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Partition Layout

The Rock64’s 16 GB eMMC uses a fixed A/B partition layout with raw U-Boot at the beginning and a persistent data partition at the end. The flash image carries slot A only; initrd systemd-repart creates slot B and /data on first boot.

General host and application logging stays tmpfs-first during runtime and is forwarded through an rsyslog RAM queue before buffered appends land in /data/logs.

Layout

Offset     Size       Content          Filesystem     Notes
0          16 MB      U-Boot           raw            idbloader @ sector 64, u-boot.itb @ sector 16384
16 MB      128 MB     boot-a           vfat           kernel Image, initrd, DTB, boot.scr
144 MB     1024 MB    rootfs-a         squashfs       zstd compressed, 1 MB blocks; used as OverlayFS lower layer
1168 MB    128 MB     boot-b           vfat           created on first boot by initrd systemd-repart
1296 MB    1024 MB    rootfs-b         --             created on first boot by initrd systemd-repart
2320 MB    remaining  data             f2fs           created on first boot by initrd systemd-repart

Slot Pairing

RAUC manages two slot pairs. Each pair contains a boot partition and a rootfs partition that are always written together atomically:

SlotBoot PartitionRootfs Partition
Aboot-a (p1)rootfs-a (p2)
Bboot-b (p3)rootfs-b (p4)

An update writes the new kernel/DTB to the inactive boot partition and the new squashfs to the inactive rootfs partition. The active slot pair is never modified during an update.

U-Boot Region

U-Boot occupies the first 16 MB of the eMMC as raw data (no partition). The RK3328 boot ROM loads the initial bootloader from fixed sector offsets:

ComponentSector OffsetByte OffsetDescription
idbloader.img6432 KBFirst-stage loader (TPL + SPL)
u-boot.itb163848 MBU-Boot proper (FIT image)

U-Boot environment is stored in SPI flash exposed to Linux as /dev/mtd0 at offset 0x140000 with size 0x2000. AtomicNix uses this single SPI environment for RAUC boot variables instead of raw eMMC environment writes.

Data Partition

The flashable image leaves the space after rootfs-a unallocated. On first boot, initrd systemd-repart creates boot-b, rootfs-b, and /data there before the live system is mounted. This avoids repartitioning from the switched-root system while still preserving the inactive slot and /data across all updates and rollbacks.

Contents created during provisioning:

/data/
  .completed_first_boot              First-boot sentinel
  config/
    ssh-authorized-keys/admin        Operator's SSH public key
    nixstasis/                       Planned enrollment key and agent state
    openvpn/client.conf              OpenVPN recovery tunnel config (optional)
  containers/                        Reserved for future application workloads
  logs/                              Buffered general host and application logs appended from rsyslog

Logging Tiers

AtomicNix uses two runtime logging tiers with different durability goals:

Tier 1  journald runtime   General host and container logs, tmpfs-first (`Storage=volatile`, runtime capped)
Tier 2  /data/logs         Buffered rsyslog appends for bounded durable host and application diagnostics