OTA upgrades on external device nvme1n1 failed

Hi everyone,
My T5000 is acctached with two M.2 SSD devices(nvme0n1 in C3 and nvme1n1 in C5), and I set the nvme1n1 SSD as the rootfs and booting drive, now I want to make Root File System Redundancy and Image-Based Over-the-Air Update, below is what I done:

  1. Creating redundant root file systems:
sudo ROOTFS_AB=1 ROOTFS_RETRY_COUNT_MAX=3 ./l4t_initrd_flash.sh \
    --external-device nvme1n1p1 \
   --flash-only \
   -c tools/kernel_flash/flash_l4t_t264_nvme_rootfs_ab.xml \
   --showlogs --network usb0 \
   jetson-agx-thor-devkit external

This step is success:

  1. Generate the OTA update payload package:
sudo -E ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh \
--external-device nvme1n1 jetson-agx-thor-devkit R38-4

This step encountered error, here is the compiling log:

sudo -E ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh \
--external-device nvme1n1 jetson-agx-thor-devkit R38-4
[sudo] password for stalker:
OTA with nvme1n1 is not supported on jetson-agx-thor-devkit
Usage: sudo ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh [options] <target board> <bsp version>
        Where,
                <target board>: target board. Supported boards: jetson-agx-orin-devkit, jetson-agx-orin-devkit-industrial, jetson-orin-nano-devkit, jetson-orin-nano-devkit-super, jetson-orin-nano-devkit-super-maxn, jetson-agx-thor-devkit.
                <bsp version>: the version of the base BSP. Supported versions: R38-2, R38-3, R38-4.
        options:
                -u <PKC key file>: PKC key used for odm fused board
                -v <SBK key file>: Secure Boot Key (SBK) key used for ODM fused board
                -i <enc rfs key file>: Key for disk encryption support
                -s      Skip generating system image.
                -b      Update bootloader only. Only valid if <bsp version> is R38.
                -r      Update rootfs only. Only valid if <bsp version> is R38.
                -o      Specify the script to update rootfs partition.
                -f      Specify the rootfs image to be written to rootfs partition.
                -p      Specify the options directly passed into flash.sh when generating images.
                --external-device <external device>: Specify the external device to be OTAed. Supported devices: nvme0n1.
                  This option is only valid for jetson-orin-nano-devkit, jetson-orin-nano-devkit-super, jetson-orin-nano-devkit-super-maxn, and jetson-agx-thor-devkit.
                -S <size>: Specify the size of rootfs partition on external device. Only valid when --external-device option is set. KiB, MiB, GiB short hands are allowed
                  Ths size set through this option must be the same as the size of rootfs partition on the external device to be OTAed.
                -E <esp image>: Specify the image to update ESP.
                -T <ext num sectors>: Specify the number of the sectors of the external storage device.
                --rootfs-uuid <rootfs UUID>: Specify UUID for rootfs tp be updated through OTA
                --rootfs-b-uuid <rootfs B UUID>: Specify UUID for rootfs B on the device to be updated through OTA.
                --uda-uuid <uda UUID>: Specify UUID for UDA on the device to be updated through OTA.
                --uefi-keys <keys_conf>: Specify UEFI keys configuration file.
                --uefi-enc <UEFI_ENC_key>: Key file (0x19: 16-byte; 0x23: 32-byte) to encrypt UEFI payloads.
Example:
        1. Upgrade from R38.2 to R38 ToT on Jetson AGX Thor Devkit
        sudo ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh jetson-agx-thor-devkit R38-2
        2. Upgrade from R38.2 to R38 ToT on Jetson AGX Thor Devkit that has 24GiB APP partition
        sudo ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh --external-device nvme0n1 -S 24GiB jetson-agx-thor-devkit R38-2
        3. Upgrade from R38.2 to R38 ToT on Jetson AGX Thor Devkit that has 24GiB APP partition and with rootfs A/B enabled
        sudo ROOTFS_AB=1 ./tools/ota_tools/version_upgrade/l4t_generate_ota_package.sh --external-device nvme0n1 -S 24GiB jetson-agx-thor-devkit R38-2

I also noticed
image
in
Software Packages and the Update Mechanism — NVIDIA Jetson Linux Developer Guide

Is it impossible to implement A/B partitions on nvme1n1?

hello stalker1943,

unfortunately, ROOTFS_AB=1 flashing may work on nvme1n1, while default OTA generator refuses it.

hence..
please have an alternative ways to configure Rootfs A/B on the SSD enumerated as nvme0n1, and using nvme1n1 for data or another purpose.

Thanks,
Can the two SSD devices swap for each other in system-level, so that nvme0n1 corresponds to 0005(C5) and nvme1n1 corresponds to 0003(C3)? That is still implement A/B partitions on nvme0n1, but actually on PCIe-C5 slot.

hello stalker1943,

it’s not supported,
Linux allocates the controller number when each controller probes; it is not a configurable mapping to C3 or C5. NVMe numbers are assigned by Linux probe order, and aliases or UEFI boot. order changes do not alter the device names used by the OTA recovery scripts.

OK, thank you!