64G AGX Orin boot Order Getting Reset (JetPack 5.1.1 - L4T r35.3.1)

I am having an issue where the boot order I change in the UEFI menu or in the L4TConfiguration.dtbo file keeps getting reset.

I change the boot order by:
Convert the L4TConfiguration.dtbo file to L4TConfiguration.dts file:

sudo kernel/dtc -I dtb -O dts -o kernel/dtb/L4TConfiguration.dts kernel/dtb/L4TConfiguration.dtbo

sudo nano kernel/dtb/L4TConfiguration.dts

change data to: data = “usb,emmc,nvme,sd,ufs”;

Convert the L4TConfiguration.dts file to L4TConfiguration.dtbo file:

sudo kernel/dtc -I dts -O dtb -o kernel/dtb/L4TConfiguration.dtbo kernel/dtb/L4TConfiguration.dts

To flash the NVMe I am running:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml --showlogs --network usb0 cti/orin-agx/AGX922/pciex8-usb5Gbps nvme0n1p1

Then to flash the eMMC I am running:

sudo ./flash.sh cti/orin-agx/AGX922/pciex8-usb5Gbps mmcblk0p1

after flashing the device, both NVMe and eMMC are bootable. It boots into the eMMC as expected and the UEFI menu shows the correct order of “usb,emmc,nvme,sd,ufs”. If the NVMe is removed the device boots to the eMMC. But if the NVMe is reinserted this is when the boot order gets reset to the NVIDIA default of “usb,nvme,emmc,sd,ufs”

Hi matt.read,

Please note that L4TConfiguration.dtbo would just valid for the first boot after flash because you could configure the boot-order in UEFI menu.

Does it boot from eMMC before you remove the NVMe?

Could you configure the boot-order to desired order(usb,emmc,nvme,sd,ufs) in UEFI menu at this moment?

Yes it boots to the eMMC before I remove the NVMe.
If I do a reboot it will boot to the eMMC, then power off and then reinsert the NVMe, this is when the boot order is reset to defult.

I can then change it at this point in the UEFI menu back to (usb,emmc,nvme,sd,ufs ).
Im hoping that there is a solution so that my boot order always stays the same without having to UEFI menu to reset it every time.
Thank you

I think the default design prefer using NVMe to boot.

Could you help to verify if the boot-order would change back to " usb,nvme,emmc,sd,ufs" if you re-insert NVMe again?
(i.e. if the boot-order would still change to default after you have configured the boot-order in UEFI menu)

Hi,

yes after an eMMC boot re-inserting the NVMe drive will result in the UEFI menu showing a boot order of
" usb,nvme,emmc,sd,ufs " even if previously I set it to "usb,emmc,nvme,sd,ufs " within the UEFI menu. This cycle will continue if I remove the NVMe drive, boot to eMMC, power off and re-inserting the NVMe andat this point is when I keep having to set it back to "usb,emmc,nvme,sd,ufs " with in the UEFI menu.

It seems the expected behavior that the Jetson will prefer to boot from the new connected device.

I don’t see how this can be expected behavior as it resets the boot order and this behavior does not account for failure states.

Lets say the Orin has two bootable medias, the eMMC and the NVMe and is configured to a boot order of “usb,emmc,nvme,sd,ufs”. If you are booted from the eMMC and for example the the NVMe gets too hot it can disable the controller on the NVMe and the device will “disappear”. It is totally possible that a user could then power cycle the Orin and it would boot to eMMC as expected. When the NVMe cools down and turns back on any subsequent boots would reset the boot order away from the defined above and boot to the NVMe disregarding the user set boot order.

Do you mean that you would unplug the NVMe when it gets hot?

As I state before, UEFI would add the new device to the Top in boot-order.
In your case, you could refer to the following stepw to configure it to the Bottom

UEFI menu → Device Manager → NVIDIA Configuration → Boot Configuration → Add new devices to top or bottom of boot order → Bottom

Hi Kevin, no when an NVMe gets too hot its onboard controller can turn it off (not me unplugging it physically).
the failure state im describing is:

  1. Boot order is: “usb,emmc,nvme,sd,ufs

  2. System boots to eMMC as expected

  3. NVMe gets too hot and onboard NVMe controller turns the NVMe drive off (Linux no longer sees the NVMe drive)

  4. User at some point power cycles the Jetson while the NVMe is still off

  5. System still boots to eMMC as expected

  6. At some point the NVMe cools down and the onboard NVMe controller turns the device back on (Linux can now see the device)

  7. User at some point power cycles the Jetson (NVMe is on)

  8. UEFI would add the new device (NVMe) to the Top in boot-order and is reset to the Nvidia default boot-order of “usb,nvme,emmc,sd,ufs

  9. System boots to NVMe (this is not our desired behavior as the boot order has changed)

I believe that the UEFI should not reset the boot order as the correct behavior. Our systems our fully remote and the ORIN is in an embedded device. Going in through serial to access the UEFI menu is not an option. Do you know if there is a way to get the UEFI to never change its boot order and always use our current set one of “usb,emmc,nvme,sd,ufs

Do you run any application cause NVMe too hot? (even may cause it off)
May I know what’s your use case? It seems not an expected operation for NVMe.

Why?

No, it would always detect the current available boot-device and set the boot-order if new added device connected. It should always put new connected device to somewhere(top or bottom).

Hi Kevin, there seems to be some mis-understanding here.

Our product is an embedded device, at the mercy of environmental swings. It is not unusual for NVMe devices to enact a sort of self-protection where high temperatures are seen, the device will shutdown - this is what causes the start of our problems, the boot order being over-written.

As mentioned, this is an embedded device, connected to through ethernet access only. Please explain how in this type of setup a serial connection is to be initiated?

This is our major problem with the current behaviour - ignoring all of the issues above, we require, and expect, the boot order to behave in a fixed way - much like on a PC, you set the boot order in the bios, and unless the user changes and saves the settings, they will persist.

We do not want the system to randomly adjust the boot order based on the appearance or otherwise of new devices - are you suggesting this is not possible, and also not planned?

It is not randomly deciding the boot-order. As my understanding, we would handle the new added boot device and put it to the “Top” or “Bottom” of boot-order.

If you want it to be fixed order even if the new device added, you have to customize the UEFI source for your use case.

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