Rpi0 squashfs error, A/B partition switch not working?

Nerves uses the Raspberry Pi’s bootloader. It’s closed source, so I haven’t found one definitive place to go for all of its features. Here are some references:

There are two other ways to support automatically failing back on the Raspberry Pi. They have issues which is one of the reasons why they’re not in Nerves. They might be ok for you:

  1. Include U-Boot. It’s possible to have the Raspberry Pi’s bootloader load U-Boot and then have U-Boot load Linux, etc. just like boards running U-Boot. We decided against this option just because it felt like too many pieces and would be hard for us to support.
  2. Use an initramfs that has the logic to automatically fail back. I made an attempt at this at GitHub - nerves-project/nerves_initramfs: An initramfs for early boot handling of Nerves devices (Work in progress!). A while back, @jjcarstens made a branch of the Nerves Raspberry Pi systems that used it. It “works”, but has a couple disadvantages. First, it’s not possible to revert if the Linux kernel or initramfs are messed up. Since these are updated on every software update, this strategy has a serious flaw even though it probably would handle 90+% of the failed updates that I encounter. The other problem is that the initramfs program got too complicated and I no longer feel good about it being reliable. This could be fixed, but once I learned about tryboot, I felt like investigating that would be a better use of time.
2 Likes