Last week, we reported about PineLoader that can multi-boot different Linux-based mobile OSes on PinePhone. Continuing the development, the project has now progressed further to successfully get PineLoader in action with a live demo.
The creator of PineLoader, who goes by pseudonym Danct12, shared a post on Twitter showcasing the testing of a multi-bootloader. Using PineLoader, he loaded four Linux-based mobile OSes — Ubuntu Touch, postmarketOS, Sailfish OS, and Huong Tram Linux (his own Arch-based distro); he showed successful booting into postmarketOS and Sailfish OS.
After seeing the smartphone booting postmarketOS and Sailfish OS, I know you must be wondering what about the other OSes that were displayed on the splash screen.
To find the answer, I spoke with Danct12 and he confirmed that Huong Tram Linux also boots perfectly. However, since he is using a 16 GB eMMC, and the SD card is reserved for Jumpdrive, space is running out for Ubuntu Touch. Nonetheless, PineLoader offers a flawless GRUB bootloader-like experience for ARM devices.
How Does PineLoader Multi-Boots Linux OSes?
Now you may be curious to know what makes PineLoader run different OSes and what goes inside it to make it work.
To understand the internal workings, Danct12 explains that as you switch on your device, it first checks for partition with the label ‘PINELOADER’ that stores all the configuration for the bootloader menu. Once BOOT ROM detects PineLoader, PineLoader loads all its config files and displays options in the boot menu.
As you can now see all available operating systems in the boot menu, you can use volume up and down to select an OS. When you choose one of them, PineLoader loads the config file of the respective distribution and uses kexec system call to load its kernel, ramdisk, and cmdline to memory.
Here, in case PineLoader fails to load a config file or OS, it has integrated Jumpdrive to backup or rescue the system. If you don’t know, Danct12 is also a maintainer of Jumpdrive project that is a utility to flash an image directly to eMMC, troubleshooting a broken system, and much more.
The Way Ahead
PineLoader marks an achievement in the Linux ecosystem that is still grooming in the mobile market to compete with dominant Android. PineLoader aims to bring an additional and much-needed choice of freedom to Linux phones that will help it stand out.
Also, credits goes to Pine64 that builds a device PinePhone with Linux-based mobile OS native support and full freedom to customize and experiment with it. Once PineLoader is ready for production, Pine64 might ship it universally to the future general (non-CE) PinePhone.
If you also want to try, tweak, or contribute to such a great initiative right now, check out the source code of PineLoader which is now open-source here.