How can device resume from Recovery mode?

hi,
My device quickly powercycle too many times and it entered recovery mode; it cannot boot into the Ubuntu system. I recovered it by entering the UEFI settings (Device Manager → NVIDIA Configuration → L4T Configuration) and changing the status to Normal.
However, this is a manual operation. How can this be handled automatically? Would that require modifying the UEFI program? I haven’t seen its source code.
Also, if I were using the A/B slot mechanism, could it boot normally in this situation?

*** Please note that this reply is generated by LLM automatically ***

To address the issue of your Jetson Orin Nano device quickly power-cycling and entering recovery mode, we’ll explore possible solutions and compare them.

Understanding the Issue

When your device enters recovery mode, it’s likely due to a failure in the boot process. The manual operation you performed by entering the UEFI settings and changing the status to Normal suggests that the issue might be related to the boot configuration.

Automatic Handling

To handle this situation automatically, you have a few options:

  1. Modifying the UEFI program: Yes, modifying the UEFI program could potentially resolve the issue. You would need to access the UEFI source code, identify the root cause of the problem, and implement a fix. However, this approach requires significant expertise and may not be feasible without NVIDIA’s support.
  2. Using the A/B slot mechanism: If you’re using the A/B slot mechanism, you can configure the device to automatically boot from the other slot in case of a failure. This way, if the primary slot fails, the device will boot from the secondary slot. To enable this feature, you’ll need to:
    • Configure the A/B slot mechanism in the UEFI settings.
    • Ensure that both slots have a valid boot configuration.
    • Set the boot order to prioritize the secondary slot in case of a failure.
  3. Implementing a watchdog timer: You can implement a watchdog timer in your application or in the UEFI program to detect and recover from boot failures. The watchdog timer can reset the device or trigger a reboot if the boot process fails.
  4. Using a custom boot script: You can create a custom boot script that checks the boot status and automatically recovers the device if it enters recovery mode.

Comparison of Options

Option Complexity Effectiveness Requirements
Modifying UEFI program High High UEFI source code, expertise
A/B slot mechanism Medium Medium UEFI configuration, valid boot configurations
Watchdog timer Medium Medium Application or UEFI implementation
Custom boot script Low Low Scripting knowledge, boot configuration

Conclusion

While modifying the UEFI program might be the most effective solution, it’s also the most complex and requires significant expertise. Using the A/B slot mechanism or implementing a watchdog timer can provide a more feasible and effective solution. A custom boot script can also be a viable option, but its effectiveness depends on the specific implementation.

In your case, since you’re already using the UEFI settings to recover the device, implementing the A/B slot mechanism or a watchdog timer might be the most suitable solution. If you’re not comfortable with modifying the UEFI program or implementing a watchdog timer, a custom boot script can still provide some level of automation.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

The real thing that you need to check is why your system would go into recovery boot image so easily.

It means your system fails to enter filesystem for consecutive 3 times. But the reason behind this relies on checking your boot log.

the device was used by our customer,I guess too many powercycle caused it. how to resolve it?

There is no way to “resolve it” unless you find out what is going on within the logs.

but when it happed,Our customer can’t used our ai box device, I think we need have a way to enter system normally except uefi setting.

When issue happened, it means your customer has failed to enter the system in 3 times.

The item you need to check here is to find out why it fails to enter in consecutive 3 times. Otherwise your customer still cannot use your AI Box.