Boot process

From postmarketOS Wiki

Overview

Once you press the power button on your postmarketOS device, it goes through the following steps:

  1. Device specific bootloader
  2. postmarketOS initramfs
  3. Init
  4. Display manager (If the UI is none, it stops at getty)
  5. User Interface of choice

Early boot process

In the early boot process, the device specific bootloader will intialize the device hardware. After that the way it boots the OS in device-specific ways. (See below) See Category:Bootloaders to learn more about how different bootloaders work.

UEFI

On devices that support UEFI, pmOS generally boots via systemd-boot

Android boot image

On most Android devices, the bootloader on that device would boot the Android boot image that is in the partition labeled as boot. That file contains the initramfs and kernel. Generally, pmOS would put its initramfs and kernel into a Android boot image and flash it to the boot partition. However, there are some Android devices that don't support Android boot images.

isorec

Very few Android devices don't expect a boot.img file written to the Android boot partition, but rather just the Linux kernel, with an embedded initramfs. But we want the initramfs packaging to be independent of the kernel (not require a kernel rebuild to change the initramfs!). Therefore we use the so-called "isorec" trick here: the initramfs script built into the kernel is just a very small stub, that loads the real initramfs from the postmarketOS boot partition (example).

See also