0

I have a raspberry with a customized OS. The image it should load is described in the config.txt on the boot partition. The image is called zImage and the line in the config.txt is:

kernel=zImage

I expect to update it from time to time by updating the whole zImage. Now I am wondering that if I accidentally upload a faulty new zImage.img which causes a faulty system start (no start or partial start). Is there a way that I can use a fallback zImage?

So my ideal boot procedure would be:

  1. Raspberry checks if a certain file is present on the boot partion (for example fallback.txt).
  2. If fallback.txt is present use the kernel image fallback.img
  3. If not, use the zImage.img and as a first step write the file fallback.txt
  4. Boot and perform some checks. If everything is ok, delete fallback.txt

In this configuration I would always have a bootable system, even if I mess up the update of the system. I have been searching if this is possible but I only find procedures to boot through USB.

Is this possible?

0

Modifying boot procedure is very difficult on Raspberry Pi because it is a custom solution for Raspberry Pi and deep integrated into the firmware. As far as I know there are parts closed source. You will find a description from the official site at Raspberry Pi boot modes. Have a look at Boot flow there.

  • Yes I have checked this. The boot modes only describe possibilities to have external secondary options (USB/ethernet). I am looking for an internal option. – Steven Sep 17 '18 at 13:50

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.