Flashing only to NVMe disk

Hi, I have a Jetson Xavier AGX, JetPack 5.1.2, and I want to flash it such that:

  • The system is flashed to the NVMe disk only. The eMMC can be used, but only for structures necessary to boot the system. Because my root filesystem is very large, I don’t want to waste time flashing the eMMC. Another reason is that at some point the root filesystem may simply become too large for the internal eMMC.
  • The root filesystem ends up on a partition that is expanded, so the entire disk will be used (for various reasons I don’t want to use a separate partition for my data).

So far, I have found the following command useful to create a system that runs on my NVMe disk, and where the root fs is in the last partition on the disk, so that it can be resized without problems:

./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_external.xml --showlogs --network usb0 jetson-xavier internal

After running this command and booting, I resize the rootfs with the commands:

apt-get install -y cloud-guest-utils
growpart /dev/nvme0n1 1
resize2fs /dev/nvme0n1p1
reboot # Reboot, to be on the safe side.

This all works now, but the problem is still that the flash command performs the flashing twice: once to the eMMC and once to the NVMe. If I use the --external-only flag, then that flashes only the NVMe, but the system is non-bootable (I suppose that the eMMC must contain some structures to make the booting possible).

How can I change this recipe such that the rootfs is flashed to the NVMe only, and it is bootable, and it is expanded to the size of the disk?

Note: it is ok if the NVMe disk contains redundant structures necessary for booting, as it is very large (2TB).

Thanks for any help!

Hi,

This does not work because AGX Xavier, unlike other Jetson platforms, does not have a QSPI chip for storing bootloader stuff. They are all stored in eMMC so rootfs is also flashed when you flash the bootloader, as we don’t have a separate config file for only flashing the bootloader part of AGX Xavier.

Maybe you can try deleting the part of sdmmc_user in Linux_for_Tegra/bootloader/t186ref/cfg/flash_t194_sdmmc.xml, so it looks like:

<?xml version="1.0"?>

<!-- Nvidia Tegra Partition Layout Version 1.0.0 -->

<partition_layout version="01.00.0000">
    <device type="sdmmc_boot" instance="3" sector_size="512" num_sectors="16384">
...
...
...
    </device>
</partition_layout>
1 Like

I haven’t tried it out yet, but this is very useful information.

Thanks a lot!

1 Like

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