Xavier NX booting from NVMe ssd using initrd flash script

I am trying to flash the Xavier NX production module using the ./tools/kernel_flash/l4t_initrd_flash.sh script to boot from the NVMe ssd. I followed both the workflows 2 and 3 mentioned in the README_initrd_flash.txt file and also used the nvsdkmanager_flash.sh script, but it doesn’t seem to work. Following are the exact steps I followed.

Workflow 3 steps followed:

  1. Download the BSP packages and sample rootfs using SDK manager for Jetpack 4.6 (rev 2).
  2. Download the secureboot package for L4T from [Jetson Linux R32.6.1 Release Page | NVIDIA Developer].
  3. Untar the secureboot package in JetPack_4.6_Linux_JETSON_XAVIER_NX_TARGETS directory.
  4. Ran systemctl stop udisks2.service
  5. Installed dependency packages using sudo apt install libxml2-utils simg2img network-manager abootimg sshpass device-tree-compiler.
  6. Attached xavier nx in recovery mode to host computer using micro-usb.
  7. Ran sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_nvme.xml -S 8GiB --showlogs jetson-xavier-nx-devkit nvme0n1p1.
  8. Restarted the udisk2 service using sudo systemctl start udisks2.service.

It goes to “Step 3: Start the flashing process”, prints “Waiting for board to boot-up…” message bunch of times and it Timeout and exits after printing “Cleaning up…”. When I reboot the NX it shows the Nvidia logo and prints boot messages and quickly reboots before I can read anything from the boot messages. It would be great if someone can help me figure out what I am missing here.

logs.txt (185.5 KB)

Hi ywolverine,

Please try below command to flash r32.6.1 on external NVMe SSD:
$sudo ./nvsdkmanager_flash.sh --storage nvme0n1p1

Thanks for you reply. I have tried $sudo ./nvsdkmanager_flash.sh --storage nvme0n1p1. I got the same thing.
I have attached the serial debug console logs from flashing and booting process.
flash_and_boot_debug_console_log.txt (110.8 KB)

Hi ywolverine,

Please also attached flash logs.
Log path: /Linux_for_Tegra/initrdlog/*.log

Hi @carolyuu

Please see the attached flash log.
flash_1-1_0_20211117-145320.log (9.6 KB)

Hi ywolverine,

Check your log, when script run ‘Step 3: Start the flashing process’ steps, the host can’t find your target NVMe SSD.
Please check your Xavier-NX board first, make sure you can see the 'll /dev/nvme0n*' external device.

@carolyuu Same issue. We have Auvidea JNX carrier boards. Do we have to modify some flashing scripts? In our case even the ./flash.sh cannot load firmware correctly to an external SSD. If we use ./flash.sh on eMMC then after flashing we see /dev/nvme0n1. Our SSDs (M.2 interface on carrier board) are 2TB. $sudo ./nvsdkmanager_flash.sh --storage nvme0n1p1 also fails.

Hi virgo,

Could you format your NVMe and try again?
$ sudo mkfs.ext4 /dev/nvme0n1

./flash.sh is not able to flash anything to external drive.

Only new tools like nvsdkmanager_flash.sh and initrd flash script are able to do that.

What @carolyuu is asking:

  1. You just flash your board to sdcard or emmc first.
  2. Put your nvme to the board.
  3. Reboot the board and see if you can see NVMe node on your jetson.

If even (3) does not happen, then no need to mention flash. The system is not able to detect the NVMe drive. That’s separate issue.

Is it easier to understand now?

@WayneWWW Hello. Can certainly do this again early next week (after Thanksgiving holidays) after I have access to the board at work. What I have been doing is format nvme01 using command @carolyuu mentioned. Then use sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1 to erase/flash eMMC (while NVMe was installed on the board). After completing board’s usename/password initial setup reboot the board,then run sudo fdisk -l command and see /dev/nvme0n1. It is present. However, this time I will remove nvme01 (format as ext4 separately) and then flash the board first and install nvme01 and reboot and see if it detects (just to be meticulous).

@WayneWWW we can see /dev/nvme0n1 device after following the above process (flash eMMC without NVMe and then attach on boot). But still unable to flash the nvme01 using initrd script. Please advise.