How to Flash NRU-51 with A/B Partition Layout for Jetpack6.0

This guide walks you through the process of flashing an NRU-51V using an A/B rootfs partition layout on an external 128GB NVMe SSD.

1. Prerequisites

Before starting the flashing process, make sure you have:

  • A host PC with Ubuntu 20.04 or 22.04

  • Jetpack 6.0 L4T BSP environmentarrow-up-right properly set up

  • A working USB cable (preferably direct to motherboard, not via HUB)

  • External NVMe SSD connected to the target device (Take 128GB SSD for example.)

  • Your custom partition layout file:

    Linux_for_Tegra/tools/kernel_flash/flash_l4t_nvme_rootfs_ab.xml

Tip: You can verify the Jetson is in recovery mode with:

lsusb

Look for:

0955:7035 NVidia Corp. APX

2. Check Disk Size and Sector Count

Before flashing, confirm the real SSD capacity in jetson and calculate num_sectors used in the XML file.

sudo blockdev --getsz /dev/nvme0n1

Example output for a 128 GB NVMe SSD:

  • 1 sector = 512 bytes

  • 250069680 × 512 = 128,035,676,160 bytes ≈ 119.24 GiB 128 GB

This number must match the num_sectors value in your XML file.

Example Partition Layout (128 GB)

Partition
Size (Bytes)
Size (GB)
Purpose

A_kernel + DTB

134,217,728

0.13 GB

Slot A kernel

B_kernel + DTB

134,217,728

0.13 GB

Slot B kernel

ESP + ESP_alt

2 × 67,108,864

0.13 GB

EFI partitions

UDA

419,430,400

0.4 GB

Reserved by NV for OTA process. and, the UDA partition size to be a multiple of 512 Bytes

Reserved

502,792,192

0.5 GB

Reserve space in case there is any partition change required in the future

APP (A)

48,318,382,080

48 GB

Rootfs slot A

APP_b (B)

48,318,382,080

48 GB

Rootfs slot B

GPT + misc

Remainder

Partition table + margin

Sample device tag in XML

📌 If you use a different SSD, always use the actual value (num_sectors) returned by blockdev --getsz. 📌 Ensure the rootfs A/B partition size is divisible by 16384 (align_boundary).

3. Flashing Command

Use the following command to flash with A/B partitioning:

Parameter Explanation

Parameter
Description

ROOTFS_AB=1

Enables A/B rootfs partitioning

ROOTFS_RETRY_COUNT_MAX=3

Sets maximum retry count before marking a slot as bad

--external-device nvme0n1p1

Target device for rootfs (external NVMe SSD)

-c flash_l4t_nvme_rootfs_ab.xml

Custom partition layout XML file

-p "-c flash_t234_qspi.xml"

SPI QSPI config file for bootloader

--showlogs

Displays flashing log in real time

nru50p internal

Target board name and storage configuration


4. After Flashing

Once flashing completes successfully:

  • The system will boot from slot A (APP) by default.

  • Slot B (APP_b) will remain as the inactive partition.

  • You can verify the A/B slot status with nvbootctrlarrow-up-right :

Example:


5. Switching Slots (Optional)

If you need to switch the boot slot manually:

The system will reboot into the B slot.


6. Troubleshooting

  • If partition table is not applied correctly → Double-check the total num_sectors in your XML matches your SSD capacity.


7. Useful Commands

  • Check partitions on target after boot:


Summary: By using ROOTFS_AB=1 and a custom XML layout, you can create a reliable dual-slot system suitable for OTA updates or production deployment. If slot A fails after an update, the system can safely fall back to slot B, ensuring service continuity.

Last updated