Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiboot + recovery/update partition #124

Open
jaxxzer opened this issue May 27, 2018 · 2 comments
Open

Add multiboot + recovery/update partition #124

jaxxzer opened this issue May 27, 2018 · 2 comments

Comments

@jaxxzer
Copy link
Member

jaxxzer commented May 27, 2018

As an alternative to the update process, we can have a small recover/update partition that we can boot into. This partition would remain completely static, and serve a webpage that allows uploading a new image file. The recovery partition will image a second (main) partition with the companion software image.

This method of updates will provide a lot of benefits:

  • safer (can't brick companion)
  • more consistent (check partition hash, no failed downloads)
  • does not depend on wifi
  • maintainable (does not require maintaining/bugfixing scripts that install dependencies)
  • better application longevity (like a bootloader, the updating software/implementation is completely independent of the main/companion software)

Some things to think about:

  • will this work on any companion computer? If so, are there any additional requirements on certain systems (ie two storage mediums, or differences in software approach)?
@patrickelectric
Copy link
Member

patrickelectric commented Jul 20, 2018

  • Multiboot working
    1. Boot partition to manage boot order
    2. Recovery partition with clean debian operating system plus a simple webserver to manage the recovery and installation of the new companion image.
    3. Partition as destination for the companion image installation

Next steps with the multiboot is like this:

  • Add an option in companion to reboot into update mode.
  • Add an updater image that runs a "Recovery web server".
  • The "Recovery web server" needs to have an interface for you to upload a compressed companion rootfs image to save to the raspberry pi disk.
  • The "Recovery web server" needs to extracts the compressed linux image over top of the existing old image.
  • Companion reboots into the updated partition.
  • If there is any failure to boot into the main companion partition, always revert to boot into the updater partition running the "Recovery web server".
  • Figure out handling of user data or configuration files so they are not overwritten.
  • Maybe: Add a write protection on the updater partition

@jaxxzer
Copy link
Member Author

jaxxzer commented Jul 20, 2018

For user data and configuration we can have yet another partition that is just for this, and remains untouched during the update process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants