Encrypting sd card: missing cmdline.txt

Dear Sirs,
I’m trying to encrypt the root partition of my Raspberry Pi 4 B with Raspi OS.
I carefully obeyed the ‘Getting started …’ instructions.
The root partition has 16GB data, the USB stick has 64GB.
The zymkey is bound to the raspi (blinking every 3 seconds) when I call the script (no battery). Power supply is 3A

The call is curl -G https://s3.amazonaws.com/zk-sw-repo/mk_encr_sd_rfs.sh | sudo bash -s – -x /dev/sda -m 7
seems right

This is the output of phase 1 (I see several error messages about config.txt and cmdline.txt):
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 15517 100 15517 0 0 3694 0 0:00:04 0:00:04 --:–:-- 3694
OK:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
OK:2 http://archive.raspberrypi.org/debian buster InRelease
OK:3 https://zk-sw-repo.s3.amazonaws.com/apt-repo-buster buster InRelease
Paketlisten werden gelesen… Fertig
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen… Fertig
rsync ist schon die neueste Version (3.1.3-6).
zksaapps ist schon die neueste Version (1.0-14).
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
libmicrodns0 rpi-eeprom-images
Verwenden Sie »sudo apt autoremove«, um sie zu entfernen.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 336 nicht aktualisiert.
Stopping zkifc…done.
grep: /mnt/tmpboot/config.txt: Datei oder Verzeichnis nicht gefunden
grep: /mnt/tmpboot/config.txt: Datei oder Verzeichnis nicht gefunden
mount: /mnt/tmproot: special device /dev/sda1 does not exist.
Mounting failed. Installing crypto installer on /dev/sda.
Installing necessary packages…
umount: /dev/sda1: no mount point specified.
done.
Formatting USB mass media on /dev/sda…1+0 Datensätze ein
1+0 Datensätze aus
512 bytes copied, 0,0317638 s, 16,1 kB/s
Partition #1 contains a ext4 signature.
mke2fs 1.44.5 (15-Dec-2018)
Making a tarball of original root file system image…tar: Entferne führende „/“ von Elementnamen
tar: Entferne führende „/“ von Zielen harter Verknüpfungen
tar: /home/pi/.pm2/rpc.sock: Socket ignoriert
tar: /home/pi/.pm2/pub.sock: Socket ignoriert
tar: /root/.pm2/rpc.sock: Socket ignoriert
tar: /root/.pm2/pub.sock: Socket ignoriert
done.
Created symlink /etc/systemd/system/multi-user.target.wants/cfg_SD_crfs.service → /etc/systemd/system/cfg_SD_crfs.service.
Removed /etc/systemd/system/multi-user.target.wants/zkifc.service.
Removed /etc/systemd/system/multi-user.target.wants/zkbootrtc.service.
16,252,304,692 96% 2.37MB/s 1:48:54 (xfr#163509, to-chk=0/207228)
External device UUID = 8e524691-01
sed: /mnt/tmpboot/cmdline.txt kann nicht gelesen werden: Datei oder Verzeichnis nicht gefunden
sed: /mnt/tmpboot/cmdline.txt kann nicht gelesen werden: Datei oder Verzeichnis nicht gefunden
bash: Zeile 536: /mnt/tmpboot/cmdline.txt: Datei oder Verzeichnis nicht gefunden
mv: der Aufruf von stat für ‘/tmp/cmdline.txt’ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
sed: -e Ausdruck #1, Zeichen 4: Zusätzliche Zeichen nach dem Befehl
done.
root file sys conversion phase 1 complete.
Rebooting to installer partition to start phase 2…

This takes more than 2 hours, that seems rather okay.
Might it be that the above errors prevent booting phase 2 from the USB stick?
Is it a bug in the script (I read there have been some related changes for Ubuntu some time ago)?
Are there other actions necessary in order to enable booting from USB?

I can read the USB stick in a LINUX computer and see much data of phase 1 in sda1 including a wonderful tar ball.

The end result is that the root partition has not been encrypted and the zymkey is no longer bound (blinking quickly).
Please how can I see whether booting from USB succeeded? Or what happened afterwards?

Hello,
I’m wondering about the -m 7 option. We usually only see that option if someone is starting with a NOOBs image. We do not support NOOBs. If you are using NOOBs can you please start over with a fresh buster image from the Raspberry Imager or Etcher?

Bob

Hello Bob,
just as I explained above, I’m trying to encrypt the root partition mmcblk0p7 of my Raspberry Pi 4 B with Raspi OS.
My partitions look like this:
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 4990234 4982043 2,4G e W95 FAT16 (LBA)
/dev/mmcblk0p2 4990235 59834367 54844133 26,2G 5 Extended
/dev/mmcblk0p5 4997120 5062653 65534 32M 83 Linux
/dev/mmcblk0p6 5062656 5586941 524286 256M c W95 FAT32 (LBA)
/dev/mmcblk0p7 5586944 59834367 54247424 25,9G 83 Linux

My first suspicion was, that when the script was changed to support Ubuntu, the support of Raspi OS was broken.
Best regards and thank you for your help
Werner

Hi Bob,
seems you are right. Probably the install has been done using NOOBs.
ta