JetConfig is a command-line interface (CLI) tool designed to streamline the configuration of an SSD on your NVIDIA Jetson Orin Nano Developer Kit. It also optimizes Docker to use the SSD and provides memory optimization options for a lean system.
All steps are according to the official Jetson Setup Guide.
- Formats and mounts an SSD
- Configures
fstabautomatic SSD mounting - Installes
nvidia-container(if not already installed) and configures Docker to use the NVIDIA runtime - Migrates Docker's data directory (
/var/lib/docker) to the SSD - (Optional) Enables memory optimization by disabling GUI, specific services, and configuring a swap file on the SSD
- An NVIDIA Jetson Orin Nano (Super) Developer Kit
- An unformatted or empty NVMe SSD
- JetPack 6.2 is running on the device (See Initial Setup)
- SSD is physically installed to the carrier board
To use JetConfig, simply clone this repository and run the script
-
Clone the Repository: Open a terminal on your Jetson and run:
git clone https://github.com/JoshuaWellbrock/jetconfig.git cd jetconfig -
Make the script executable (if not already): The script should already be executable, but in case it isn't just run:
chmod +x jetconfig
-
Run the script To run the script you must specify the SSD device. You can find available devices using
lsblk. The Output should look something like this:NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 16M 1 loop mmcblk1 179:0 0 59.5G 0 disk ├─mmcblk1p1 179:1 0 58G 0 part / zram0 251:0 0 1.8G 0 disk [SWAP] zram1 251:1 0 1.8G 0 disk [SWAP] zram2 251:2 0 1.8G 0 disk [SWAP] zram3 251:3 0 1.8G 0 disk [SWAP] nvme0n1 259:0 0 238.5G 0 disk
If you have found your SSD device you can then simply run:
./jetconfig -d /dev/nvme0n1
⚠️ The-dargument points to the entire disk and running this tool will FORMAT and ERASE ALL DATA on that device. You have to confirm this operation after starting the script.Available Options:
-d, --device <device>: (Required) Specify the SSD device (e.g.,/dev/nvme0n1). Runlsblkto find available devices.-mp, --mounting-point <path>: Specify the mounting point (default:/ssd).-m, --memory-optimization: Enable memory optimization (this will disable GUI, disbale misc services and mount swap, disable ZRAM).-h, --help: Show this help message.
- Docker Group: After running the script, you may need to log out and log back in for Docker commands to work without
sudo(due to being added to thedockergroup). - GUI: If you enabled memory optimization, the GUI will be disabled on next reboot. To re-enable the GUI (if needed), run:
sudo systemctl set-default graphical.target /var/lib/docker.old: The old Docker data directory at/var/lib/docker.oldcan be safely removed to free up space after you've verified Docker is working correctly with the SSD. To remove the old data directory, simply run:sudo rm -rf /var/lib/docker.old
To verify that Docker is correctly working with the SSD you can open up two Terminal windows.
- In the first terminal run
watch -n1 dfto monitor the disk usage. - In the second terminal run
docker pull hello-world - Back in the first terminal you should be able to see that the usage on
/ssdis increasing