R36.4.3 Linux for Tegra Backup command ""-e mmcblk0:nvme0n1""failing

Hi,

We are trying to take backup of Jetson Orin NX 16 GB SOM module using the command as per readme_backup_restore.txt:

sudo ./tools/backu p_restore/l4t_backup_restore.sh -e mmcblk0:nvme0n1 -b jetson-orin-nano-devkit

backup_command_mmcblk0_r36.4.3.txt (129.6 KB)
backup_command_error_r36.4.3.txt (103.8 KB)

but is failing saying mmcblk0 not found.

later, we tried this command:

sudo ./tools/backup_restore/l4t_backup_restore.sh -e mmcblk0p1:nvme0n1 -b jetson-orin-nano-devkit

This also is failing.

Please find the log attached for reference.
Let us know how to fix.

Thanks.

Hi,

What is your carrier board?
Is it using a Orin Nano dev kit or other custom carrier board?

Thanks

Its our own company’s customized carrier board.

Also, FYI. If we take backup of only nvme01, it backups fine using the below command;

sudo ./tools/backu p_restore/l4t_backup_restore.sh -e nvme0n1 -b jetson-orin-nano-devkit

Thus, do your carrier board support two external device ( sd card and NVMe)?

Thanks

No. We have only nvme01 external memory.

I thought mmcblk0 means internal onboard SOM QSPI memory, where UEFI bootloader is flashed and it is trying to take backup of that.

Please clarify.

Thanks.

Hi,

some devices like AGX Orin have mmcblk0, which 64gb and could be a rootfs.
Please refer to this gudie to check.
In this case (only support nvme).
Just use
sudo ./tools/backup_restore/l4t_backup_restore.sh -e nvme0n1 -b jetson-orin-nano-devkit
and QSPI img will be backup.

Thanks

1 Like

Thanks for the clarification.

1 Like

Hi David,

Have one more query.

Is it possible to flash Jetson Linux to an external SSD drive which is connected the unit through a USB port? instead of flashing to NVMe present on customized carrier board, which is current setup.

THanks.

Yes in our dev kit.

We want to do it on our custom carrier board, having Orin NX 16 GB SOM module.
Is it possible?

Yes in theory.
You could use --external-device sda1 to try with your carrier board.

Thanks

Please provide steps to do this flashing for r36.4.3

For example in Orin NX

$ sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device sda1 -p "-c ./bootloader/generic/cfg/flash_t234_qspi.xml" -c ./tools/kernel_flash/flash_l4t_t234_nvme.xml --showlogs --network usb0 jetson-orin-nano-devkit external

Thanks

We were able to flash successfully the external SSD drive connected to USB3.0 but
we are not able to see that SSD in the boot list in the UEFI.

Please let us know, how to make SSD appear in the bootable list and set is as booting device?

Thanks.

Also in the Readme_initrd_flash.txt file we have slighlty different commands. Especially ADDITIONAL_DTB_OVERLAY_OPT= . please clarify.

Workflow 3: How to flash to an external storage:
Requirements
To flash to an externally connected storage device, you need to create your own
partition config xml file for the external device. For information about how to
do this, see the ‘External Storage Device Partition’ section in the developer
guide. Especially note that you will need to change the “num_sectors” field of
the partition config xml file to match your external storage device, as Initrd
flash does not support size discovery. You must change “num_sectors” so that
num_sectors * sector_size is equal to or smaller the size of your external
storage device. And for all types of external device, the device “type” needs to
be “nvme”.

There are three examples xml files in the tools/kernel_flash folder. These
examples assume that the attached external storage is 64 gibibytes and above:

  • flash_l4t_external.xml contains both the rootfs, kernel and kernel-dtb on the
    external storage device.
  • flash_l4t_nvme_rootfs_enc.xml is a sample partition configuration that is used for
    disk encryption feature on external storage.
  • flash_l4t_nvme_rootfs_ab.xml is a sample partition configuration that is used for the
    rootfs ab feature on external storage.

To flash, run this command from the Linux_for_Tegra folder:
$ sudo ADDITIONAL_DTB_OVERLAY_OPT= ./tools/kernel_flash/l4t_initrd_flash.sh --external-device
-c
[ --external-only ]
[ -S ]
[ --network ]
Where:

  • and variables are similar to those that are used for
    flash.sh. (See more details in the official documentation’s board name
    table).
  • can be set to “mmcblk0p1” or “internal” for booting from internal
    device or “external”, “sda1” or “nvme0n1p1” for booting from external device.
    If your external device’s external partition layout has “APP” partition,
    specifying here “nvme0n1p1” will generate the rootfs boot commandline:
    root=/dev/nvme0n1p1. If is internal or external, the tool will
    generate rootfs commandline: root=PARTUUID=

  • is the partition layout for the external storage
    device in XML format.
  • is the name of the external storage device you want to flash
    as it appears in the ‘/dev/’ folder (i.e nvme0n1, sda).
  • is the size of the partition that contains the operating system in bytes.
    KiB, MiB, GiB shorthand are allowed, for example, 1GiB means 1024 * 1024 *
    1024 bytes. This size cannot be bigger than “num_sectors” * “sector_size”
    specified in the and must be small enough to fit
    other partitions in the partition layout.
  • Use --external-only to flash only the external storage device.
    If you do not provide the “–external-only” option, the command will flash both internal and
    external storage devices.
  • Use --network if you want the flash process to happen through Ethernet protocol
    instead of USB protocol. Ethernet protocol is more reliable than USB protocol
    for external devices like USB.
    can be “usb0” when flashing using ethernet protocol through the usb
    flashing cable or “eth0:/:” when flashing using
    ethernet protocol through the RJ45 cable.
  • (Optional) Declare ADDITIONAL_DTB_OVERLAY_OPT= where can be BootOrderNvme.dtbo.
    This allows UEFI to prioritize booting from NVMe SSD. can also be BootOrderUsb.dtbo, which
    allows UEFI to prioritize booting from the USB storage drive

Example usage:
Flash an NVMe SSD and use APP partition on it as root filesystem
sudo ADDITIONAL_DTB_OVERLAY_OPT=“BootOrderNvme.dtbo” --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml --showlogs jetson-xavier nvme0n1p1

Flash USB-connected storage use APP partition on it as root filesystem
sudo ADDITIONAL_DTB_OVERLAY_OPT=“BootOrderUsb.dtbo” --external-device sda1 -c ./tools/kernel_flash/flash_l4t_external.xml --showlogs jetson-xavier mmcblk0p1

Flash an NVMe SSD and use the partition UUID (that is specified in l4t-rootfs-uuid.txt_ext) as the root filesystem:
sudo ADDITIONAL_DTB_OVERLAY_OPT=“BootOrderNvme.dtbo” --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml --showlogs jetson-xavier external

Initrd flash depends on --external-device options and the last parameter
to generate the correct images. The following combinations are supported:
±------------------±----------------±------------------------------------------------------+
| --external-device | | Results |
±------------------±----------------±------------------------------------------------------+
| nvmenp* / sda* | internal | External device contains full root filesystem with |
| | | kernel commandline: rootfs=PARTUUID= |
| | | |
| | | Internal device contains full root filesystem with |
| | | kernel commandline: rootfs=PARTUUID= |
±------------------±----------------±------------------------------------------------------+
| nvmenp* / sda* | nvme0np / sd* | External device contains full root filesystem with |
| | | with kernel commandline rootfs=/dev/nvme0n1p1 |
| | | |
| | | Internal device contains minimal filesystem with |
| | | kernel command line rootfs=/dev/nvme0n1p1 |
±------------------±----------------±------------------------------------------------------+
| nvmenp* / sda* | mmcblk0p1 | External device contains full root filesystem with |
| | | with kernel commandline rootfs=/dev/nvme0n1p1 |
| | | |
| | | Internal device contains full filesystem with |
| | | kernel command line rootfs=/dev/mmcblk0p1 |
±------------------±----------------±------------------------------------------------------+
| nvmenp* / sda* | external | External device contains full root filesystem with |
| | | kernel commandline: rootfs=PARTUUID= |
| | | |
| | | Internal device contains minimal root filesystem with |
| | | kernel commandline: rootfs=PARTUUID= |
±------------------±----------------±------------------------------------------------------+

Hi,

Could you access Ubuntu to check weather the USB3.0 ssd detected?
ADDITIONAL_DTB_OVERLAY_OPT change your default boot order.
Please refer below link
https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/Bootloader/UEFI.html#overriding-the-default-boot-order-during-flashing

Thanks

You mean to say to connect this USB SSD on a different Ubuntu PC to see if it gets detected?

This link says to use flash.sh script

But we had used l4t_initrd_flash.sh script to flash external USB SSD.

  1. Please let us know the exact command to use for flashing to change boot order during flashing with “ADDITIONAL_DTB_OVERLAY_OPT” parameter for our use case
    Does the below command will work:

$sudo ADDITIONAL_DTB_OVERLAY=" `BootOrderUsb.dtbo" ./tools/kernel_flash/l4t_initrd_flash.sh --external-device sda1 -p “-c ./bootloader/generic/cfg/flash_t234_qspi.xml” -c ./tools/kernel_flash/flash_l4t_t234_nvme.xml --showlogs --network usb0 jetson-orin-nano-devkit external

  1. You mean to say after flashing with "ADDITIONAL_DTB_OVERLAY_OPT"parameter, then this USB SSD will be listed in boot devices list in UEFI?

Thanks

Hi,

  • Access the Orin NX with rootfs installed in NVMe
  • plug usb 3.0 SSD
  • check weather the Orin NX detect USB3.0 SSD

As your mentioned workflow, l4t_initrd_flash.sh support this parameter

The command example you could refer workflow 4

Workflow 4: How to flash to device with internal QSPI and an external storage device:
Some Jetson devices like Jetson Orin NX and Jetson Xavier NX have an internal QSPI and an external
storage device, which flash.sh may not have support flashing yet. In this case you can use the following commands:

Thanks

Yes, we were able to notice this USB SSD, it was detecting.

In the Readme-initrd_flash.txt file it says:

For a device with internal QSPI and external USB storage:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device sda1
-c tools/kernel_flash/flash_l4t_external.xml
-p “-c bootloader/generic/cfg/flash_t234_qspi.xml --no-systemimg” --network usb0
external

Here We observe slight change in the command , what we used and the one given here:

  1. We used " -c ./tools/kernel_flash/flash_l4t_t234_nvme.xml ", here they are using “-c tools/kernel_flash/flash_l4t_external.xml”. Will this different paritionlayout file matter in any way?

  2. We did not use the “–no-systemimg” parameter for internal QSPI flashing. Will this effect in any way?

Thanks for the support.

What is ssd path? something like /dev/sdx ?

Could you provide your config with below command

cat /boot/extlinux/extlinux.conf

it is soft link just the same file.

It’s fine not to set this args. Since Orin NX don’t have internal storage, you could set this args to not recreate the system img to reduce some time.

Thanks