Setting Up Your File System

NVIDIA® Jetson™ Linux requires a root file system. You must create a Linux host system and copy it to your reference board.

Sample Root File System

NVIDIA Jetson Linux Driver Package (L4T) comes with a pre-built sample root file system created for the NVIDIA Jetson developer kits. If you want to create an Ubuntu sample root file system, see:
The sample root file system is provided as a convenience. NVIDIA disclaims any obligations to provide support, including bug fixes and security updates, and provides no warranty for this software.
Customers are responsible for root file system selection and support.
NVIDIA provides a tool to generate a root filesystem. To use the tool, go to Navigate to the tools/samplefs directory of the extracted NVIDIA driver package:
$ cd <your_L4T_root>/Linux_for_Tegra/tools/samplefs
Execute the script
$ sudo ./ --abi aarch64 --distro ubuntu --version bionic
To see an explanation of the parameters, enter the script name alone. (You need not use sudo.) Because the command is used exactly as shown, though, you need not understand the parameters to use it.
This script downloads the base image, extracts the root filesystem, downloads and installs all required packages, and compresses the root filesystem directory to a tarball. It may take several hours to run. depending on the Internet speed of your host machine.

Setting Up the Root File System

Before booting the target board, configure the root file system (rootfs) to:
Set up the rootfs
Copy it to the rootfs on the device

Step 1: Set Up the Root File System

This procedure uses the sample file system provided by NVIDIA as the base. If you wish to use your own file system, set the LDK_ROOTFS_DIR environment variable to point to the location of your rootfs and skip the steps for setting the root file system.
To set up the rootfs
1. Download the following file to your home directory:
This file contains the NVIDIA-provided sample root file system.
2. Extract the compressed file as follows:
Navigate to the rootfs directory of the extracted NVIDIA driver package.
$ cd <your_L4T_root>/Linux_for_Tegra/rootfs
Where <your_L4T_root> is your L4T root directory, which is assumed to be your home directory (~).
Extract the sample file system to the rootfs directory.
$ sudo tar -jxpf ../../Tegra-Linux-Sample-Root-Filesystem_<release_type>.tbz2
3. Run the script to copy the NVIDIA user space libraries into the target file system.
$ cd ..
$ sudo ./
4. If you are using a different rootfs, or if you have already configured your rootfs, apply the NVIDIA user space libraries by setting the LDK_ROOTFS_DIR environment variable to point to your rootfs. Then run the script, as shown above, to copy the binaries into your target file system.
If the script installs the binaries correctly, the last message output from the script is “Success!”.
You have now completed setting up the root filesystem. Proceed to flash the rootfs onto the target SoC device.

Step 2: Copy the rootfs to the Device

Use these procedures to copy the file system to the SoC device.
1. Pick a device to place your rootfs.
If you are using the internal EMMC, skip ahead to Flashing and Booting the Target Device.
2. If you prefer to use an external storage device for the root filesystem, use the following procedure.
To copy the file system to an external storage device
1. Plug your rootfs device into the host system.
2. If your device is not formatted as Ext4, enter the following command to format it with an Ext4 file system:
$ sudo mkfs.ext4 /dev/sd<port><device_number>
<port> is the port to which your device is mounted.
<device_number> is the device number of the device attached to the port. You can use the dmesg command to determine the port.
3. If needed, mount your device with the following command:
$ sudo mount /dev/sdX1 <mntpoint>
Where <mntpoint> is the mount point on the host system for your rootfs device.
4. Copy the file system. If LDK_ROOTFS_DIR is set, execute these commands:
$ sudo cp –a * <mntpoint> && sync
5. If it is not set, copy the rootfs directory that is included in the release by executing the following commands:
$ cd <your_L4T_root>/Linux_for_Tegra/rootfs
$ sudo cp –a * <mntpoint> && sync
6. After copying the content to the external disk or device, unmount the disk and connect it to the target SoC device.