AOSP Foundations
3 min read

The boot & init_boot Partitions

Understand the contents of the boot partition and how modern Android 13+ handles the generic ramdisk via init_boot.

When a computer turns on, the bootloader needs an initial payload to load into memory to kickstart the operating system. In Android, this critical payload resides within the boot partition.

Understanding the contents and evolution of the boot partition is critical for debugging early-stage boot failures or flashing custom kernels.

Legacy Boot Partition (Pre-Android 13)

For many years, the boot partition was a single, compressed binary image file (boot.img) containing two distinct pieces of software fused together:

  1. The Linux Kernel: The core operating system binary, heavily modified by the SoC vendor (e.g., Qualcomm) to support specific hardware.
  2. The Generic Ramdisk: A tiny, temporary root file system containing the init binary and basic configuration scripts (init.rc).

When the device booted, the bootloader would extract the boot.img, load the kernel into RAM, and then mount the generic ramdisk as the temporary / root directory so the init process could start executing user-space code.

# You can use the unpack_bootimg tool to dissect a legacy boot.img
unpack_bootimg --boot_img boot.img --out unpacked/

The Problem with the Legacy Boot Partition

Google recognized a major architectural flaw in packaging both the kernel and the generic ramdisk together.

  • The kernel is highly specific to the hardware (maintained by the silicon vendor).
  • The generic ramdisk is highly specific to the Android framework (maintained by Google).

Because they were fused together into a single boot.img, updating the Android framework meant you also had to touch the kernel package. This directly violated the strict separation principles introduced in Project Treble.

Modern Architecture: The init_boot Partition (Android 13+)

Starting with Android 13, Google permanently split these components to achieve true modularity, specifically to support the Generic Kernel Image (GKI).

  • The boot Partition: Now contains only the Linux Kernel (the GKI). It is completely agnostic to the Android version running above it.
  • The init_boot Partition: A brand new partition that contains the Generic Ramdisk (the init binary and framework scripts).

The Modern Boot Flow

  1. The bootloader loads the kernel from the boot partition.
  2. The bootloader loads the framework ramdisk from the init_boot partition.
  3. The kernel mounts the init_boot ramdisk as the root file system and executes /init.
# Example Fastboot commands reflecting the modern architecture
fastboot flash boot boot.img
fastboot flash init_boot init_boot.img

By strictly isolating the ramdisk, Google can now push updates to the core init process without ever requiring the hardware manufacturer to recompile or repackage their Linux kernel.