Skip to content

Instantly share code, notes, and snippets.

@jerry73204
Created December 4, 2025 06:21
Show Gist options
  • Select an option

  • Save jerry73204/8d0408b3253b962208373428ee8748db to your computer and use it in GitHub Desktop.

Select an option

Save jerry73204/8d0408b3253b962208373428ee8748db to your computer and use it in GitHub Desktop.

Jetson AGX Orin Backup and Restore Guide

System Information

  • Device: NVIDIA Jetson AGX Orin Developer Kit
  • Jetson Linux: R36.3 (JetPack 6.0)
  • Boot Storage: NVMe SSD (nvme0n1)
  • Kernel: 5.15.136-tegra

Why Simple Disk Cloning Fails

The AGX Orin uses a dual-storage boot architecture:

Storage Location Contents
QSPI Flash On Orin module Bootloader (UEFI), firmware, hardware config
NVMe SSD External Rootfs (APP), kernel, recovery partitions

When you copy only the NVMe disk with dd, the QSPI bootloader data is not included. The bootloader contains device-specific configuration that must be present for the system to boot.

NVMe Partition Layout

nvme0n1p1   - APP (rootfs, ext4)
nvme0n1p2   - A_kernel
nvme0n1p3   - A_kernel-dtb
nvme0n1p4   - A_reserved_on_user
nvme0n1p5   - B_kernel
nvme0n1p6   - B_kernel-dtb
nvme0n1p7   - B_reserved_on_user
nvme0n1p8   - recovery
nvme0n1p9   - recovery-dtb
nvme0n1p10  - esp (EFI System Partition)
nvme0n1p11  - recovery_alt
nvme0n1p12  - recovery-dtb_alt
nvme0n1p13  - esp_alt
nvme0n1p14  - UDA
nvme0n1p15  - reserved

Proper Backup Method

Prerequisites

  1. Host PC running Ubuntu 20.04 or 22.04 (x86_64)
  2. Jetson Linux R36.3 BSP downloaded from NVIDIA
  3. USB-C cable connecting Orin to host PC
  4. Target Orin in Recovery Mode

Download BSP

# On host PC
wget https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v3.0/release/jetson_linux_r36.3.0_aarch64.tbz2
tar xf jetson_linux_r36.3.0_aarch64.tbz2
cd Linux_for_Tegra

# Install prerequisites
sudo ./tools/l4t_flash_prerequisites.sh

Enter Recovery Mode

On the Jetson AGX Orin:

  1. Power off the device
  2. Hold the RECOVERY button (middle button)
  3. Press and release the POWER button
  4. Wait 2 seconds, then release RECOVERY

Verify on host PC:

lsusb | grep -i nvidia
# Should show: ID 0955:7023 NVIDIA Corp. APX

Backup Command

cd Linux_for_Tegra

# Full backup including QSPI + NVMe
sudo ./tools/backup_restore/l4t_backup_restore.sh -b -e nvme0n1 jetson-agx-orin-devkit

The backup image is saved to:

Linux_for_Tegra/tools/backup_restore/images/

Restore Command

Put the target Orin in Recovery Mode, then:

sudo ./tools/backup_restore/l4t_backup_restore.sh -r -e nvme0n1 jetson-agx-orin-devkit

Mass Deployment (Multiple Devices)

For flashing multiple identical Orin devices:

Generate Massflash Package

cd Linux_for_Tegra

# Generate package for up to N devices simultaneously
sudo ./tools/kernel_flash/l4t_initrd_flash.sh \
    --no-flash \
    --massflash 5 \
    jetson-agx-orin-devkit external

This creates: mfi_jetson-agx-orin-devkit.tar.gz

Flash Multiple Devices

Copy the package to any host PC:

tar xf mfi_jetson-agx-orin-devkit.tar.gz
cd mfi_jetson-agx-orin-devkit

# Flash devices (put each in Recovery Mode)
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash 5

Backup Strategy Recommendations

For Production Environments

  1. Create a golden image on one fully-configured Orin
  2. Generate a massflash package and archive it
  3. Version control your customizations (extlinux.conf, device tree overlays)
  4. Test restore on a spare device before relying on backups

Protecting Against Sudden Shutdown

Since your devices fail due to battery-related sudden shutdowns:

  1. Consider adding a UPS or supercapacitor for graceful shutdown
  2. Mount filesystems with sync option for critical partitions
  3. Use fsck on recovery to repair filesystem corruption
  4. Keep the massflash package on an external drive for quick recovery

Comparison of Backup Methods

Method Backs Up Use Case Works?
dd on NVMe Rootfs only No
l4t_backup_restore.sh -b QSPI + NVMe Single device Yes
l4t_initrd_flash.sh --massflash Complete package Multiple devices Yes

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment