Workflow 3: Fail to make the massflash backup image, device is orin nx 8gb

Hi all,

I try to use Linux_for_Tegra/tools/README_backup_restore.txt to make a massflash backup image.

Workflow 1: To create a backup image to host storage, this step is works good.

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b jetson-orin-nano-devkit

Here is the log. backup-restore-Workflow-1.txt (95.6 KB)

I jump over Workflow 2: To restore a Jetson using a backup image, to setup Workflow 3 directly.

Workflow 3: To massflash the backup image

sudo ./tools/backup_restore/l4t_backup_restore.sh -b -c jetson-orin-nano-devkit

Errors happened, Here’s full log. backup-restore-Workflow-3.txt (89.8 KB)

Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for target to boot-up…
Waiting for device to expose ssh …RTNETLINK answers: File exists
RTNETLINK answers: File exists
Device has booted into initrd. You can ssh to the target by the command:
$ ssh root@fe80::1%enx32690c54d6e8
Cleaning up…
Log is saved to Linux_for_Tegra/initrdlog/flash_1-2.2_0_20231026-190158.log
Run command:
ln -s /proc/self/fd /dev/fd && mount -o nolock [fc00:1:1::1]:/home/hengyongchao/NVIDIA/Linux_for_Tegra_mass_flash/tools/backup_restore /mnt && /mnt/nvbackup_partitions.sh -e mmcblk0p1 -n && echo Backup image is stored in /home/hengyongchao/NVIDIA/Linux_for_Tegra_mass_flash/tools/backup_restore/images
on root@fc00:1:1::2
fdisk: cannot open /dev/mmcblk0p1: No such file or directory

How can I fix this issue? thanks very much!

Hi,

You don’t need Workflow 1 here, but in Workflow 3, I think the document is a bit unclear, and you’d also need -e nvme0n1 because the script by default looks for the eMMC.

1 Like

Hi @DaveYYY

So Workflow 1 & Workflow 2 are used for one by one restore and backup?

Workflow 3 for one device backup and flash multiple devices flow?

Am I right?

YES, exactly.

Hi @DaveYYY

Workflow 3: To massflash the backup image.

I try this steps:

Step 1:

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b -c jetson-orin-nano-devkit

This step goes ok. logs.
Workflow3-command_1.txt (98.7 KB)

Step 2:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 5 --showlogs jetson-orin-nano-devkit mmcblk0p1

Got issue on this step.

*** no-flash flag enabled. Exiting now… ***

User can run above saved command in factory environment without
providing pkc and sbk keys to flash a device

Example:

$ cd bootloader 
$ sudo bash ./flashcmd.txt

Save initrd flashing command parameters to /home/hengyongchao/NVIDIA/jetson-linux_flash/jetson_linux_35.4.1/Linux_for_Tegra/tools/kernel_flash/initrdflashparam.txt
/tmp/tmp.YyGRVsAELG /home/hengyongchao/NVIDIA/jetson-linux_flash/jetson_linux_35.4.1/Linux_for_Tegra
writing boot image config in bootimg.cfg
extracting kernel in zImage
extracting ramdisk in initrd.img
/tmp/tmp.YyGRVsAELG/initrd /tmp/tmp.YyGRVsAELG /home/hengyongchao/NVIDIA/jetson-linux_flash/jetson_linux_35.4.1/Linux_for_Tegra
58247 blocks
cp: cannot stat ‘/home/hengyongchao/NVIDIA/jetson-linux_flash/jetson_linux_35.4.1/Linux_for_Tegra/tools/kernel_flash/images/internal/flash.cfg’: No such file or directory
Cleaning up…

step2 full log here.
Workflow3-command_2.txt (85.4 KB)

All this try on offical develop board with orin nx 8gb module.

Is it operated under the same BSP folder with which the module is flashed?
What do you have under Linux_for_Tegra/tools/kernel_flash/images/internal/ and Linux_for_Tegra/tools/kernel_flash/images/external?

Hi @DaveYYY

1.Linux_for_Tegra/tools/kernel_flash/images/internal/ 2.Linux_for_Tegra/tools/kernel_flash/images/external

Serial-Console-LOG:

(base) hengyongchao@heapcorrupt  ~/NVIDIA/Linux_for_Tegra_mass_flash/tools/kernel_flash/images/internal  ll
total 203M
-rw-r–r-- 1 root root 392K 10月 27 12:31 adsp-fw_sigheader.bin.encrypt
-rw-r–r-- 1 root root 32K 10月 27 12:31 bct_backup.img
-rw-r–r-- 1 root root 42M 10月 27 12:30 boot.img
-rw-r–r-- 1 root root 1.1M 10月 27 12:31 bpmp_t234-TE980M-A1_prod_sigheader.bin.encrypt
-rw-r–r-- 1 root root 8.0K 10月 27 12:31 br_bct_BR.bct
-rw-r–r-- 1 root root 526K 10月 27 12:31 camera-rtcpu-t234-rce_sigheader.img.encrypt
-rw-r–r-- 1 root root 720K 10月 27 12:31 display-t234-dce_with_kernel_tegra234-p3767-0001-p3768-0000-a0_aligned_blob_w_bin_sigheader.bin.encrypt
-rw-r–r-- 1 root root 9.1K 10月 27 12:31 eks_t234_sigheader.img.encrypt
-rw-r–r-- 1 root root 64M 10月 27 12:31 esp.img
-rw-r–r-- 1 root root 53 10月 27 12:31 flash.cfg
-rw-r–r-- 1 root root 9.4K 10月 27 12:31 flash.idx
-rw-r–r-- 1 root root 17K 10月 27 12:31 gpt_primary_6_0.bin
-rw-r–r-- 1 root root 17K 10月 27 12:31 gpt_secondary_3_0.bin
-rw-r–r-- 1 root root 17K 10月 27 12:31 gpt_secondary_6_0.bin
-rw-r–r-- 1 root root 340K 10月 27 12:30 kernel_tegra234-p3767-0001-p3768-0000-a0.dtb
-rw-r–r-- 1 root root 17K 10月 27 12:31 mb1_cold_boot_bct_MB1_sigheader.bct.encrypt
-rw-r–r-- 1 root root 275K 10月 27 12:31 mb1_t234_prod_aligned_sigheader.bin.encrypt
-rw-r–r-- 1 root root 120K 10月 27 12:31 mb2rf_t234_sigheader.bin.encrypt
-rw-r–r-- 1 root root 429K 10月 27 12:31 mb2_t234_with_mb2_cold_boot_bct_MB2_sigheader.bin.encrypt
-rw-r–r-- 1 root root 512 10月 27 12:31 mbr_6_0.bin
-rw-r–r-- 1 root root 187K 10月 27 12:31 mce_flash_o10_cr_prod_sigheader.bin.encrypt
-rw-r–r-- 1 root root 238K 10月 27 12:31 mem_coldboot_sigheader.bct.encrypt
-rw-r–r-- 1 root root 288K 10月 27 12:31 nvdec_t234_prod_sigheader.fw.encrypt
-rw-r–r-- 1 root root 120K 10月 27 12:31 psc_bl1_t234_prod_aligned_sigheader.bin.encrypt
-rw-r–r-- 1 root root 367K 10月 27 12:31 pscfw_t234_prod_sigheader.bin.encrypt
-rw-r–r-- 1 root root 120K 10月 27 12:31 psc_rf_t234_prod_sigheader.bin.encrypt
-rw-r–r-- 1 root root 109 10月 27 12:30 qspi_bootblob_ver.txt
-rw-r–r-- 1 root root 45M 10月 27 12:30 recovery.img
-rw-r–r-- 1 root root 181K 10月 27 12:31 sc7_t234_prod_sigheader.bin.encrypt
-rw-r–r-- 1 root root 264K 10月 27 12:31 spe_t234_sigheader.bin.encrypt
-rw-r–r-- 1 root root 43M 10月 27 12:31 system.img
-rw-r–r-- 1 root root 41 10月 27 12:31 system.img.sha1sum
-rw-r–r-- 1 root root 136K 10月 27 12:31 tegra234-bpmp-3767-0001-3509-a02_with_odm_sigheader.dtb.encrypt
-rw-r–r-- 1 root root 340K 10月 27 12:30 tegra234-p3767-0001-p3768-0000-a0.dtb.rec
-rw-r–r-- 1 root root 1.1M 10月 27 12:31 tos-optee_t234_sigheader.img.encrypt
-rw-r–r-- 1 root root 2.8M 10月 27 12:31 uefi_jetson_with_dtb_sigheader.bin.encrypt
-rw-r–r-- 1 root root 161K 10月 27 12:31 xusb_t234_prod_sigheader.bin.encrypt
(base) hengyongchao@heapcorrupt  ~/NVIDIA/Linux_for_Tegra_mass_flash/tools/kernel_flash/images/internal  cd …/external
(base) hengyongchao@heapcorrupt  ~/NVIDIA/Linux_for_Tegra_mass_flash/tools/kernel_flash/images/external  ll
total 203M
-rw-r–r-- 1 root root 392K 10月 27 12:31 adsp-fw_sigheader.bin.encrypt
-rw-r–r-- 1 root root 32K 10月 27 12:31 bct_backup.img
-rw-r–r-- 1 root root 42M 10月 27 12:30 boot.img
-rw-r–r-- 1 root root 1.1M 10月 27 12:31 bpmp_t234-TE980M-A1_prod_sigheader.bin.encrypt
-rw-r–r-- 1 root root 8.0K 10月 27 12:31 br_bct_BR.bct
-rw-r–r-- 1 root root 526K 10月 27 12:31 camera-rtcpu-t234-rce_sigheader.img.encrypt
-rw-r–r-- 1 root root 720K 10月 27 12:31 display-t234-dce_with_kernel_tegra234-p3767-0001-p3768-0000-a0_aligned_blob_w_bin_sigheader.bin.encrypt
-rw-r–r-- 1 root root 9.1K 10月 27 12:31 eks_t234_sigheader.img.encrypt
-rw-r–r-- 1 root root 64M 10月 27 12:31 esp.img
-rw-r–r-- 1 root root 57 10月 27 12:31 flash.cfg
-rw-r–r-- 1 root root 9.4K 10月 27 12:31 flash.idx
-rw-r–r-- 1 root root 17K 10月 27 12:31 gpt_primary_6_0.bin
-rw-r–r-- 1 root root 17K 10月 27 12:31 gpt_secondary_3_0.bin
-rw-r–r-- 1 root root 17K 10月 27 12:31 gpt_secondary_6_0.bin
-rw-r–r-- 1 root root 340K 10月 27 12:30 kernel_tegra234-p3767-0001-p3768-0000-a0.dtb
-rw-r–r-- 1 root root 17K 10月 27 12:31 mb1_cold_boot_bct_MB1_sigheader.bct.encrypt
-rw-r–r-- 1 root root 275K 10月 27 12:31 mb1_t234_prod_aligned_sigheader.bin.encrypt
-rw-r–r-- 1 root root 120K 10月 27 12:31 mb2rf_t234_sigheader.bin.encrypt
-rw-r–r-- 1 root root 429K 10月 27 12:31 mb2_t234_with_mb2_cold_boot_bct_MB2_sigheader.bin.encrypt
-rw-r–r-- 1 root root 512 10月 27 12:31 mbr_6_0.bin
-rw-r–r-- 1 root root 187K 10月 27 12:31 mce_flash_o10_cr_prod_sigheader.bin.encrypt
-rw-r–r-- 1 root root 238K 10月 27 12:31 mem_coldboot_sigheader.bct.encrypt
-rw-r–r-- 1 root root 288K 10月 27 12:31 nvdec_t234_prod_sigheader.fw.encrypt
-rw-r–r-- 1 root root 120K 10月 27 12:31 psc_bl1_t234_prod_aligned_sigheader.bin.encrypt
-rw-r–r-- 1 root root 367K 10月 27 12:31 pscfw_t234_prod_sigheader.bin.encrypt
-rw-r–r-- 1 root root 120K 10月 27 12:31 psc_rf_t234_prod_sigheader.bin.encrypt
-rw-r–r-- 1 root root 109 10月 27 12:30 qspi_bootblob_ver.txt
-rw-r–r-- 1 root root 45M 10月 27 12:30 recovery.img
-rw-r–r-- 1 root root 181K 10月 27 12:31 sc7_t234_prod_sigheader.bin.encrypt
-rw-r–r-- 1 root root 264K 10月 27 12:31 spe_t234_sigheader.bin.encrypt
-rw-r–r-- 1 root root 43M 10月 27 12:31 system.img
-rw-r–r-- 1 root root 41 10月 27 12:31 system.img.sha1sum
-rw-r–r-- 1 root root 136K 10月 27 12:31 tegra234-bpmp-3767-0001-3509-a02_with_odm_sigheader.dtb.encrypt
-rw-r–r-- 1 root root 340K 10月 27 12:30 tegra234-p3767-0001-p3768-0000-a0.dtb.rec
-rw-r–r-- 1 root root 1.1M 10月 27 12:31 tos-optee_t234_sigheader.img.encrypt
-rw-r–r-- 1 root root 2.8M 10月 27 12:31 uefi_jetson_with_dtb_sigheader.bin.encrypt
-rw-r–r-- 1 root root 161K 10月 27 12:31 xusb_t234_prod_sigheader.bin.encrypt
(base) hengyongchao@heapcorrupt  ~/NVIDIA/Linux_for_Tegra_mass_flash/tools/kernel_flash/images/external 

The log says it’s run under ~/NVIDIA/jetson-linux_flash/jetson_linux_35.4.1/Linux_for_Tegra, but your screenshot says ~/NVIDIA/Linux_for_Tegra_mass_flash, so which one is correct?

Can you please confirm this?
I just don’t know what you are doing here.

Hi @DaveYYY

Linux_for_Tegra_mass_flash and jetson-linux_flash/jetson_linux_35.4.1/Linux_for_Tegra were both tried.

Linux_for_Tegra_mass_flash is oringl form NVIDIA, nothing changed.
It just for test the offical dev board.

jetson-linux_flash/jetson_linux_35.4.1/Linux_for_Tegra is modify the eeprom = 0x00 and add some sony sensor dts dirvers, will use this repo finnally.

Do you know what I’m saying here…
I’m asking if you have those files under ~/NVIDIA/jetson-linux_flash/jetson_linux_35.4.1/Linux_for_Tegra, but you are showing me results of ~/NVIDIA/Linux_for_Tegra_mass_flash, which is just meaningless.

If the BSP folder has not been used to flash your devices, then generating massflash packages would fail because some required files are missing.

Hi @DaveYYY

Sorry to confuse you, My bad.

Let me clarify the steps and environment to sync up.

Folder: ~/NVIDIA/Linux_for_Tegra_mass_flash

Target: Workflow 3: To massflash the backup image.

** Step 1:**

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b -c jetson-orin-nano-devkit

This step goes ok. logs. Workflow3-step1.txt (95.2 KB)

Step 2:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 5 --showlogs jetson-orin-nano-devkit mmcblk0p1

This step has errors happened.

Workflow3-step2.txt (82.3 KB)

Then I think it’s expected to fail.
Can you try doing all these steps under the same BSP folder?

  1. Flash the clean BSP to a device with initrd flash.
  2. Back up the environment with the backup/restore tool.
  3. Generate massflash package from the image backed up in #2.

Hi @DaveYYY

Step-1, with the clean device and enter recovery, It works ok:

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b -c jetson-orin-nano-devkit


step-1.txt (98.8 KB)

Step-2, the device enter recovery, got issues.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 5 --showlogs jetson-orin-nano-devkit nvme0n1p1

issue-1.txt (85.5 KB)

Change the command to fllows, still failed:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 5 --showlogs jetson-orin-nano-devkit mmcblk0p1

issue-2.txt (85.4 KB)

What is the parameters should be?

NO.
I mean start from flashing the device from scratch again, not backing up the device.

Hi @DaveYYY

  1. Install a new system, create an empty readme file on the desktop of device A, and then use the backup operation.

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b -c jetson-orin-nano-devkit

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 10 --showlogs jetson-orin-nano-devkit nvme0n1p1

  1. Then use restore image to another device B. No errors were reported during the operation.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash 10 --showlogs --network usb0

  1. However, there is no readme file on the desktop after device B is turned on.

Is this normal?

And I see this document, Flashing Support — Jetson Linux Developer Guide documentation Looks like the documentation is out of date?

Are you sure the correct image is being used?
Can you do more like installing CUDA/JetPack and verify again?

What if you don’t use -c during backup, and directly restore without massflash?

We will check this.

Hi,

If use this commands one by one can backup the jetson.

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b -c jetson-orin-nano-devkit

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

But, if use blew command to make the mass flash image, will get issue.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 10 --showlogs jetson-orin-nano-devkit nvme0n1p1

I think I’ve answered it here.
Did you follow these steps?

Hi All,

We have same problem on massflash with backup image.

For massflash, here is our workaround solution :

  1. put device into RCM mode, and execute command for backup image
    $sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b [board-config]

  2. generate mfi mass flash tar file with off-line mode
    $ sudo BOARDID=3767 BOARDSKU=0003 ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash --external-device nvme0n1p1 -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml --no-systemimg” -c ./tools/kernel_flash/flash_l4t_external.xml --massflash 5 --showlogs --network usb0 [board-config] nvme0n1p1

  3. untar tools/backup_restore/images/nvme0n1p1.tat.gz to temp folder

  4. modify temp folder file : boot/extlinux/extlinux.conf
    change root=PARTUUID=xxxxxxx to root=/dev/nvme0n1p1

  5. re-pack files under temp folder and named to system.img

  6. replace system.img to mfi .tar.gz

  7. update system.img.sh1sum with new checksum inside mfi .tar.gz

  8. now we can mass flash with backup file.

Although , we can mass flash with backup image now, but it is not convenient.

Do nvidia team show us the right way to massflash with backup image??
or , it does as online document mentioned ,massflash with backup image not support for orin nx series ???

Regards

Hi all

step-1 [SUCCESSED], Flash the clean BSP to a device with initrd flash.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” --showlogs --network usb0 jetson-orin-nano-devkit internal

step-2 [SUCCESSED],

Add some new files in /desktop and /home folder.

step-3 [SUCCESSED], Back up the environment with the backup command.

sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b jetson-orin-nano-devkit

step-4 [SUCCESSED], Generate massflash package from the image backed up.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --no-flash --network usb0 --massflash 10 --showlogs jetson-orin-nano-devkit nvme0n1p1

step-5 [SUCCESSED], restore the image to a new jetson device.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --massflash 10 --showlogs --network usb0

Question, all steps are successed, but after the latest step, I got a new OS not the modify files OS.

I suspect there is something wrong with the parameters in the last step command. How to uses backup&restore images to mass flashing the jetson?

I try to add --use-backup-image for the latest command, but get the same relsult.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --use-backup-image --flash-only --massflash 10 --showlogs --network usb0

Please help me to use the backup images to mass flash the jetson device, Thanks!