Boot process: Difference between revisions
Line 18: | Line 18: | ||
==== isorec ==== | ==== isorec ==== | ||
Very few Android devices don't expect a <code>boot.img</code> 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 ([https://gitlab.com/postmarketOS/pmaports/-/blob/1d2b62a1094e77e50e1a52c48b07eecb1fbfd26a/device/testing/linux-samsung-i9100/APKBUILD#L31-50 example]). | Very few Android devices don't expect a <code>boot.img</code> 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 ([https://gitlab.com/postmarketOS/pmaports/-/blob/1d2b62a1094e77e50e1a52c48b07eecb1fbfd26a/device/testing/linux-samsung-i9100/APKBUILD#L31-50 example]). | ||
== See also == | == See also == |
Revision as of 11:39, 26 September 2024
Overview
Once you press the power button on your device with a postmarketOS installation, it goes through the following steps:
- Device specific bootloaders
- postmarketOS initramfs
- Init
- Display manager (if UI is not none, otherwise it stops at getty )
- User Interface of choice (Plasma Mobile, Phosh, ...)
Early boot process
In the Early boot process, Device specific bootloaders would boot up.After that it would boot the os in different variant of way. (See Below) See Category:Bootloaders for learn more about how different bootloader work.
UEFI
On device that support UEFI , pmOS would boot via systemd-boot
Andorid boot image
On most Andorid device , the bootloader on that device would boot the android image that is in the partition that labeled at boot
.that file contain initramfs and kerenl.pmOS would put its initramfs and kerenl into a Andorid boot image and flash it to the partition.However there are some android device that dont support andorid boot image.
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
- Inspecting_the_initramfs
- Partition Layout
- Category:Bootloaders
- Troubleshooting:boot
- Troubleshooting:boot:initfshooks
- pmaports#664: two postmarketOS installations: OpenRC may mount wrong partition as /boot
- postmarketOS low-level blog post (talks in part about liberating bootloaders)
- Deviceinfo: flash methods