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

sgdisk behaves confusingly when specifying partitions.${name}.start = "0M" #702

Open
nativerv opened this issue Jul 12, 2024 · 1 comment
Labels
bug Something isn't working contributions welcome There's nothing left to discuss, feel free to submit a PR for this! good first issue Good for newcomers

Comments

@nativerv
Copy link

nativerv commented Jul 12, 2024

partitions.${name}.start = "0M" causes sgdisk to begin at the start of next free space on disk, which crashes disko with confusing errors.

This is despite the manpage setting a distinction between plain 'N' as sector numbers and 'N[K/M/G]' as logical size/byte positions, and stating that '0' is the 'next free space' position, not 0 with a letter.

In any case it would be nice to have a check for start = '0*' (and possibly any intersections which fail too) in disko as the sgdisk is an implementation detail. Start should be 1M (or whatever is physically possible minimum considering GPT and such) or not specified for the first partition, with only size being specified.

Encountered errors for reference:

  • Could not create partition 1 from 1258295296 to 1258297343 (sgdisk)
  • Failed to open key file. (cryptsetup luksFormat; not in the disko log, but when grabbed from the generated diskoScript and tried manually; not sure if this was caused by the same issue but maybe)
  • Notably it randomly succeeded once with start = "0M" and then proceeded failing again with the same disko.nix
@iFreilicht
Copy link
Contributor

It might be enough to implement this check by changing the type definition of start. A good example is the type of size just a few lines above.

@iFreilicht iFreilicht added bug Something isn't working good first issue Good for newcomers contributions welcome There's nothing left to discuss, feel free to submit a PR for this! labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contributions welcome There's nothing left to discuss, feel free to submit a PR for this! good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants