I just tried with a 32GB SD card (also modifying sector size and added the -S option) and it also failed.
We will check it internally, but please use a 64GB or larger USB drive now.
I used the -S 20GiB flag and flashed successfully, but even if i choose to boot from usb manually via uefi, the system boots from nvme like seen in your picture.
Choosing boot options in UEFI only controls where the system reads the extlinux.conf and loads the kernel image, but what to mount as the rootfs is still controlled by the kernel command line in extlinux.conf. So please check rootfs=xxx inside extlinux.conf on both your NVMe drive and USB drive, and make sure they point to where they are from respectively.
So it turns out that both /dev/nvme0n1p1 and /dev/sda1 have the same PARTUUID and that appears in the extlinux file (rootfs=[PARTUUID]). The question is how it happen?
The content of the kernel command line is determined by the following diagram inside Linux_for_Tegra/tools/kernel_flash/README_initrd_flash.txt:
Initrd flash depends on --external-device options and the last parameter <rootdev>
to generate the correct images. The following combinations are supported:
+-------------------+-----------------+-------------------------------------------------------+
| --external-device | <rootdev> | Results |
+-------------------+-----------------+-------------------------------------------------------+
| nvme*n*p* / sda* | internal | External device contains full root filesystem with |
| | | kernel commandline: rootfs=PARTUUID=<external-uuid> |
| | | |
| | | Internal device contains full root filesystem with |
| | | kernel commandline: rootfs=PARTUUID=<internal-uuid> |
+-------------------+-----------------+-------------------------------------------------------+
| nvme*n*p* / sda* | nvme0n*p* / 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 |
+-------------------+-----------------+-------------------------------------------------------+
| nvme*n*p* / 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 |
+-------------------+-----------------+-------------------------------------------------------+
| nvme*n*p* / sda* | external | External device contains full root filesystem with |
| | | kernel commandline: rootfs=PARTUUID=<external-uuid> |
| | | |
| | | Internal device contains minimal root filesystem with |
| | | kernel commandline: rootfs=PARTUUID=<external-uuid> |
+-------------------+-----------------+-------------------------------------------------------+
Hence your command falls into category 4, and results in rootfs=PARTUUID=<external-uuid> on both storage devices.
Just to make sure, do you get to boot from the SD card after modifying rootfs=xxx?
Sorry, I just mean USB drive.
So does rootfs=/dev/sda1 work?
That’s because you used jetson-orin-nano-devkit external in your flashing command. It’s just that kernel image is loaded from the USB drive, but the whole rootfs is from the NVMe drive.
what is the difference between “full root filesystem” and “minimal root filesystem” and if i have both (one in internal storage and one in external) which of them will be used for boot?
Maybe, I guess. I haven’t verified it but you can give it a try.
Also, sda1 instead of /dev/sda1.
The minimal one is just like the initrd used for flashing external devices, only kernel and other necessary stuff like device drivers, and nothing else. The full one is just what you get normally after flashing. Again, the device to boot from (from which the kernel image and extlinux.conf is read) is determined by UEFI, and is not the same as what to mount as the rootfs, which is determined by rootfs=/dev/xxx in extlinux.conf found on the storage device determined in the previous step.
So the flashing process was fine, but you still got rootfs= pointing to the NVMe drive?
I’m not sure if such use case is considered in the script, as both of your storage devices are external ones, so if manually changing it to rootfs=/dev/sda1 after flashing works, then just take it.