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.
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 =]
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.
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.