bitbox-base
bitbox-base copied to clipboard
Maintenance Menu on boot
This pull request extends the initial implementation of the autorization reset and adds a "Maintenance Menu" that is displayed (without the need to log in) if an authorized maintenance token is found on the USB flashdrive.
A maintenance token can be:
- a Shift factory token, its hash added in the initial build and removed later (either from the maintenance menu, or when user initiates the backup at the end of the Setup Wizard)
- a user token that is written to the flashdrive as part of the Backup process
The maintenancen menu is displayed over HDMI on tty2 and allows:
- creating and applying Bitcoin block snapshots
- finishing the factory setup by deleting any temporary user files
- Factory reset...
- Authentication: user can reset the password from the BitBoxApp
- Configuration reset: factory defaults are restored (Redis database, new SSH and SSL keys...)
- Disk image reset: user can flash official, signed BitBoxBase image from USB flashdrive

Not yet implemented: applying the restored configuration (e.g. setting hostname, recreating config files from templates with restored Redis values) which is tracked in a separate issue.