Classic Reform reform-setup-encrypted-disk fails

The reform-setup-encrypted-disk does not work. I did a fresh install of everything (latest image)*, but only get a blank screen after removing the SD-Card.

System:

  • Original classic reform with the NXP/Freescale i.MX8MQ CPU.
  • NVME is the one from the original CrowdSupply campaign
  • The system has no batteries.

*I have done the install more then once, without any success.

I did the same procedure on my MNT Pocket Reform i.MX8MPlus and it worked out of the box (no issues).

My problem is similar to: Reform-setup-encrypted-disk fails . However, different hardware, therefore the decision to create a new topic.

Which choices did you make when the script asked you at the end?

Did the script finish successfully?

When you say “latest image” which job number did you use to download it from?

Related, what is your version of reform-tools?

Do you have a UART adapter that you could use to figure out what is going on when the system boots?

What is the position of the DIP switch on your imx8mq board?

Do you have u-boot flashed to eMMC? Which version?

The script tries to give you helpful output when it encounters an odd situation. Are you able to provide the terminal output from when you run the script?

Did the script finish successfully?

Yes

What is the position of the DIP switch on your imx8mq board?

The DIP switch LPCPROG is set to 1.

When you say “latest image” which job number did you use to download it from?

$ sha256sum reform-system-imx8mq.img.gz
a11f56e8a14e4b6d3cb9be93ce1acd98839de6133edde37d6a7dbd5a041d93bc  reform-system-imx8mq.img.gz

Output of installation script:

$ sudo reform-setup-encrypted-disk 
This will ERASE ALL DATA from your NVMe SSD.

Are you sure you want to proceed? [y/N] y

WARNING!
========
This will overwrite data on /dev/nvme0n1 irrevocably.

Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for /dev/nvme0n1: 
Verify passphrase: 
Enter passphrase for /dev/nvme0n1: 
  Physical volume "/dev/mapper/reform_crypt" successfully created.
  Volume group "reformvg" successfully created
  Logical volume "swap" created.
Setting up swapspace version 1, size = 4 GiB (4294963200 bytes)
no label, UUID=cbf9b0af-f1ea-4190-b75f-b50d090a4578
  Logical volume "root" created.
mke2fs 1.47.4 (6-Mar-2025)
Creating filesystem with 61461504 4k blocks and 15368192 inodes
Filesystem UUID: 0edb9bdd-1e4a-4840-9323-6464a2837046
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done     


The encrypted NVMe SSD is now set up. Do you want me to run reform-migrate now as well? [y/N] y
  6,486,591,406  95%   11.65MB/s    0:08:51 (xfr#177375, to-chk=7325/262741)  
file has vanished: "/var/cache/man/CACHEDIR.TAG"
  6,759,969,377  99%   11.68MB/s    0:09:12 (xfr#184178, to-chk=0/262741)   
rsync warning: some files vanished before they could be transferred (code 24) at main.c(1356) [sender=3.4.4]
Your /boot partition will be on eMMC by default. Do you want it on the SD-Card instead? [y/N] n
I: Using partition on eMMC for /boot: /dev/mmcblk0p1.
This script selects your preferred boot medium. It writes your choice to the file /etc/fstab

This script will copy the contents from the old /boot partition
/dev/mmcblk1p1 (SD-card) to the new /boot partition mmcblk0p1 (eMMC) and delete all
files from the latter that were not present in the former.
Are you sure that you want to remove the contents of mmcblk0p1 (eMMC)
and replace it with the contents of /dev/mmcblk1p1 (SD-card)? [y/N] y
commenting original /etc/fstab contents
update-initramfs: Generating /boot/initrd.img-7.0.10-mnt-reform-arm64
WARNING: Unknown key type EIGHT_LEVEL_WITH_LEVEL5_LOCK
WARNING: Unknown key type EIGHT_LEVEL_WITH_LEVEL5_LOCK
…
WARNING: Unknown key type EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK
WARNING: Unknown key type EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK
WARNING: Unknown key type EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK
WARNING: Unknown key type EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK
…
WARNING: Unknown key type EIGHT_LEVEL_WITH_LEVEL5_LOCK
WARNING: Unknown key type EIGHT_LEVEL_WITH_LEVEL5_LOCK
WARNING: Unknown key type EIGHT_LEVEL_WITH_LEVEL5_LOCK
I: skipping reform_set_root in favour of flash_kernel_set_root
Using DTB: freescale/imx8mq-mnt-reform2.dtb
Installing /usr/lib/linux-image-7.0.10-mnt-reform-arm64/freescale/imx8mq-mnt-reform2.dtb into /boot/dtbs/7.0.10-mnt-reform-arm64/freescale/imx8mq-mnt-reform2.dtb
Taking backup of imx8mq-mnt-reform2.dtb.
Installing new imx8mq-mnt-reform2.dtb.
flash-kernel: installing version 7.0.10-mnt-reform-arm64
Generating boot script u-boot image... done.
Taking backup of boot.scr.
Installing new boot.scr.
Your /boot partition is on emmc (/dev/mmcblk0p1).
I: The bootloader will prefer the first partition on SD-card over the first partition on eMMC
I: Your current system has its /boot mounted from SD-card.
I: You requested to configure a new /boot on eMMC
I: Instead of just rebooting, power off the system.
I: Then remove the SD-card.
I: Lastly, power the system on again.
I: Power off your Reform 2 by running 'systemctl poweroff'.
I: WARNING: If you have the DIP switch on your i.MX8MQ set to load u-boot
I:          from SD-card instead of eMMC, you cannot boot the system without
I:          an SD-card inserted. In that case, either:
I:            a) mv /boot/boot.scr /boot/boot.scr.bak
I:            b) or put in a different SD-card with u-boot but without /boot/boot.scr
  0 logical volume(s) in volume group "reformvg" now active
You can now reboot into your encrypted System.

NOTE: I did plugin an USB device during the installation process (mouse).

Finial result it does not work without the SD card.

Furthermore, I did mv /boot/boot.scr /boot/boot.scr.bak on the SD Card. However, now even with the SD Card inserted the MNT reform is stuck in a boot loop.

Related, what is your version of reform-tools?

What command do I have to run to get it?

What command do I have to run to figure that out?

The version popping up in the in the boot loop is: u-boot 2018.07 MNT Reform 2.

I have a USB to TTL Serial Cable Adapter from ThinkPenguin laying around (never used it). Similar to this device: USB to TTL Serial Cable Adapter For Hacking On Routers (TPE-USBSERIAL) | ThinkPenguin.com.

Does this seem like the device you are looking for?

That’s the DIP switch on the motherboard. I mean the DIP switch on the imx8mq itself. This relates to part of the output you got:

Did you read that warning and made sure about the DIP switch position?

Changed the switch from on to off. Now, it works. Thanks.

The location of the DIP switch is on the front of the CPU module (see image below). However, one needs to remove the CPU heatsink first to get to the switch.

Hi,

glad this works!

If you have any idea how I can improve reform-setup-encrypted-disk such that it’s more obvious that the warning printed at the end of the output is actually important, I’d be all ears. Thank you!

My problem was that the message was too unspecific. I was not sure if it affects me or if this is an issue with another CPU module.

Basically, to make the message more specific/actionable the script could mention something along the lines of: you are running on the reform with the i.mx8mq CPU module. This module has a DIP switch (link to document explaining where to find the switch) to boot from the nvme disk the switch has to be in the off position. If the switch is in the on position an SD card is required. You have two options: …