I currently have a Jetson Orin Nano Devkit with a custom-built kernel (natively) and the necessary build setup (Bazel) for my application code. I want to create a proper backup clone of this setup to use on my custom board. While I can successfully clone using the backup and restore method, it takes a partition-wise backup, which limits my ability to modify or add device tree files (DTBs). Additionally, if my custom board has an NVMe of a different size, it could cause issues. Could someone suggest a reliable method to create a clone of my JetPack 6 setup on the Jetson Orin Nano Devkit, so that I can add my own DTSI files in the future and ensure compatibility with a custom board?
I followed the method outlined in NVIDIA’s documentation for cloning the root filesystem and successfully created the system.img.raw
file. However, when I try to mount it on my host PC, I encounter the following errors:
sreeja@sreeja-IdeaPad-Flex-5-14IAU7:~/Desktop$ sudo mount -o loop system.img.raw /mnt/rootfs
[sudo] password for sreeja:
mount: /mnt/rootfs: mount point does not exist.
sreeja@sreeja-IdeaPad-Flex-5-14IAU7:~/Desktop$ sudo mkdir -p /mnt/rootfs
sreeja@sreeja-IdeaPad-Flex-5-14IAU7:~/Desktop$ sudo mount -o loop system.img.raw /mnt/rootfs
mount: /mnt/rootfs: wrong fs type, bad option, bad superblock on /dev/loop15, missing codepage or helper program, or other error.
I’m unsure how to debug this further. My suspicion is that I used a 500GB NVMe for my Jetson devkit, but the backup of the system.img.raw
was stored on a 64GB Sandisk USB drive. I’ve read in several places that the USB storage should be larger than the NVMe storage on the devkit. However, my system.img.raw
file is only 4.3GB in size. Could you help me understand where I might have gone wrong?
Hi sreejaguguloth11,
Please refer to Case 12: rootfs A/B disabled, disk encryption disabled of 4. Using golden image in OTA update in Image_based_OTA_Examples.txt.
There’re the steps to create golden image from your current rootfs and you should be able to mount that raw image.
hello @KevinFFF
Sorry for the late response. I’m currently not near the device but will check as soon as I can. My NVMe is 500GB, though I haven’t used much of it, and my SanDisk USB drive is 64GB. I’ve heard that the USB device should ideally be larger than the NVMe for cloning. When I tried to clone the system.img
, it was only 4.3GB, so could you confirm if a 64GB USB drive would be sufficient in this case?
From that workflow, you would need a USB storage to store the clone.img.raw and it should be fine if the image is smaller than USB drive(64GB).
Hello Kevin,
I have followed your suggestions and completed the necessary steps for the image-based OTA process. Below is a detailed update on my progress:
-
Research and Tool Setup:
Initially, I could not find theImageBased_OTA_Examples.txt
file in the Linux for Tegra folder. After some research, I discovered that NVIDIA provides a separate tool for OTA updates, which can be downloaded from their official website for Jetson Linux 36.3. You can find it here: OTA Tools for Jetson Linux R36.3. -
Fresh BSP Package and RootFS Setup:
To ensure everything was set up correctly, I downloaded a fresh BSP package and the sample rootfs. I followed the instructions in the Quick Start Guide here, extracted the OTA tools, and ran theapply_binaries.sh
script. I then ran theinitrd
command as per your instructions:sudo ./tools/kernel_flash/l4t_initrd_flash.sh --initrd jetson-orin-nano-devkit nvme0n1p1
-
SSH Connection Issue:
After booting the device into initrd, I attempted to SSH into the device using the provided command but received the following warning about a changed host key:WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
To resolve this, I ran:
ssh-keygen -f "/home/sreeja/.ssh/known_hosts" -R "fc00:1:1::2"
This allowed me to successfully SSH into the device after accepting the new key:
Warning: Permanently added 'fc00:1:1::2' (ED25519) to the list of known hosts.
-
Golden Image Creation:
Once inside the device, I mounted the USB drive to/mnt
and ran thedd
command to create the golden image. However, I encountered an issue where thesudo
command was not available, so I ran thedd
command without it:dd if=/dev/nvme0n1p1 of=/mnt/golden.img.raw
Despite the “File too large” warning, the command completed successfully:
8388608+0 records in 8388607+1 records out 4294967295 bytes (4.3 GB, 4.0 GiB) copied, 453.348 s, 9.5 MB/s
-
Next Steps:
I now have the golden image (golden.img.raw
). I’m unsure of the next steps—should I copy the image to theTARGET_BSP
directory and proceed with generating the OTA package as outlined in your instructions? Any clarification on this would be appreciated.
Thank you for your help. I look forward to your advice on how to move forward.
Best regards,
Sreeja
You can also just use serial console to run the command to clone the image.
I think this golden.img.raw can be mounted from your host and you can customize it.
After that, you can follow the rest steps to create OTA payload to update on your device.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.