How to flash Jetson Orin NX using Ubuntu Base rootfs

Hello, I’m trying to flash my Jetson Orin NX (p3509-a02+p3767-0000) using Ubuntu Base rootfs (ubuntu-base-20.04.5-base-arm64.tar.gz) that I got from Ubuntu instead of the sample rootfs provided as the size is too big and I would like to have GUI components where I didn’t pick the minimal flavors Nvidia provides. My goal is to generate a massflash package that is the smallest possible size. To reduce the size, I decided to use another rootfs. I’m using the Linux_for_Tegra from jetson_linux_r35.4.1_aarch64.tbz2. So far, I’m having trouble. I’m not sure, it could be that I need some programs in the rootfs that are missing or I need a Linux kernel that’s not included anymore from switching rootfs. Any help in resolving this is appreciated. Thank you for your time.

sudo ./apply_binaries.sh
Pre-installing… skip compatibility checking.
Unpacking nvidia-l4t-core (35.4.1-20230801124926) …
dpkg: dependency problems prevent configuration of nvidia-l4t-core:
nvidia-l4t-core depends on libegl1; however:
Package libegl1 is not installed.
nvidia-l4t-core depends on libexpat1; however:
Package libexpat1 is not installed.
dpkg: error processing package nvidia-l4t-core (–install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
nvidia-l4t-core

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” --showlogs --network usb0 --no-flash --massflash 1 p3509-a02+p3767-0000 internal
gzip: /home/rand/Flash_orn/Linux_for_Tegra/kernel/Image: not in gzip format
_BASE_KERNEL_VERSION=5.10.120-tegra
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/sbin/mtd_debug’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/sbin/mtd_debug /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//bin/mtd_debug
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libwrap.so.0’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libwrap.so.0 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/aarch64-linux-gnu/libwrap.so.0
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libcap.so.2’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libcap.so.2 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/aarch64-linux-gnu/libcap.so.2
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libmnl.so.0’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libmnl.so.0 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/aarch64-linux-gnu/libmnl.so.0
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libdbus-1.so.3’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libdbus-1.so.3 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/libdbus-1.so.3
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libreadline.so.8’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libreadline.so.8 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/libreadline.so.8
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libdevmapper.so.1.02.1’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/aarch64-linux-gnu/libdevmapper.so.1.02.1 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/libdevmapper.so.1.02.1
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libssl.so.1.1’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libssl.so.1.1 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/libssl.so.1.1
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libgssapi_krb5.so.2’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libgssapi_krb5.so.2 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/aarch64-linux-gnu/libgssapi_krb5.so.2
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libkrb5.so.3’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libkrb5.so.3 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/aarch64-linux-gnu/libkrb5.so.3
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libk5crypto.so.3’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libk5crypto.so.3 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/aarch64-linux-gnu/libk5crypto.so.3
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libkrb5support.so.0’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libkrb5support.so.0 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/aarch64-linux-gnu/libkrb5support.so.0
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libcrypto.so.1.1’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libcrypto.so.1.1 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/aarch64-linux-gnu/libcrypto.so.1.1
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libelf.so.1’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libelf.so.1 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/aarch64-linux-gnu/libelf.so.1
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libbsd.so.0’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/aarch64-linux-gnu/libbsd.so.0 /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/aarch64-linux-gnu/libbsd.so.0
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd.ko’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd.ko /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd.ko
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtdblock.ko’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtdblock.ko /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtdblock.ko
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd_blkdevs.ko’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd_blkdevs.ko /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/mtd/mtd_blkdevs.ko
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/devices/qspi_mtd.ko’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/mtd/devices/qspi_mtd.ko /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/mtd/devices/qspi_mtd.ko
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/spi/spi-tegra210-qspi.ko’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/lib/modules/5.10.120-tegra/kernel/drivers/spi/spi-tegra210-qspi.ko /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/spi/spi-tegra210-qspi.ko
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/modules/5.10.120-tegra/kernel/drivers/net/ethernet/realtek/r8168.ko’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/lib/modules/5.10.120-tegra/kernel/drivers/net/ethernet/realtek/r8168.ko /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//lib/modules/5.10.120-tegra/kernel/drivers/net/ethernet/realtek/r8168.ko
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/etc/ssh/sshd_config’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/etc/ssh/sshd_config /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//etc/ssh/sshd_config
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/sbin/sshd’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/sbin/sshd /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//bin/sshd
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/bin/ping’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/bin/ping /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//bin/ping
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/sbin/dhclient-script’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/sbin/dhclient-script /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//sbin/dhclient-script
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/bin/ip’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/bin/ip /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//bin/ip
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/bin/scp’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/bin/scp /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//bin/scp
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/bin/xxd’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/usr/bin/xxd /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//bin/xxd
cp: cannot stat ‘/home/rand/Flash_orn/Linux_for_Tegra/rootfs/bin/kmod’: No such file or directory
warning: cp -f /home/rand/Flash_orn/Linux_for_Tegra/rootfs/bin/kmod /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//bin/kmod
sed: can’t read /home/rand/Flash_orn/Linux_for_Tegra/bootloader/ramdisk_tmp//etc/ssh/sshd_config: No such file or directory
command is failed
Error: /home/rand/Flash_orn/Linux_for_Tegra/bootloader/signed/flash.idx is not found
Error: failed to relocate images to /home/rand/Flash_orn/Linux_for_Tegra/tools/kernel_flash/images
Cleaning up…

I think I’ve replied in your previous topic.
Only the three rootfs flavor (basic, minimal, desktop) have been verified by us, and meet the dependencies of other packages in the L4T BSP. For example, nvidia-l4t-core, in your case.
Please be note that we don’t verify other stuff like ubuntu-base-20.04.5-base-arm64.tar.gz from Canonical.

If you do need a rootfs that is smallest in size, but you also want GUI enabled, start from the basic flavor, and add all dependencies of the ubuntu-desktop-minimal.

The previous topic is more about making masflash package. Here, I’m talking about an optimal rootfs with GUI only. So, I should use basic and manually add the GUI stuff to it from desktop, right?

YES.
You may have to figure out what packages are really needed, and what can be removed by yourself.

I’m having trouble running the script to create default user for the process of using basic rootfs. Am I doing something wrong?

sudo ./l4t_create_default_user.sh -u nvidia -p NDZjMWM4
ERROR: Cannot find the Tegra software license agreement

You have to first run sudo ./apply_binaries.sh.

1 Like