PinePhone multi-boot image boot testing
So let's say that distros are really finicky about where they're booted from
if their initramfs image is used to boot them. Initramfs images mostly
get in the way and don't offer much for the multi-boot image, so the simple
solution is to not use them at all. All distros should be bootable fine
The process should be quite simple: Linux mounts root partition provided via
root= boot parameter at
/ and runs
/bin/init. The distro itself should not care about what the real
partition is, because it's already running from it. It should just not do
anything stupid to the current rootfs mount, and just run.
Actually most modern distros should run fine with an empty
/etc/fstab, in this situation.
Using my kernel
To have some unity/sanity, I decided to use my own kernel with all necessary
drivers built in. This way I don't need to copy my kernel's modules to rootfs
of each distro. I did also built firmware binaries into the kernel image, so
it's all self-contained.
This approach has some other benefits:
- all distros gain external monitor support
- all distros gain latest crust and modem power savings support + support for
modem on all pinephone variants
- display issues go away, because my kernel supports seemless transfer of
display state from bootloader to the kernel
- all distros gain pinephone 1.2 support
Problems encountered so far
- root passwords differ among distros, some don't even have them on the
- I manually replaced all passwords in
/etc/shadow with a single
1111 password to have some unity. Numeric password is necessary,
because some distros use numpad entry for the unlock screen.
/etc/fstab entries using some pre-defined partitioning scheme
- On systemd distros, having empty
/etc/fstab is the right
- On some distros I had to remove an entry for the boot partition
- Alsa controls don't match the expectations of some distros
- Accelerometer mounting matrix doesn't match expectations of some distros
(but not others)
Other than this, each distro seems to boot fine with my 5.9 kernel.
The last step is figuring out how to make modem initialize properly on each
distro. This will involve finding the script that powers up the modem and
replacing it with
echo 1 > /sys/class/modem-power/modem-power/device/powered.
for another preview. :)