During testing of !2870 (closed) I've tried to install with --fde to the eMMC.
The splash screen shows:
unable to mount root partition
via serial:
/init: line 305: cryptsetup: not foundMount root partition (/dev/mmcblk0p2) to /sysroot (read-only)WARNING: Detected 'crypto_LUKS' filesystem (/dev/mmcblk0p2).ERROR: unable to mount root partition!
I've tried again without FDE and this time it booted up.
Maybe it's an issue when using Tow-Boot Jumpdrive-like functionality, but I didn't run into this issue when doing PC pmbootstrap -> SD -> eMMC path.
I've made an SD card with pmbootrap with FDE, and then using this SD card I did the same steps to install PostmarketOS to PinePhone Pro with FDE - everything seems to work
I did not encountered the issue. Installation with fde through tow-boot usb mass storage access was pretty smooth. System boot correctly.
I think I already encountered this kind of issue before. I failed to type the luks passphrase multiple time without understanding what was going on. Rebooting the device and I one shooted the passphrase. Is it possible this issue relate to the pinebook "Cant find boot partition" ? Maybe it only happen some times ? (I rebooted the devices 3 times in a row without encountering the issue)
edit: I now have the "incorrect passphrase" whith my sd cart inserted. Both issues seems unrelated
I just tried FDE on an OG PP (with Tow-Boot and both UEFI and our previous (old) u-boot scripts), using !3068 (closed), and it worked just fine. Can anyone still reproduce this issue? Is it device-specific somehow (I can not think of a reason how it would)?
it fails to load the rootfs on v22.12 -> /init: line 362: cryptsetup: not found@PureTryOut
Here is the output from serial console:
U-Boot TPL 2021.10 (Oct 04 2021 - 15:09:26)Channel 0: LPDDR4, 50MHzBW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MBChannel 1: LPDDR4, 50MHzBW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB256B stridelpddr4_set_rate: change freq to 400000000 mhz 0, 1lpddr4_set_rate: change freq to 800000000 mhz 1, 0Trying to boot from BOOTROMReturning to boot ROM...U-Boot SPL 2021.10 (Oct 04 2021 - 15:09:26 +0000)Trying to boot from SPINOTICE: BL31: v2.6(release):NOTICE: BL31: Built : 00:00:00, Jan 1 1980Tow-Boot 2021.10 (Oct 04 2021 - 15:09:26 +0000)005 [variant: spi]SoC: Rockchip rk3399Reset cause: PORModel: Pine64 PinePhoneProDRAM: 3.9 GiBPMIC: RK8180 (on=0x40, off=0x04)MMC: mmc@fe310000: 3, mmc@fe320000: 1, mmc@fe330000: 0Loading Environment from SPIFlash... SF: Detected gd25lq128e with page size 256 Bytes, erase size 4 KiB, total 16 MiB*** Warning - bad CRC, using default environmentIn: serialOut: serialErr: serialModel: Pine64 PinePhoneProNet: No ethernet found.starting USB...Bus usb@fe380000: USB EHCI 1.00Bus usb@fe3a0000: USB OHCI 1.0Bus usb@fe3c0000: USB EHCI 1.00Bus usb@fe3e0000: USB OHCI 1.0scanning bus usb@fe380000 for devices... 1 USB Device(s) foundscanning bus usb@fe3a0000 for devices... 1 USB Device(s) foundscanning bus usb@fe3c0000 for devices... 1 USB Device(s) foundscanning bus usb@fe3e0000 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) foundPlease press [ESCAPE] or [CTRL+C] to enter the boot menu.offoffswitch to partitions #0, OKmmc0(part 0) is current deviceScanning mmc 0:1...libfdt fdt_check_header(): FDT_ERR_BADMAGICCard did not respond to voltage select! : -110Scanning disk mmc@fe310000.blk...Disk mmc@fe310000.blk not readyCard did not respond to voltage select! : -110Scanning disk mmc@fe320000.blk...Disk mmc@fe320000.blk not readyScanning disk mmc@fe330000.blk...Found 3 disks** Unable to read file ubootefi.var **Failed to load EFI variablesBootOrder not definedEFI boot manager: Cannot load any imageFound EFI removable media binary efi/boot/bootaa64.efi716800 bytes read in 56 ms (12.2 MiB/s)libfdt fdt_check_header(): FDT_ERR_BADMAGICBooting /efi\boot\bootaa64.efiWelcome to GRUB! Booting `postmarketOS'EFI stub: Booting Linux Kernel...EFI stub: ERROR: FIRMWARE BUG: kernel image not aligned on 64k boundaryEFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device pathEFI stub: Using DTB from configuration tableEFI stub: Exiting boot services...Booting Linux on physical CPU 0x0000000000 [0x410fd034]Linux version 6.1.3 (pmos@CZPRGL-B18SYD3) (aarch64-alpine-linux-musl-gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924, GNU ld (GNU Binutils) 2.39) #3 SMP Sun Jan 15 00:02:58 UTC 2023Machine model: Pine64 PinePhoneProearlycon: uart8250 at MMIO32 0x00000000ff1a0000 (options '')printk: bootconsole [uart8250] enabled### postmarketOS initramfs ###Configuring kernel firmware image search pathNOTE: Waiting 10 seconds for the framebuffer /dev/fb0.If your device does not have a framebuffer, disable this with:no_framebuffer=true in <https://postmarketos.org/deviceinfo>Setting framebuffer mode to: U:720x1440p-0Setup usb network /sys/class/android_usb does not exist, skipping android_usb Setting up an USB gadget through configfsStarting unudhcpd Using interface usb0 Starting the DHCP daemonTrying to start server with parameters: Server IP addr: 172.16.42.1:67, client IP addr: 172.16.42.2, interface: usb0Trying to bind to interface: usb0Server started!Mount boot partition (/dev/mmcblk2p1) to /boot (read-only)Detected vfat filesystemExtract /boot/initramfs-extracpio: lib/ld-musl-aarch64.so.1 not created: newer or same age file existscpio: lib/libc.musl-aarch64.so.1 not created: newer or same age file existscpio: lib/libdevmapper.so.1.02 not created: newer or same age file exists11748 blocksReceived DHCP DISCOVER from client: f6:21:be:09:ba:50Received DHCP REQUEST from client: f6:21:be:09:ba:50/init: line 362: cryptsetup: not foundMount root partition (/dev/mmcblk2p2) to /sysroot (read-only)WARNING: Detected unsupported 'crypto_LUKS' filesystem (/dev/mmcblk2p2).ERROR: unable to mount root partition!
I don't know if it's relevant, but I got this exact issue while trying to get FDE on samsung-grandpplte:
/init: line 380: cryptsetup: not foundMount root partition (/dev/mapper/mmcblk0p26p2) to /sysroot (read-only)WARNING: Detected unsupported 'crypto_LUKS' filesystem (/dev/mapper/mmcblk0p26p2).ERROR: unable to mount root partition!
I have the same issue (ERROR: unable to mount root partition!) while using -fde on 6.3.4-sdm845 postmarketos-qcom-sdm845 aarch64 Linux. Build from 29-05-2023 (edge). Without -fde just works like charm. So apparently still an issue..
Still seems to be broken on pinephone pro with latest plasma installer (20230809-1953) and fde enabled.
Was able to get the SD card booting with full disk encryption after manually updating fstab but after unlocking luks I was met with a blank screen.
The DE seems to hang there, no interaction from KB or touch inputs.
I tried the same trick on the eMMC and was not able to get it to boot (still showing missing boot partition).
I might be missing something, but in case this helps someone else, this is how I attempted to fix the luks boot on eMMC:
# you will need qemu-user-static locally if not on an ARM system#sudo apt-get install qemu-user-static# mount pinephonepro in usb mode, then locally..PINEPHONE_DEV=/dev/sdcPINEPHONE_MNT=/media/anon/pmOS_rootPINEPHONE_MMC_BOOTPART=/dev/mmcblk2p1sudo mount ${PINEPHONE_DEV}1 $PINEPHONE_MNT/bootsudo mount --bind /dev $PINEPHONE_MNT/devsudo mount --bind /dev/pts $PINEPHONE_MNT/dev/ptssudo mount --bind /proc $PINEPHONE_MNT/procsudo mount --bind /sys $PINEPHONE_MNT/syssudo cp /usr/bin/qemu-arm-static /media/anon/pmOS_root/bin/sudo chroot $PINEPHONE_MNT /bin/sh# then inside the chroot..ROOT_UUID=$(grep -E -m 1 'UUID=.*? +/' /etc/fstab |cut -d ' ' -f 1 | cut -d '=' -f 2)echo "root UUID=$ROOT_UUID none luks,discard" >/etc/crypttabmkinitfssed -i "s%UUID=$ROOT_UUID%/dev/mapper/root%" /etc/fstabsed -i -E 's%UUID=.*? (/boot.*)%/dev/mmcblk1p1 \1%' /etc/fstab# back on local machine..sudo umount $PINEPHONE_MNT/dev/ptssudo umount $PINEPHONE_MNT/devsudo umount $PINEPHONE_MNT/procsudo umount $PINEPHONE_MNT/syssudo umount $PINEPHONE_MNT/bootsudo umount $PINEPHONE_MNT# reboot phone from emmc
If I had to put a guess out there, the issue seems to be that the installer is not setting up /etc/crypttab and the UUIDs it puts in /etc/fstab are incorrect.
Hope that helps debugging, i'm not spending any more time on this tonight. cheers!
I tried this on my Pinephone Pro yesterday using pmbootstrap install --sdcard=/dev/sda --fde (which was the eMMC device) and it worked fine. It all worked out of the box and I didn't have to modify anything. I am using sxmo-de-sway if that matters.
When I install phosh after ensuring that unl0kr is in the list of installed packages it works and I can boot with FDE on the pinephone pro just fine.
I think this explains why it worked for me when I installed with FDE a few weeks ago, maybe something about the dependencies of postmarketos-ui-sxmo-de-sway pulls in unl0kr transitively.
For some reason that I don't understand yet the wrong provider is chosen when --fde is used with postmarketos-ui-phosh.
Reading through pmbootstrap code here, it looks like when --fde is supplied to the install command, it searches for a provider of postmarketos-fde-unlocker. There are three, unl0kr, osk-sdl and postmarketos-base-nofde. pmb.parse.depends.package_provider() will ensure that one of those is already in the list of packages to install. If one of those are not in the list of packages to install, it will choose the highest priority provider, which is postmarketos-base-nofde with priority 1.
unl0kr works. I haven't tried osk-sdl.
I'm trying to figure out how this is all supposed to be wired up so I can detangle this. It seems like there is just a dependency missing somewhere. I don't see osk-sdl or unl0kr listed as dependencies in any of the device specific packages.