Fault tolerance #120

Closed
barbieri11 opened this Issue Nov 12, 2013 · 4 comments

Comments

Projects
None yet
3 participants

Hey Guys =]
If something goes Wrong in the middle of the firmware update (power down or any failure ) What will happen on the next boot?
Does it boot with the last valid firmware?
I'm trying to create situations in order to bug the firmware update but, I still didn't get any conclusion.
tks

Collaborator

popcornmix commented Nov 12, 2013

Depends where it goes wrong. If it goes wrong halfway through writing the kernel to FAT partition, then we will fail to boot.

@popcornmix Thanks =]

Contributor

lurch commented Apr 14, 2014

Because the firmware update has to write to both the FAT partition (/dev/mmcblock0p1), and the EXT4 partition (/dev/mmcblock0p2), and because there's so many hundreds of files, I don't believe there's any way to make the process fault tolerant (using atomic directory-renaming tricks it could perhaps be made slightly more fault tolerant but IMHO it's not worth it).
But in the worst-case-scenario that your system does go wrong during the middle of an update and you end up with an unbootable system, you can still use the "offline mode" of rpi-update to write updated firmware to your SD card from another Linux PC.

Collaborator

popcornmix commented Apr 14, 2014

The FAT partition doesn't generally have enough room to hold the old and new firmware to allow an atomic rename operation.
And the fact it lives in root probably means that is impossible.

I think if you are worried, then backup before updating.
If not, it can be fixed with an offline update from a linux PC.
I don't think there's anything obvious we can do.

popcornmix closed this Apr 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment