Boot Failure A311D Restoring Connection to Encrypted NVME

Okay. Debugging this is of course very frustrating because we don’t really see what the actual problem is. Having a USB UART adapter would allow seeing where the boot actually stops. My current hypothesis is that it’s the binutils bug. If you still have the original SD-card around that you used for booting, you could inspect the initramfs on it to verify that this was indeed the issue and nothing else by running (assuming you have the contents of the first partition of that sd-card mounted on /boot):

$ ls -lha /boot
$ lsinitramfs /boot/initrd.img-* | grep /lib/modules | wc -l

Going back to trying to restore your system, I’m puzzled about this output:

As you said in the beginning, your initial reform-tools version on that system was 1.31. You then upgraded it (which is good) but the current version of reform-tools is 1.53. Where does version 1.49 come from?

If you would like to restart from scratch, then flash a new system image to your sd-card, boot into that, connect to the internet and then redo these steps as the superuser:

$ umount /boot
$ cryptsetup luksOpen /dev/nvme0n1 reform_crypt
$ vgchange -ay reformvg
$ mount /dev/reformvg/root /mnt
$ mount /dev/mmcblk0p1 /mnt/boot
$ mount -o bind /dev /mnt/dev
$ mount -t sysfs sys /mnt/sys
$ mount -t proc proc /mnt/proc
$ cp /etc/resolv.conf /mnt/etc
$ chroot /mnt apt update
$ chroot /mnt apt upgrade
$ chroot /mnt apt install reform-tools=1.53
$ chroot /mnt apt install --reinstall linux-image-6.10.7-mnt-reform-arm64
$ chroot /mnt update-initramfs -u
$ chroot /mnt flash-kernel
$ chroot /mnt reform-check > reformcheck.txt 2>&1
$ umount --recursive /mnt
$ vgchange -an reformvg
$ cryptsetup luksClose reform_crypt

Let me explain the important steps that changed compared to last time. Upgrade your system. This should not change much, but lets get it in sync with the rescue sd-card that you are running:

$ chroot /mnt apt upgrade

Make sure that reform-tools is really upgraded. This should do away with the spurious version from above. No idea where that’s coming from but lets make sure that you have 1.53

$ chroot /mnt apt install reform-tools=1.53

Since you already upgraded the kernel for your system, repopulating /boot needs a re-install, hence running apt with --reinstall.

$ chroot /mnt apt install --reinstall linux-image-6.10.7-mnt-reform-arm64

The commands update-initramfs -u and flash-kernel should’ve been run by the above but it doesn’t hurt to run them again just to make sure (they should be no-ops):

$ chroot /mnt update-initramfs -u
$ chroot /mnt flash-kernelj

Now that everything is updated, run reform-check to make sure that all the problematic entries are gone:

$ chroot /mnt reform-check > reformcheck.txt 2>&1

Specifically, the really bad entries are:

E: your /boot has nothing mounted on it -- fix your /etc/fstab
E: /boot/boot.scr doesn't exist
E: no vmlinuz in /boot for the currently running kernel
E: no initrd.img in /boot for the currently running kernel
E: no dtb-* symlink for the currently running kernel

Good luck!

1 Like

Thank you.

Wish I could get USB-UART adapter quickly

Our local source for USB-UART adapters seems to be out of them: Lee’s

I was able to work through all the steps.

On the old SD card image

Reports from the two commands we didn’t get to do before, this time on my backed up SD card:

jsae@echo1 /m/j/7/j/P/r/s/3405043e-8a3f-4d94-940c-9025fc7484f4> ls -lha

total 50M
drwxr-xr-x 4 root root 4.0K Aug 19 07:54 ./
drwxrwxr-x 4 jsae jsae 4.0K Sep  6 17:18 ../
-rw-r--r-- 1 root root 5.4K Aug 19 07:54 boot.scr
-rw-r--r-- 1 root root 5.4K Aug 16 07:44 boot.scr.bak
-rw-r--r-- 1 root root 305K Dec 25  2023 config-6.6.9-reform2-arm64
lrwxrwxrwx 1 root root   72 Aug 19 07:54 dtb -> dtbs/6.6.9-reform2-arm64/amlogic/meson-g12b-bananapi-cm4-mnt-reform2.dtb
lrwxrwxrwx 1 root root   72 Aug 19 07:54 dtb-6.6.9-reform2-arm64 -> dtbs/6.6.9-reform2-arm64/amlogic/meson-g12b-bananapi-cm4-mnt-reform2.dtb
drwxr-xr-x 3 root root 4.0K Jan  4  2024 dtbs/
-rw-r--r-- 1 root root 1.5M Jan  4  2024 flash.bin
-rw-r--r-- 1 root root  19M Aug 19 07:54 initrd.img-6.6.9-reform2-arm64
drwx------ 2 root root 4.0K Jan  4  2024 lost+found/
-rw-r--r-- 1 root root   83 Dec 25  2023 System.map-6.6.9-reform2-arm64
-rw-r--r-- 1 root root  30M Dec 25  2023 vmlinuz-6.6.9-reform2-arm64

jsae@echo1 /m/j/7/j/P/r/s/3405043e-8a3f-4d94-940c-9025fc7484f4>
lsinitramfs initrd.img-* | grep /lib/modules | wc -l

28

Check for our results

I’m optimistic from reading the reform-check report:

I: Your platform name is: MNT Reform 2 with BPI-CM4 Module
I: You are running kernel version: 6.10.7-mnt-reform-arm64
I: Your installed kernel version: 6.10.7-1+reform20240902T112605Z
I: Your installed reform-tools version: 1.53
I: not installed:  blueman firmware-misc-nonfree greetd pocket-reform-handbook tuigreet wayvnc wf-recorder 
E: root account has no password (maybe run passwd -l root)
E: unexpected last line in /etc/skel/.profile, should be:
if [ "$(whoami)" = "root" ]; then reform-help --root; elif [ -z "$WAYLAND_DISPLAY" ]; then reform-help; fi
W: /etc/modprobe.d/reform.conf is identical to /usr/lib/modprobe.d/reform.conf
W: and the latter succeeds the former. Consider deleting the former in favour of the latter.

:star_struck:
And, it worked. Reform #200 starts up like it was new.

I intend to ponder whether to learn how to set up the “fancier” greeter at startup.

Thanks, again, Johannes!

Best,
Jesse’

Your old initramfs contains no modules. Thus, you stumbled across this bug from 3 weeks ago:

I’m glad you fixed it!

1 Like