2022년 2월 27일 일요일

Effective Jetson Xavier NX Setup - SSD Booting

 Let's see how to install JetPack 4.6 on Jetson xavier nx and use it effectively.

Jetson Nano uses SD card. Therefore, multiple SD card images can be prepared and used. For example, an SD card for Tensorflow and an SD card for PyTorch are prepared separately and used while replacing the SD card as needed.

Xavier NX allows additional SSD installation. SSDs are much faster and more stable than SD cards. Therefore, it is better to install various software using an SSD rather than using multiple SD cards.  

Jetson Xavier NX -Run from SSD

To use SSDs with Xavier NX, you need a standalone x86 Ubuntu server.

The documentation says that Ubuntu 18.04 and 16.04 are available, but as a result of my testing, it failed in 18.04. Please prepare one x86 PC with Ubuntu 16.04 installed. If you have used Jetxon TX2 or AGX Xavier, you probably have experience installing and using NVidia SDK Manager on an x86 PC.

However, SDK manager is not used in this work. We will directly transfer the JetPack 4.6 image to Xavier NX using a bash script.

I know that NVidia is working on integrating this SSD bootable method into SDK Manager. Maybe JetPack 4.7 will use the SDK Manager.

And since booting from the SSD drive proceeds, there is no need to use the SD card anymore.

The following content is taken from the JetsonHacks homepage. Thanks to JetsonHacks for the nice introduction.

<JetsonHack's Youube>


SSD Installation

Be sure to prepare an M.2 NVMe type SSD. I prepared a 128GB Samsung SSD, but it would be better if I prepared a larger size SSD. How to install the SSD is detailed in the video above.


Install SW on the Host

Install the software required for the host first. Since JetsonHacks has made the necessary scripts for the job well, I will clone the git he made and use it.


$ git clone https://github.com/jetsonhacks/bootFromExternalStorage.git

$ cd bootFromExternalStorage

$ ./install_dependencies.sh

$ ./get_jetson_files.sh

It may takes several minutes.


Xavier NX Recovery Mode

After installing the SSD, set Xavier NX to Force Recovery mode. To set the Force Recovery Mode, connect pins 9 and 10 among the pins below the SD card slot. In the picture below, a jumper is used, but you can use a breadboard female cable. It is well explained in the video above.

<recovery mode jumper connection from https://www.stereolabs.com/blog/getting-started-with-jetson-xavier-nx/>


USB Connection

Now connect Xavier NX to the x86 host computer.

<USB Connection> 


Bootup the Xavier NX

Connect the power of Xavier NX in force recovery mode. Xavier NX will show a green light. And check the connection status on the host computer as follows. You can check the Xavier NX connected to the USB port with the lsusb command. If it is not confirmed, there is a high possibility that the Force Recovery Mode jumper connection is wrong or the USB cable is bad.


Flashing the Xavier NX

Now run the last script to install the Jetpack 4.6 image to the Xavier NX's SSD.

 ./flash_jetson_external_storage.sh

Running the script will search for connected Xavier NX. And it asks to cancel the Force Recovery mode. You can then remove the jumper cable and continue. 

This work takes about ten minutes. Once this has been done successfully, the host computer is no longer needed.

Then, connect the mouse, keyboard, monitor, and LAN cable to Xavier NX and boot it. Now the last task remains.  This must be done in Xavier NX.

$ git clone https://github.com/jetsonhacks/bootFromExternalStorage.git

$ cd bootFromExternalStorage

./install_jetson_default_packages.sh

     

Wrapping UP

Now reboot Xavier NX and proceed with initial setup. Note that the current Xavier NX does not have an SD card, only an SSD. If the capacity seems to be low due to the unallocated partition on the ssd, install the gparted program to extend the partition.

Now you can use Xavier NX much faster and more reliably than when using an SD card.

I highly recommend reading JetsonHack's blog post as well.

Today we learned how to install an SSD in Xavier NX to get the best hardware performance. In the next article, we will learn how to efficiently use Python, OpenCV, TensorFlow, and PyTorch.






댓글 없음:

댓글 쓰기