In my setup, I have two rootfs partitions. The fstab in rootfs_a mounts /dev/mmcblk0p2 as /boot, in rootfs_b it is /dev/mmcblk0p3. How this can be done with only a single rootfs, I don't know. I can only think of a work-around using a systemd service that runs pretty early once after mounting the entries in fstab. It could run something like this to get the current boot partition number:
Code:
hexdump -s3 -e'"%x"' /proc/device-tree/chosen/bootloader/partition
Statistics: Posted by fdub_t2 — Wed Jan 24, 2024 9:08 am