Hello, I’m currently working on setting up a bunch of custom things on an NVMe SSD on a jetson-xavier-nx-emmc. I would like to be able to clone all of nvme0n1p1 and flash this onto the other devices for my team. As far as I have been able to research, there is no efficient way to do so. I know the usual ./flash.sh script can’t reach the external NVMe drive when trying to clone or flash. I have seen several posts about using the ./tools/kernal_flash/l4t_initrd_flash.sh script, but everyone seems to run into multiple problems there as well. Is anyone able to give me some instructions for:
Creating an image of the nvme0n1p1 (Very large partition)
Flashing this image onto the nvme0n1p1 of a different jetson-xavier-nx-emmc
Note that currently you have to manually replace mmcblk0 with nvme0n1 in nvbackup_partitions.sh and nvrestore_partitions.sh for this method to work with NVMe SSDs. We’ll add an option for users to select which storage device to clone in the upcoming L4T release.
@DaveYYY
Hello,
I tried altering the nvbackup_partitions.sh script to change all instances of mmcblk0 with nvme0n1. However, I was receiving a message that said Mount: Unrecognized filesystem type ‘swap’. I have the NVMe set up with 16GB of free space, and the rest of it is an ext4 linux filesystem partition in nvme0n1p1. I’m unsure how to fix this issue with the scripts in tools/backup-restore/.
Do you have any advice?
Thank you.
Let us leave alone the question of swap.
I just noticed that your rootfs resides in the eMMC, then backing up your SSD with our tool would be of no use.
Like, what’s inside your nvme0n1p1? If it does not contain the rootfs, it’s not going to boot any other devices.
You should use other tools on Linux that can clone partitions on disks.
Am I missing anything here?
Sorry for the confusion. I currently have the rootfs on the eMMC internal. That is because I was manually copying over the /dev/nvme0n1p1 image file using dd. For our devices, we do want to boot from the NVMe and have the rootfs on nvme0n1p1. The way we have been setting up the NVMe as rootfs is using the github repo rootOnNVMe. I am open to other ways to set the NVMe as the rootfs if you have information on this.
I apologize for being a bit confused. This is my first experience with Jetson products.
I’m not sure, but maybe the swap issue is related to the rootOnNVMe tool you used.
We do provide ways of directly flashing into NVMe SSDs, and you could refer to Workflow 4 in Linux_for_Tegra/tools/kernel_flash/README_initrd_flash.txt.
Okay thank you! I will do some more testing and see what I can find out. For the command above, this is to directly flash the rootfs onto the NVMe drive?
Just to see if I’m understanding correctly. With a fresh xavier nx device, I would follow this procedure:
Use l4t_initrd_flash.sh to flash rootfs to NVMe
Use nvbackup_partitions.sh to create an image of that NVMe drive.
Use nvrestore_partitions.sh to flash the copied image onto a different NVMe drive
Yes, so you don’t have to first flash into eMMC, and do all the bothering stuff to boot from NVMe.
I think you are right about it.
Just to note that nvbackup_partitions.sh and nvrestore_partitions.sh are the underlying scripts that are actually running, but you’d use l4t_backup_restore.sh as kind of like an interface.
Hello, I had a quick question about this command. Does this set up the Jetson Xavier NX to boot from the NVMe? I pulled out a brand new Xavier NX and attempted to flash with this command. However, the rootfs was still on the internal eMMC.
you may still need to manually select the storage device to boot from.
For r32.x, modify extlinux.conf to point to the new root,
for r35, enter UEFI boot menu and change the boot order.