I am working on an embedded project that will do in-place upgrades. There may come a time when an upgrade will need to reinstall everything. Since this is a pretty risky thing, I would like to have some kind of failsafe fall-back mode to reattempt the upgrade.

I am thinking of adding a very basic kernel that has just enough to attempt another upgrade. I want to always boot into this basic kernel, check GPIOs, and then boot into the other kernel or continue booting depending on the state of the GPIOs. I'll install a button on the case to signal the appropriate GPIO.

I don't know how the boot loader works, and grub/syslinux isn't available AFAIK.

Is this sort of thing possible? Am I over-complicating the problem?

1 Answer 1


A Linux bootloader must, at a minimum, load the kernel and pass it a few parameters to tell the kernel where it's loaded. Many setups also require being able to pass a command line and an initial RAM drive, though on an embedded system with a known hardware setup this can be superfluous.

The best way to get a reliable bootloader is to use a working bootloader. Have a simple first-stage bootloader in a fixed configuration that chainloads a Linux bootloader (U-Boot or whatever your embedded system has), with a fallback mechanism. U-Boot itself can implement a fallback mechanism — see “Implementing Boot Image Fallback on U-Boot” on the U-Boot-Users mailing list, and Redundant Images on xpedite5370 for an example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.