loog

Jetson Xavier NX-Run from SSD

May 26, 2020

Jetson hacks に、早速、Jetson Xavier NX を SSD で動作させる ガイドが出ています。

Jetson Xavier NX – Run from SSD
https://www.youtube.com/watch?v=ZK5FYhoJqIg

Github はこちら
https://github.com/jetsonhacks/rootOnNVMe

今回もやはり、Boot のために、microSD カードは、刺しておく必要があります。

SSD

Jetson xavier nx の M.2 は Key M なので、NVMe SSD を使用できます。

ガイドでも、実際に M.2 の NVMe SSD を使用しています。

youtube で紹介されている商品は、以下の2つです。

Western Digital NVMe SSD: https://amzn.to/3fGWjeN
Samsung NVMe SSD (faster): https://amzn.to/2ZcdtLk

SSD のフォーマットなど

SSD のフォーマット

SSDを接続し、Disks を使用します。

Fomat > Compatible with modern systems and hard disks

Add a partition

動画では、念の為、 16GB を開けていました。

Volume label をつける

Type は ext4 を選択する!

github の rootOnNVMe を使用する

https://github.com/jetsonhacks/rootOnNVMe

動画では、 15W 6CORE mode にしていました。

git clone https://github.com/jetsonhacks/rootOnNVMe
cd rootOnNVMe
./copy-rootfs-ssd.sh
./setup-service.sh
sudo reboot

UPGRADE に関する注意事項

Once this service is installed, the rootfs will be on the SSD. If you upgrade to a newer version of L4T using OTA updates (using the NVIDIA .deb repository), you will need to also apply those changes to the SD card that you are booting from.

Typically this involves copying the /boot* directory and /lib/modules// from the SSD to the SD card. If they are different, then modules load will be ‘tainted’, that is, the modules version will not match the kernel version.

とあります。

upgrade した際に、SSD の内容と、microSD の内容が不一致を起こすと良くないようです。
手動でコピーするなどして、一致させる必要があるということでしょうか。

実際にやってみる

動画で紹介されていた、サムスンのSSDにしました。

  1. SSD接続
  2. 起動
  3. Disks から フォーマット – Compatible にする
  4. パーティション作成 – Free space 16GB – Volume name NVMe SSD 250GB – EXT4
  5. rootOnNVMe 実行
  6. reboot!

確認

左のバーに、microSDが外部デバイスとして表示されていることと、
df コマンドの結果で確認しました。

$ df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
none           devtmpfs  3.5G     0  3.5G   0% /dev
tmpfs          tmpfs     3.8G  4.0K  3.8G   1% /dev/shm
tmpfs          tmpfs     3.8G   21M  3.8G   1% /run
tmpfs          tmpfs     5.0M  4.0K  5.0M   1% /run/lock
tmpfs          tmpfs     3.8G     0  3.8G   0% /sys/fs/cgroup
/dev/nvme0n1p1 ext4      214G   34G  169G  17% /
tmpfs          tmpfs     778M  112K  778M   1% /run/user/1000
/dev/mmcblk0p1 ext4       59G   34G   22G  61% /media/kiyo/239f3029-4825-443b-972e-4392c57f5749

これで、爆速の Jetson xavier nx の誕生です!