I am writing an update utility for an embedded Linux device for which I am responsible.
I'm creating a basic side-by-side setup, where updates are applied to a staging partition and then the bootloader is switched to the staging partition, changing the primary partition into the new staging one.
However, the embedded device uses a CF card, which are known for sometimes writing data out of order, etc. For this reason, if I mount a file system as read/write, there's a chance of corruption. Therefore, I cannot mount my bootloader partition RW in order to point to the new partition.
Is there a location on disk to which I can safely write a single byte, where the byte represents a 0 for the first partition or a 1 for the second? Even a CF card can't screw up a single byte write, which should happen atomically.
I'm using a plain-old DOS MBR format disk.