`./nv_ota_updater` tries to decompress into `mmcblk0p2` when, due to encryption, it should decompress to `mmcblk0p4`

Hi folks, this is a tangential question to a previous question I asked (During OTA update: No space left on device) - when I try to run nv_ota_start, it fails when it tries to Decompress rootfs image into /dev/mmcblk0p2 since the update is 1.6 GiB and the partition is 400MB, which happens usually when one has an encrypted partition. How I understand it works is: When you encrypt a disk with LUKS, it creates a “crypto” partition representing the encrypted container. Inside this container, all your data resides, but it appears hidden. You unlock this container using cryptsetup open, which maps it to a virtual device. This mapped device shows a regular filesystem that can then be mounted and used. The mmcblk0p2 should contain the thing that unlocks mmcblk0p4, so 2 is 400M and 4 is 22G. However, the OTA updater tries to unpack the rootfs into 2 instead of 4, and thus runs out of space. Am I getting this right? How can I remedy this? The specs and commands are mentioned here: During OTA update: No space left on device

Hi sabhinav,

I would suggest you remove the NVMe drive and run your command to flash the board again since you are booting from external NVMe and it seems not the expected use case for you.
Your current command to generate OTA package is also for NVMe rather than eMMC.
So, please refer to the following steps to verify:

  1. remove NVMe drive
  2. run the following command to flash internal eMMC with disk-encryption enabled
$ sudo ROOTFS_AB=1 ROOTFS_ENC=1 ./flash.sh -i "encrypted.key" jetson-agx-orin-devkit internal 
  1. share the result of the following commands
$ df -h
$ lsblk
$ ls -al /dev/disk/by-partlabel

Upon doing that, the kernel panics upon boot for whatever reason. I tried this previously, can give it another try! Will keep you updated.

[   11.697330] tegra_actmon d230000.actmon: bwmgr_disable = 1
[   11.703344] tegra_actmon d230000.actmon: initialization Completed for the device mc_all
[   11.711753] hvc_sysfs: hypervisor is not present
��WARNING: clock_disable: clk_power_ungate on gated domain 35 for gpusysclk
WARNING: clock_disable: clk_power_ungate on gated domain 35 for gpc1clk
WARNING: clock_disable: clk_power_ungate on gated domain 35 for gpc0clk
��[   11.840931] ALSA device list:
[   11.843991]   No soundcards found.
[   11.848067] Freeing unused kernel memory: 3968K
[   11.852778] Run /init as init process
[   11.868877] Root device found: UUID=17f92c1f-791d-4c9f-a0c8-be4421883465
[   11.886252] Cryptsetup version: 
[   12.033367] ERROR: encrypted dev /dev/mmcblk0p3 is not LUKS device.
[   12.041958] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[   12.049845] CPU: 4 PID: 1 Comm: bash Not tainted 5.10.192-tegra #1
[   12.056206] Hardware name: Jetson AGX Orin Developer Kit (DT)
[   12.062129] Call trace:
[   12.064667]  dump_backtrace+0x0/0x1e0
[   12.068428]  show_stack+0x30/0x40
[   12.071848]  dump_stack+0xf0/0x130
[   12.075348]  panic+0x1a4/0x38c
[   12.078498]  do_exit+0xafc/0xb00
[   12.081823]  do_group_exit+0x4c/0xb0
[   12.085498]  __arm64_sys_exit_group+0x28/0x30
[   12.089981]  el0_svc_common.constprop.0+0x80/0x1d0
[   12.094918]  do_el0_svc+0x38/0xc0
[   12.098337]  el0_svc+0x1c/0x30
[   12.101477]  el0_sync_handler+0xa8/0xb0
[   12.105422]  el0_sync+0x16c/0x180
[   12.108839] SMP: stopping secondary CPUs
[   12.113065] Kernel Offset: 0x2fb0cffb0000 from 0xffff800010000000
[   12.119338] PHYS_OFFSET: 0xffffd7ce00000000
[   12.123634] CPU features: 0x08040006,4a80aa38
[   12.128113] Memory Limit: none
[   12.131260] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 ]---

@KevinFFF Just tried it again to ensure. The kernel panics upon boot if flashed without an NVME.

It is not the expected result to me, could you use the following command to flash the board and boot up successfully?

$ sudo ./flash.sh jetson-agx-orin-devkit internal