How to Add a Swap Partition on Jetson TX1
Adding a swap partition to Jetson TX1 running L4T R24.2.1 is pretty straightforward, since swap support (CONFIG_SWAP) is already enabled in the Linux kernel. On my own Jetson TX1 development board, I use a 16GB USB 3.0 flash drive as the swap device. Here’s how I configure the Jetson TX1 system to turn on swap automatically at each reboot.
- Make sure the USB flash drive is partitioned properly. In my case, the USB flash drive appears on the system as /dev/sda and I have only 1 partition (/dev/sda1) on it.
- Run
mkswap
to format the partition (/dev/sda1) as swap. - Create an entry in /etc/fstab for the swap partition. Note it’s suggested to use UUID, instead of /dev/sda1, to identify the swap partition in /etc/fstab.
- Reboot the system, and the swap partition should be turned on autamatically. You can verify it with
swapon -s
.
More specifically here’s how it looks like when I run those commands on Jetson TX1.
Reference: How do I add a swap partition after system installation?