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
signpost: GPT priority manipulation utility #28
Conversation
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
After switching to partition B and before marking boot successful, `signpost status` displayed that next boot would use B, when GRUB gptprio would select A. Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
There should be two states when the inactive set is priority 0: a host that's never updated, or a host in the process of writing a new update to the inactive partitions. In either state rolling back to that partition will break the host, so prevent that. Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lot's of cool stuff in here! I have some questions and comments that I had while reading, but I'm not very astute in rust just yet, so I ask partially in ignorance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, there's some very clean and manageable code here. 🍔
This was generic from previous development and doesn't need to be anymore. Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
... in favor of a functioin whose intent is much clearer. Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
When faced with the fact that this method name is awful, I struggled to find a good reason that a consumer of signpost as a library would care about what devices belonged to partition set A, as opposed to the active or inactive partition set. Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random thought: Do you think it'd be hard to extend signpost to handle partition sets being on different disks? It should just be different pointers in grub, and here, things like searching for partitions on the single "os_disk"...
I think it's more difficult than what I'd like to implement right now. |
Signed-off-by: Tom Kirchner <tjk@amazon.com> Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
This was written before we checked if GRUB would boot the inactive partition with `will_boot`. Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Signed-off-by: Tom Kirchner <tjk@amazon.com> Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
Description of changes
This introduces signpost, Thar's utility for modifying GPT priority bits on the OS disk.
signpost is a small but important part of the overall Thar update story, and builds on the
gptprio
patchset to GRUB.I think I have a small expectation that over the next couple of months, this will morph into a library that happens to have a low-level utility binary. But for now, this is what we will use.
Testing
Initial boot:
Next boot:
Next boot:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.