Hi everyone,
I am working on a Jetson Orin NX (L4T R36.4.3). I have already successfully enabled Secure Boot and fTPM. dmesg confirms “Secure Boot Enabled”.
Now, I am trying to implement Disk Encryption (Rootfs Encryption) using an external NVMe, but I am hitting a Kernel Panic during boot.
**
Steps I followed:
- Key Generation:** Generated
oem_k1.key,sym_t234.key,sym2_t234.key, andauth_t234.keyusing openssl.
**
openssl rand -rand /dev/urandom -hex 32 > oem_k1.key
openssl rand -rand /dev/urandom -hex 32 > sym_t234.key
openssl rand -rand /dev/urandom -hex 16 > sym2_t234.key
openssl rand -rand /dev/urandom -hex 16 > auth_t234.key**
2. EKB Generation: I generated eks_t234.img using gen_ekb.py with the keys above and placed it in Linux_for_Tegra/bootloader/.
3. Disk Encryption Key: I used sym2_t234.key as my disk_enc.key: cp "sym2_t234.key" "Linux_for_Tegra/disk_enc.key"
4. Flashing Command: I used l4t_initrd_flash.sh with the following workflow:
-
Generated images with
--odm-image-genand-u/-vkeys. -
Ran the flash command with
ROOTFS_ENC=1,-i ./disk_enc.key, and--external-device nvme0n1p1. -
Used the config:
flash_l4t_t234_nvme_rootfs_enc.xml. -
Flash Script :
sudo BOARDID=“$BOARD_ID” FAB=“$FAB” BOARDSKU=“$BOARDSKU” CHIP_SKU=“$CHIP_SKU” RAMCODE_ID=“$RAMCODE”
./tools/kernel_flash/l4t_initrd_flash.sh
–odm-image-gen
–showlogs
–network usb0
–no-flash
-u ../odm_keys/rsa3k.pem
-v ../odm_keys/sbk-32.key
–uefi-keys ../uefi_keys/uefi_keys.conf
-p “-c bootloader/generic/cfg/flash_t234_qspi.xml”
jetson-orin-nano-devkit-super
internalsudo BOARDID=“$BOARD_ID” FAB=“$FAB” BOARDSKU=“$BOARDSKU” CHIP_SKU=“$CHIP_SKU” RAMCODE_ID=“$RAMCODE”
ROOTFS_ENC=1
./tools/kernel_flash/l4t_initrd_flash.sh
–mass-storage-only
–showlogs
–network usb0
–no-flash
–external-device nvme0n1p1
–external-only
-c ./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_enc.xml
-i “./disk_enc.key”
–uefi-keys ../uefi_keys/uefi_keys.conf
–uefi-enc ../oem_keys/sym_t234.key
jetson-orin-nano-devkit-super
internalsudo mkdir -p tools/kernel_flash/images/internal/ekb_db
sudo cp “${BSP_TOP}/oem_out/signed/”* tools/kernel_flash/images/internal/ekb_db
sudo cp “${BSP_TOP}/oem_out/signed/”* bootloader/sudo BOARDID=“$BOARD_ID” FAB=“$FAB” BOARDSKU=“$BOARDSKU” CHIP_SKU=“$CHIP_SKU” RAMCODE_ID=“$RAMCODE”
ROOTFS_ENC=1
./tools/kernel_flash/l4t_initrd_flash.sh
–external-device nvme0n1p1
-c ./tools/kernel_flash/flash_l4t_t234_nvme_rootfs_enc.xml
-i “./disk_enc.key”
-p “-c ./bootloader/generic/cfg/flash_t234_qspi.xml”
–uefi-keys ../uefi_keys/uefi_keys.conf
–showlogs
–network usb0
jetson-orin-nano-devkit-super
internal
The Error: The system flashes successfully, but during boot, it fails with:
[ 13.149686] ERROR: fail to unlock the encrypted dev /dev/nvme0n1p2.
[ 13.151574] Kernel panic - not syncing:
[ 13.151578] Attempted to kill init! exitcode=0x00007f00
Questions:
-
Is copying
eks_t234.imgonly tobootloader/sufficient, or does it need to be signed/processed differently for Orin NX? -
My flash command uses
jetson-orin-nano-devkit-superas the target (custom board based on Orin Nano/NX). Is there any mismatch in the XML partition files for NVMe? -
In R36.4.3, is there a specific requirement for the
-i(disk_enc.key) to match a specific key index in the EKB?
Any help to avoid bricking the device while fixing this would be appreciated.