Flashing Issues with AGX Orin onto NVME

Hi Everyone-
I’m looking for some assistance flashing the NVME drive on an AGX Orin, as I’m currently pulling my hair out attempting to do so!

My aim to be able to flash the root partition onto the NVMe drive, then attempt to do so with full disk encryption. In terms of FDE, I’m explicitly not after anything fancy, a simple password on boot-up would do.

I’ve effectively got two problems in the below:

  1. Flashing to an external NVME drive
  2. Enabling FDE on the NVME.

Flashing the NVME Drive:

The unit I’m attempting to flash is an Avermedia D315AOB (32GB) using the BSP package provided from their website (Standard Box PC D315AOB equipped with NVIDIA® Jetson™ AGX Orin Module | AVerMedia) - Release 2.3.1.5.1.1 with Jetpack 5.1.1. The NVMe drive is a Samsung 980 PRO 1TB - I have two of these, one connected to the D315, and one in an NVMe to USB for direct writing.

I’ve tried this on hosts running Ubuntu 20.04 and 18.04 (5.4.0-150-generic) with similar (failed) results, although it does look like initrd (below) got further on 18.04 rather than 20.04. I was able to successfully flash to both EMMC and NVME using the Nvidia SDK manager on 20.04 (Jetpack 5.3.1), but I cannot setup custom partitions in the tool, and not all of the functions of my board are supported!

From what I’ve seen in documentation and on here, it’s recommended to use l4t_initrd_flash.sh for NVMe flashing rather than flash.sh. I’ve tried two methods for flashing the NVME, both --direct <drive name> and via --usbinstance x:y, but I cannot currently get either methods working. My understanding with --direct is that you remove the drive in the Jetson and connect it directly to the host, allowing to write the partitions etc directly - Please correct me if this is a bad assumption.

My PC currently has the following device configuration:
NVME Flash storage on /dev/nvme0n1 (this is a windows OS)
Ubuntu 18.04 on SSD /dev/sda
980 Pro 1TB on /dev/sdb
D315 on USB 1:6

The D315 has:
980 Pro 1TB on /dev/nvme0n1
EMMC on /dev/mmcblk0p1

The Samsung 1TB drive has:
Sectors = 1953525168
Sector Size = 512 B

The partition config is a lightly modified version of the flash_l4t_nvme.xml file, changing the sectors to reflect that of the Samsung 980 Pro.

The two commands I’ve put together and have the most faith in are as follows (I’ll attach logs for these):
Flashing via the D315’s USB, after ensuring there’s a good instance of ubuntu in EMMC, flashed via ./flash.sh:
sudo ./tools/kernel_flash/l4t_initrd_flash.sh -c tools/kernel_flash/flash_l4t_nvme.xml --usbinstance 1:6 -S 800GiB --external-device nvme0n1 --network usb0 jetson-agx-orin-d315ao external

Flashing directly to the NVMe, via the USB-NVMe connector
sudo BOARDID=3701 BOARDSKU=0004 FAB=TS4 BOARDREV=A.0 ./tools/kernel_flash/l4t_initrd_flash.sh -c tools/kernel_flash/flash_l4t_nvme.xml -S 800GiB --external-device nvme0n1 --direct sdb jetson-agx-orin-d315ao external

This appears to fail to write anything to the connected NVME - No partitions are present after flashing.

I’ll attach a copy of my partitions config, along with the logs I’m getting from both commands. As with another user on this forum, I’ve also seen the ERROR: carveout * is not supported reported multiple times.

I’ve followed various forum posts followed for support, but still have not solved the issue:

https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/Security/DiskEncryption.html
https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/Security/DiskEncryption.htmlhttps://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/AR/BootArchitecture/PartitionConfiguration.html?highlight=external%20storage%20device%20partition
https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/FlashingSupport.html#TosetupaNVMedrivemanuallyforbooting

https://docs.nvidia.com/jetson/archives/r35.1/DeveloperGuide/text/SD/FlashingSupport.html#flashing-to-an-nvme-drive

Enabling FDE:

I have had a little success here, by modifying the install script provided and flashing the default FDE to the internal EMMC via:
sudo echo "f0e0d0c0b0a001020304050607080900" > ekb.key
sudo ROOTFS_ENC ./flash.sh $usb_instance -i "./ekb.key" $* ${MODULE_NAME} mmcblk0p1
But I’m unsure how to modify this in order to require a password on boot-up.

Attachments:
flash_via_USB_full.log (301.7 KB)
flash_l4t_nvme.xml (10.3 KB)
flash_direct_0_20230808-123509.log (1.0 KB)
flash_002_2004_lts.txt (156.6 KB)

Hi,

please just use the flash_l4t_external.xml for the partition layout, and leaving num_sectors unchanged as it will be detected by flashing scripts during flashing.
Also, do you really need -S 800GiB? The size of the APP partition is configurable upon first boot in the OEM config.

Hi @DaveYYY

Thanks for you quick response - In light of what you said, I modified the flash command to read the following and attempted reflashing:
sudo ./flash.sh -c tools/kernel_flash/flash_l4t_external.xml ${usb_instance} jetson-agx-orin-d315ao external

sudo ./tools/kernel_flash/l4t_initrd_flash.sh -c tools/kernel_flash/flash_l4t_external.xml --external-device nvme0n1p1 ${usb_instance} --network usb0 jetson-agx-orin-d315ao external

Neither command appeared to produce a bootable image.

The log looks fine here, or the device fails to boot up?

Yeah, the device appears to fail to boot, with no output to the display. I don’t get any boot looping though?

Does the NVME need to be formatted before use? or in any other special state?

Apologies - I’ve just realised that the last flash worked and is now running from the NVME.

A quick SSH and I can log in just fine, I just have no display.

The default kernel and BSP should have GUI and display drivers enabled,
maybe you should contact the vendor for support.

1 Like

@DaveYYY Thanks for this - Are you able to assist with my other question about setting up disk encryption?

I’m not sure about what exactly you want to do

You mean the login prompt of Ubuntu itself?

No, decryption using a standard LUKS passphrase on boot? (followed by a separate user login passphrase)

Hi,

have you check the developer guide?
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/Security/DiskEncryption.html#how-to-flash-an-encrypted-rootfs-to-an-external-storage-device
You need to use flash_l4t_nvme_rootfs_enc.xml as the partition layout file to enable disk encryption.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.