How would you design a fail-safe over-the-air (OTA) update mechanism for an edge gateway using Canonical's embedded Linux approach?