Skip to content

postmarketos-initramfs: fix device mapper path on android devices with subpartitions

Administrator requested to merge caleb/initramfs-subpartitions-resize into master

On android devices using subpartitions, during boot we set up the subpartitions so the rootfs is /dev/mapper/userdata2, however during resize_root_partition() we resolve the original block device (e.g. sda17 on the op6) and re-create the device mapper. This results in the cached rootfs path being wrong (since after resize it's created as /dev/mapper/sda17p2).

Cache the subpartition source device so we re-create it to be consistent. Otherwise the filesystem resize fails and the device drops to debug shell on first boot.

Merge request reports

Loading