Jetson Xavier NX Setup
Some sections are marked as untested. Be prepared to manually troubleshoot if you follow them.
Introduction
There are two ways to flash this device. One is to connect it via micro USB to a host PC. This method requires a Linux native host, and you can follow the official instructions on Nvidias page then. Do not try with WSL or virtual machines or docker on Windows. It will not work, it's not supported, and many hours have been wasted trying to make it work.
Windows
There is only one way that is known to be working, and that is flashing a jetpack image to an sd card.
- Jetpack 5.1.3 is the latest Jetpack that is compatible with Xavier NX at the time of writing. Download the image for SD card here https://developer.nvidia.com/embedded/jetpack-sdk-513 (Orin NX is a newer platform, but since this is a Xavier make sure you pick the right one)
- Flash the image to an SD card with Balena etcher. https://etcher.balena.io/
The first time you start the jetson with the sd card, the boot some times get stuck on "starting configuration process" or similar. Then you need to make sure you connect a keyboard and mouse and restart the jetson. The GUI should come up after a couple of minutes and you can configure the OS. For convenience and consistency within this project, we use knightec both as user and password.
Move the OS to NVME SSD
If the Xavier NX has an SSD attached to its m2 slot, you can move the OS to it since it's usually a bit faster than SD card. This process can be done via SSH.
Backup Your Data
Make sure to back up any important data on your SD card.
Install an Editor
In this example, we'll use nano.
sudo apt-get install nano
List Your Storage Devices to Identify the SD Card and NVMe
List your storage devices to identify the SD Card and NVMe:
lsblk
Assume the SD Card is mmcblk0p1 and NVMe is nvme0n1p1, but it might be different on your device.
Prepare the NVMe Drive
Boot your Jetson device using the SD card. Open a terminal. List your storage devices to identify the NVMe drive:
lsblk
Start parted to partition the NVMe drive (assuming it is /dev/nvme0n1):
sudo parted /dev/nvme0n1
Create a new partition table:
mklabel gpt
Create a new primary partition:
mkpart primary ext4 0% 100%
Exit parted:
quit
Format the New Partition
Format the new partition with the ext4 filesystem and set a label (optional):
sudo mkfs.ext4 -L KnghtSSD /dev/nvme0n1p1
Mount the NVMe Drive
Create a mount point and mount the NVMe drive:
sudo mkdir /mnt/nvme
sudo mount /dev/nvme0n1p1 /mnt/nvme
Clone the SD Card to the NVMe Drive
Use rsync to copy the root filesystem, excluding the special filesystems:
sudo rsync -axHAWXS --numeric-ids --info=progress2 / /mnt/nvme
Ensure Special Filesystems Are Not Mounted
Bind mount special filesystems to ensure they are correctly handled during the chroot:
sudo mount --bind /proc /mnt/nvme/proc
sudo mount --bind /sys /mnt/nvme/sys
sudo mount --bind /dev /mnt/nvme/dev
sudo mount --bind /run /mnt/nvme/run
Update the Boot Configuration
Edit the boot configuration to make the NVMe drive the primary boot option:
First, save a backup.
sudo cp /boot/extlinux/extlinux.conf /boot/extlinux/extlinux.conf.bak
Then edit the file.
sudo nano /boot/extlinux/extlinux.conf
Modify the extlinux.conf to make NVMe the default boot option. You will see an entry with LABEL primary. Copy the section and rename it to nvme. Make sure that root is set to /dev/nvme0n1p1 on that section. Your end result will look something like this:
** Don't copy the text below , it's just an example. **
TIMEOUT 30
DEFAULT nvme
MENU TITLE Jetson Xavier NX Boot Options
LABEL nvme
MENU LABEL Boot from NVMe (Primary)
LINUX /boot/Image
INITRD /boot/initrd
APPEND ${cbootargs} root=/dev/nvme0n1p1 rw rootwait
LABEL sdcard
MENU LABEL Boot from SD Card (Backup)
LINUX /boot/Image
INITRD /boot/initrd
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait
The information in your file is probably a little bit different, and that's why you make a copy of the section. Pay attention to the MENU LABEL as this is what you will be seeing in your boot options menu. Save and exit the file.