-
Notifications
You must be signed in to change notification settings - Fork 139
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
partitioning: Add partattrs property to partition #490
base: main
Are you sure you want to change the base?
Conversation
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.
One small note; would also be great to extend the paritioning tests to test partition attributes
actions/image_partition_action.go
Outdated
@@ -58,6 +58,7 @@ a 32 bits hexadecimal number (e.g. '1234ABCD' without any dash separator). | |||
fsck: bool | |||
fsuuid: string | |||
partuuid: string | |||
partattrs: list of partition attributes |
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.
partattrs: list of partition attributes | |
partattrs: list of partition attributes bits to set |
Would be good to have the Verify
function check it's only bit numbers in a valid range
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.
@nfraprado Just checking if you managed to look at adding a check in the Verify
function for the bit range ? Please reach out if I can help to explain the comment above :-)
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.
Sorry for the delay. I've implemented verification now.
However I've noticed that bits 0-2 despite being documented in the specification and in the sfdisk man page, don't seem to be supported:
2024/05/31 19:42:27 sfdisk | unsupported GPT attribute bit '2'
2024/05/31 19:42:27 sfdisk | sfdisk: /dev/disk/by-fakemachine-label/fakedisk-0: partition 1: failed to set partition attributes
Should we forbid these values in verification too? Given it's documented it might be something specific to my setup. Unfortunately I don't have a lot of time to look into this.
Add a 'partattrs' property to partitions. It allows the GPT partition attribute bits to be set for a partition. Notably this is needed to set bits 48 and 56, which are part of the GUID specific range, to allow a ChromeOS Kernel partition to be booted on Chromebooks. Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
Add a 'partattrs' property to partitions. It allows the GPT partition attribute bits to be set for a partition. Notably this is needed to set bits 48 and 56, which are part of the GUID specific range, to allow a ChromeOS Kernel partition to be booted on Chromebooks.