Rescue modes when booting from external drive?

Docs at https://doc.turris.cz/doc/en/howto/omnia_booting_from_external_storage say that once I boot from an external device, rescue modes probably won’t work. I can confirm they don’t.

Is there a way to enable them again? E.g. manually changing some scripts, some u-boot flags or whatever?

As my eMMC is dead, I’m forced to boot from an external drive, but the rescue modes thingy was really helpful and I don’t want to say goodbye to it.

Hazarding a guess - the button scripts are probably embedded in the omnia-initramfs-zimage that resides in one of the NOR-SPI flash partitions (probably /dev/mtd1)

What likely will not work since being hardcoded (to /dev/mmcblk0p1) are LED scripts

  • 2-LED rollback to latest snapshot
  • 3-LED rollback to factory snapshot
  • 4-LED flashing from USB

The button scripts for the TO are indeed coded into the Rescue system image residing on /dev/mtd1 in two parts

From the latter file the target partition concerning the 2- | 3- | 4-LED modes is hardcoded with

DEV="/dev/mmcblk0"

Unfortunately schnapps does not support the partuuid variable [feature suggestion] provide PARTUUID as designation for ROOT_DEV (#10) · Issues · Turris / schnapps · GitLab as otherwise it could be aligned with the u-boot script that is utilised with the newer u-boot version 2019 and make the LED scripts work for OS installations on drives other than the eMMC.

@cynerd Do you see any easy way how to edit this hardcoded value in the NOR partitions? Or do I have to wait for full support built into the rescue image?

1 Like