Problems about flashing to nvme

I have flashed the system to nvme using bootFromExternalStorage(you can find it on github) and installed many packages. Now,I want to backup the system and restore it to a new Jetson Xavire NX.I back up the system using command “dd”.when I try to restore it by bootFromExternalStorage,it notice me that the spare is not enough.It looks like that it will first install in emmc and then copy system files to the ssd.The emmc size is 16 GB , ssd 128GB, back-up img 25GB.So,how can i solve this probelm?

We don’t know how does that bootFromExternalStorage implements. Maybe you can ask them on their github.

From my point of view, dd is able to select the destination. So likely you chose the emmc.

Hi,thanks for your reply.
I tried to restore it to the new ssd using command “dd” directly,but it cannot boot(show “failed to mount /mnt”).
I also tried the offical solution(https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/flashing.html#wwpID0E06K0HA),and it can not boot still.
Is there any solution to flash my own system.img to nvme?

  1. Can you describe which “official solution” are you using?

  2. Can you share the full log from uart console so that we can see why you cannot boot up?

Question 1.
Flashing to an NVMe Drive
To set up an NVMe drive for booting

1.Connect the NVMe drive to the host computer.

2.Check the NVMe drive’s device name (e.g. /dev/nvme0n1):

$ lsblk -d -p | grep nvme | cut -d\ -f 1

Note that there must be two spaces after the ‑d.

3.Create a new GPT:

$ sudo parted /dev/ mklabel gpt

Where is the device name that your host computer assigns to the NVMe drive.

For example, if the host computer assigns the NVMe drive device name nvme0n1, the command is:

$ sudo parted /dev/nvme0n1 mklabel gpt

4.Add the APP partition:

$ sudo parted /dev/ mkpart APP 0GB

Where is the size of the partition. It must be at least 16 GB. It may be larger if the NVMe drive has enough space.

For example, if is nvme0n1 and the partition is to contain 16 GB, enter:

$ sudo parted /dev/nvme0n1 mkpart APP 0GB 16GB

The device name of the APP partition is then /dev/p1.

5.Format APP as an ext4 partition and mount it.

$ sudo mkfs.ext4 /dev/p1

$ sudo mount /dev/p1 /mnt

You may format APP as ext2 or ext3, but ext4 is strongly recommended because it is faster, more compact, and more reliable.

6.For Jetson Nano using an SD card: Download the Jetson payload updater script, l4t_payload_updater_t210.py from the NVIDIA Developer web site’s L4T 32.5 Archive to the Linux_for_Tegra directory. Then copy the file to its final location and make it executable:

$ cd Linux_for_Tegra/

$ sudo cp <l4t_payload_updater_t210.py> rootfs/usr/sbin/l4t_payload_updater_t210

$ sudo chmod a+x rootfs/usr/sbin/l4t_payload_updater_t210

For Jetson Nano using eMMC memory, and for other Jetson devices, skip this step.

7.Put the Jetson device into recovery mode, then enter the following commands to generate the rootfs without flashing the device:

$ sudo BOOTDEV=nvme0n1p1 ./flash.sh --no-flash nvme0n1p1

$ sudo mkdir tmp_system

$ sudo mount bootloader/system.img.raw ./tmp_system

$ sudo rsync -axHAWX --numeric-ids --info=progress2 --exclude=/proc ./tmp_system/ /mnt

Where nvme0n1p1 is the device name that the Jetson device will assign to APP.

8.Unmount the NVMe drive and disconnect it from the host computer:

$ sudo umount /mnt

$ sudo umount ./tmp_system

9.Plug the NVMe drive into the target device and power on.

Question 2

  1. Please do not copy the whole document… just telling me which section you are referring is sufficient.

  2. This is not uart serial console. Please refer to this page to know how to dump this log.

I do it as follow steps.

1.Use SDKManager to flash the system to EMMC.

2.Put the Jetson device into recovery mode again, then enter the following commands to generate the rootfs(I add some files for test) without flashing the device
$ sudo BOOTDEV=nvme0n1p1 ./flash.sh --no-flash jetson-xavier-nx-devkit nvme0n1p1

3.Copy system.img to my USB flash disk

4.Plug the NVMe drive and USB flash disk into the target device and power on.

5.Create a new GPT ,Add the APP partition, and Format APP as an ext4 partition and mount it.
$ sudo mkfs.ext4 /dev/nvme0n1p1
$ sudo mount /dev/nvme0n1p1 /mnt

  1. copy the files to nvme0n1p1
    $ sudo mkdir tmp_system
    $ sudo mount ./system.img.raw ./tmp_system
    $ sudo rsync -axHAWX --numeric-ids --info=progress2 --exclude=/proc ./tmp_system/ /mnt

7.Unmount the NVMe drive
$ sudo umount /mnt
$ sudo umount ./tmp_system

8.modify /boot/extlinux/extlinux.conf

Which jetpack release are you using now?

What did you modify in extlinux.conf?

jetpack 4.6.1.
actually it boots from ssd,and i just want to confirm it.I flash the system to both emmc and ssd in another xavier nx,so i always change the boot sequence.

But the boot sequence is in the cboot but not extlinux.conf.

It works when I modify the extlinux.conf in another xavier nx.
Howerver, it can not boot in this xavier nx as the steps above.i will dump the log later.

You can try to compare the log in your first working NX and the log with current NX.

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