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:
- Raspberry checks if a certain file is present on the boot partion (for example
fallback.txt
). - If
fallback.txt
is present use the kernel imagefallback.img
- If not, use the
zImage.img
and as a first step write the filefallback.txt
- 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?