Jetson Orin Nx OverlayFs

Hi there,

I am trying to setup overlayfs to create a read only root filesystem on a Jetson Orin Nx using a custom carrier board AIR6N0-C-MB NX 4×GMSL2 ( PCI-e ).

The Jetson Orin Nx has the following flashed onto the NVME (provided by the supplier):
OS: Ubuntu “20.04.6 LTS (Focal Fossa)”
L4T 35.4.1
Ubuntu 20.04.6 LTS
Kernel Version: 5.10.120-tegra
nvidia-jetpack 5.1.2-b104

I have tried various approaches I have found through forums and articles but none of them have worked on this setup. The more promising looking approaches:

overlayfs for Jetson - Jetson & Embedded Systems / Jetson Nano - NVIDIA Developer Forums
The solution to use the scripts provided in looks promising but I get the following error running the install script:GitHub - lehni/root-ro: Read-only root filesystem for Raspbian Stretch and Jetson Nano (using OverlayFS)

Updating initramfs…
update-initramfs: Generating /boot/initrd.img-5.10.120-tegra
W: Couldn’t identify type of root file system for fsck hook

Running any of the commands to swap between rw and ro result in the following error messages (e.g. running sudo ./mount-rw ):
mount: /mnt/root-ro: mount point does not exist.
mount: /mnt/root-ro/run: mount point does not exist.
mount: /mnt/root-ro/dev: mount point does not exist.
mount: /mnt/root-ro/proc: mount point does not exist.
chroot: cannot change root directory to ‘/mnt/root-ro’: No such file or directory

Clearly it has not installed correctly but I am bit lost as to what I can do start trying to fix this issue. If I opt for blind optimism and run the root/reboot-ro script then the device does reboot and none of the peripheral devices plugged into the Jetson work which leads me to believe it does enable some of the overlayfs but needs a small tweak to fix it. Using SSH I can access the device through CLI but then the changes I make (e.g. creating files) still persist through reboots so the ro is not correctly setup.

The other promising approach to setup Overlayfs is provided in GitHub - forecr/jetson_overlayroot: Overlayroot File-System for Jetson modules
Running the setup for this repo results in the error as above but additionally I get the following when the script attempts to create symbolic links between files:
/bin/ln: failed to create symbolic link ‘sbin/modprobe’: File exists
/bin/ln: failed to create symbolic link ‘bin/sh’: File exists

Looking up fixes to these errors has not helped direct me towards a solution.

Unfortunately according to the supplier upgrading to Jetpack 6.1 or re-flashing the board would cause problems with their carrier board thus, solutions involving these steps are not possible for me.

If anyone has advice they could offer setting up Jetson Orin NXs to be RO or potential fixes to these scripts it would be greatly appreciated.

Best Regards

Hi,
We would suggest upgrade to Jetpack 61 and follow the developer guide:

Root File System — NVIDIA Jetson Linux Developer Guide 1 documentation

Hi,
For setting up read-only rootfs, you may try this:
Orin readonly rootfs - #6 by KevinFFF

Please note after rebooting, you cannot change it back since /etc/fstab becomes read-only.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.