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!