Flashing ROOTFS backup to Jetson Xavier NX fused board

Hi,

I’ve some questions and problems.

I would like to export a rootfs from a jetson xavier NX board and reflash him with the flash command.

How i get my rootfs ? For that, i flash a non-fused board and delete all i don’t need.
Next to export the rootfs, i use rsync command like bellow :

sudo rsync -avczr --numeric-ids --exclude={"/dev/","/proc/","/sys/","/tmp/","/run/","/mnt/","/media/*","/lost+found"} -e 'ssh' --delete-before root@172.x.x.x:/ /local/dev/photon-5.1.1/nvidia_sdk/JetPack_5.1.1/Linux_for_Tegra/rootfsClean

Without disk encryption, the flash complete successfully and board reboot but when i flash with it, the board say after boot :

nothing to read on input 
ERROR: fail to unlock the encrypted dev /dev/mmcblk0p2

If i export rootfs from fused board with disk encryption enable, the flash command end wrong with some problem in /boot folder and maybe elsewhere

Can’t create symlink in this folder, the symlink already exist

If i delete manualy the symlink, the flash command work but still have the error on unlock dev…

Have you some recommandation or help that i can follow ?

Thank you in advance

Which JNX do you have? a developer kit or mass production module?

Hi @Mt.Hiker

i have a devkit with a jetson xavier nx.
I don’t want to backup the entire image but just the rootfs for redeploy.

i try to clone rootfs flashed on emmc board

I wonder this command helps in your case. It is to copy rootfs from the primary boot device to new storage.
New target is a NVMe.

sudo mount /dev/nvme0n1p1 /mnt
sudo rsync -axHAWX --numeric-ids --info=progress2 --exclude={"/dev/","/proc/","/sys/","/tmp/","/run/","/mnt/","/media/*","/lost+found"} / /mnt

Personnaly i don’t want to backup on external media.

I use rsync to send the rootfs backup (ssh) on my computer with nvidia tools.
Next i flash an other card with this backup.

With the command you suggest, the error persist and still block me to restore my rootfs

Linux_for_Tegra/rootfsClean/boot/extlinux/extlinux.conf is not found, exiting…

Have you an other idea ?

Thank’s

Hi romain.lesne,

You could refer to the following instruction to clone/restore the APP partition of your eMMC, which is also the rootfs.
Flashing Support — To clone a Jetson device and flash

Hi,

Thank you but in case of encrypted disk, we can’t reuse this backup because flash command use rootfs to create another encrypted img file. If each device have an unique key for disk encryption we can only backup with rsync ? This work fine in JetPack 4 but in Jetpack5 doesn’t.

Best regards,

1 Like

After some tests i decide, for now, to stop try to backup my rootfs and try another method.

I make a “Minimal Flavor Root File System” with help in guide : Root File System — Jetson Linux<br/>Developer Guide 34.1 documentation

After generate my samplefs, i untar with this command :

 sudo tar xvf samplefs.tar.gz --preserve-permissions --same-owner

Next i flash with this command :

sudo ./flash -R ../Linux_for_Tegra/samplefs/ jetson-xavier-nx-devkit internal

The result is same.

Making system.img…
/JetPack_5.1.1/Linux_for_Tegra/samplefs/boot/extlinux/extlinux.conf is not found, exiting

The problem persist… but i use tools by nvidia and procedure… Did i forgot something ?

Thank’s

Sorry, I’m not clear about what do you mean here. Have you tried if it would work with your encrypted disk on JP5?

The minimal root file system is the basic root file system that is used for NVIDIA Jetson develop kits.
Are you using the devkit or custom board for Xavier NX?

Hi,

Thanks for your help.
My issue was with a package I removed in my rootfs. The consequence is that the nvidia luks package is not in /usr/sbin and causes a boot failure caused by not being able to decrypt the disk

For more about that check this : Package Manifest — Jetson Linux<br/>Developer Guide 34.1 documentation

If you don’t remove this package, could your board boot up successfully?

Could you provide the serial console log of boot failure for further check?

Just some random thoughts, no specific order…

Minor thought: This is good, but you might consider “--numeric-owner”, which is possibly better. Numeric ID is quite robust compared to a lot of other methods (in combination with the option to preserve permissions).

Don’t forget that if your sample rootfs does not contain the NVIDIA content, that you’ll also need to run:
sudo ./apply_binaries.sh

I’ve not run flash naming an alternate sample rootfs location, but consider that on a normal command line flash some “rootfs/boot/” content is copied in before image generation based on what target is specified, including an extlinux.conf. You could run a log of a normal flash, and try to manually copy that content into your alternate location before flashing (just example parameters for an SD card model, adjust for your case…this is to show logging):
sudo ./flash.sh jetson-xavier-nx-devkit mmcblk1p1 2>&1 | tee log_flash.txt

Look what gets copied in. Then run whatever flash you were using with the same logging. Append this:
sudo .... 2>&1 | tee log_alt_flash.txt

Compare what is or is not copied ahead of time for kernel/extlinux so on.

1 Like

Yep, if i not remove this package, the board boot up successfully.

I do not have the serial console log near me but if this package dont be remove, no problem could be found

Thank’s

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