How To Flash Jetson Orin NX Offline Without Using NFS server

I am developing a Dockerfile that makes a custom massflash archive for Jetson Orin NX. When the Dockerfile actually gets to the step of running the flash script to create the massflash package, I run into errors related to NFS. NFS Server is something I would like to avoid in creating the massflash package. Any help in fixing this is very apricated. Thank you for your time.

#34 [orin-flash-i  9/10] RUN mkdir -p /etc/udev/rules.d/

#34 DONE 0.1s



#35 [orin-flash-i 10/10] RUN --security=insecure     cd Linux_for_Tegra &&     BOARDID=3767 FAB=300 BOARDSKU=0000 ./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

#35 0.100 /home/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh --no-flash --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

#35 0.123  * Stopping NFS kernel daemon

#35 0.126    ...done.

#35 0.126  * Unexporting directories for NFS kernel daemon...

#35 0.127    ...done.

#35 1.146  * Not starting NFS kernel daemon: no exports.

#35 1.157 exportfs: /home/Linux_for_Tegra/rootfs does not support NFS export

#35 1.157 Cleaning up...

#35 ERROR: process "/bin/sh -c cd Linux_for_Tegra &&     BOARDID=3767 FAB=300 BOARDSKU=0000 ./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" did not complete successfully: exit code: 1

------

 > [orin-flash-i 10/10] RUN --security=insecure     cd Linux_for_Tegra &&     BOARDID=3767 FAB=300 BOARDSKU=0000 ./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:

0.100 /home/Linux_for_Tegra/tools/kernel_flash/l4t_initrd_flash_internal.sh --no-flash --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

0.123  * Stopping NFS kernel daemon

0.126    ...done.

0.126  * Unexporting directories for NFS kernel daemon...

0.127    ...done.

1.146  * Not starting NFS kernel daemon: no exports.

1.157 exportfs: /home/Linux_for_Tegra/rootfs does not support NFS export

1.157 Cleaning up...

------

OrinFlash.Dockerfile:181

--------------------

 180 |     # Generation of Orin Package

 181 | >>> RUN --security=insecure \

 182 | >>>     cd Linux_for_Tegra && \

 183 | >>>     #BOARDID=3668 BOARDSKU=0001 FAB=100 BOARDREV=N/A ./tools/kernel_flash/l4t_initrd_flash.sh --no-flash --massflash 5 --network usb0 jetson-xavier-nx-devkit-emmc mmcblk0p1

 184 | >>>     BOARDID=3767 FAB=300 BOARDSKU=0000 ./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

 185 |     

--------------------

ERROR: failed to solve: process "/bin/sh -c cd Linux_for_Tegra &&     BOARDID=3767 FAB=300 BOARDSKU=0000 ./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" did not complete successfully: exit code: 1

The whole initrd flashing mechanism relies on NFS server.
You won’t be able to avoid it.

OK I understand that it’s required. How would I go about fixing this error then? I added the required package (nfs-kernel-server) before I decided to avoid it on the Ubuntu base image in the Dockerfile to at least get it working. Even with that I get the same error shown above.

Maybe something like this:

The website didn’t work out for me. This other question posted here is similar to my situation. I’m not clear how it was solved. Rootfs does not support NFS export - Jetson & Embedded Systems / Jetson Orin NX - NVIDIA Developer Forums

I think you should put the BSP in the filesystem of your host OS.

I have not used massflash, so I know very little about that. I also don’t know what is being solved by using Docker. However, it is usually the Linux kernel which doesn’t support NFS export, or perhaps it is using a non-Linux filesystem type that doesn’t support NFS export. If NFS is only a tool for the initrd flash, and we are not talking about NFS on the running Jetson, I would tend to think that the kernel used in Docker on the host PC is what is lacking NFS abilities. Don’t know, but consider that it is likely your kernel is lacking NFS ability, and that this is a temporary requirement (I can’t say for sure, I am not familiar with massflash).

The NFS is for the initrd flash to work inside the image building process (content of Dockerfile) only. So, you’re saying that it’s possible the kernel I’m configuring in the image building process needs to have NFS capabilities, right? I just want the script below to work to generate Orin flash archive offline in the Dockerfile image building process. The purpose of using Dockerfile to make the archive instead of running the command on host Linux PC is to use a custom rootfs along with other personalized configurations.

BOARDID=3767 FAB=300 BOARDSKU=0000 ./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

1 Like

Yes, it is possible the the kernel in the image building is what needs NFS support. Any kind of NFS operation requires (A) the kernel to support that release of NFS (e.g., ver. 3 or ver. 4), and (B) the filesystem would likely need to be a Linux filesystem (I doubt NTFS or VFAT would work). The running Jetson system itself, after flash, is not going to require NFS to boot (at least not unless you are setting it up for network boot). I just don’t know enough about massflash and Docker to give you more information, I’m just going by NFS v3 or NFS v4 requirements.

OK. Thanks. Another problem could be that I’m not using a rootfs from Nvidia as I’m using one from Ubuntu Base and adding extra packages needed.

There could be other problems, but if this is an ext4 filesystem, then the filesystem itself would not be an issue. There might be missing libraries or other support required by the kernel. The kernel itself might also be missing features (restating the previous example, there is a v3 version and v4 version, and the wrong one…or none…would cause a failure).

One test is to use another computer and find out if that computer can import the NFS system. Then you’d know that the host is exporting NFS correctly. If there are features you find you need to enable, or packages to add when getting that other computer to mount the export computer’s content, consider that you’d need this on the Jetson as well. Once you know everything needed for a more standard Linux PC to import the exported NFS you could have confidence that everything remaining is from the Jetson end.

@DaveYYY @linuxdev I found out that this problem is from the Dockerfile image. This has nothing to do with massflash, kernel config, etc. I just need to configure NFS server in the Dockerfile container properly for the initrd flash script to work which is something I’m still stuck at. Assuming you are familiar with Dockerfile, this is what I need your help in to get that jetson script working when I build the Dockerfile. I tried both links provided here and it didn’t work out unfortunately. Thank you for your time.

randy@linux:~/src $ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
moby/buildkit buildx-stable-1 be698b50dea4 2 months ago 172MB

I added the line below to the Dockerfile and it still didn’t work as I’m getting the same NFS message.

RUN echo “/home/Linux_for_Tegra/rootfs *(rw,sync,no_subtree_check,no_root_squash)” > /etc/exports

Unfortunately Docker is something I’m unable to help with due to lack of knowledge.

See this work around

If you use SD card for your Jetson Orin NX, you can also use

sudo flash.sh p3509-a02+p3767-0000 internal

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