PostmarketOS manual FDE mount
Since I had trouble with this, I'll assume others have as well and will thus share my knowledge with the world. For context, I accidentally installed a faulty kernel to my Pixel 3A while trying to get the camera focus actuator working and needed to generate a new one from pmbootstrap, after which I learned that on FDE setups the kernel is inexplicably linked to the rootfs image, and if you generate another kernel then it won't automatically start the unl0ckr & cryptsetup system. With that said, the following commands should mount your rootfs and reinstall the kernel to fix the issue:
kpartx -a /dev/mmcblk0p72 # the specific dev will vary depending on device, assuming sargo's user partition
cryptsetup open /dev/mapper/mmcblk72p2 root # this will prompt you for your password
mount /dev/mapper/root /sysroot
mount -t proc /proc /sysroot/proc
mount --rbind sys /sys /sysroot/sys
mount --rbind /dev /sysroot/dev
mount --rbind /run /sysroot/run
chroot /sysroot
vi /usr/share/boot-deploy/boot-deploy-functions.sh
#remove the chroot check at the start of flash_updated_boot_parts
mount /dev/mapper/mmcblk0p72p1 /boot
#rm -rf /boot/* # depending on how the kernel was broken, you may have to do this
apk fix linux-postmarketos-qcom-sdm670
From there just reboot, and the kernel should be restored. We really shouldn't have to do this.
To post a comment you need to login first.