Skip to content

sfdisk use of type=U/S/L, etc Fails with Invalid argument #1113

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

Closed
rickyrockrat opened this issue Aug 2, 2020 · 1 comment
Closed

sfdisk use of type=U/S/L, etc Fails with Invalid argument #1113

rickyrockrat opened this issue Aug 2, 2020 · 1 comment

Comments

@rickyrockrat
Copy link

2.33 exhibits this issue. 2.25.2 did not. When using sfdisk as a script, the script is broken between 2.25.2 and 2.33.
In 2.25.2, this works:
label:gpt
/dev/sdc1 : start=2048, size=204800, type=U, bootable
In 2.33, it errors out with:
Old situation:

Script header accepted.
Script header accepted.
Created a new GPT disklabel (GUID: F8FB2DBB-511C-1A4B-8F28-F86253B108AA).
/dev/sdc1: Failed to add #1 partition: Invalid argument
Leaving.

2.33 behaviour both breaks old scripts and is not consistent with the man page.
The issue is twofold:
One, the message printed 'Invalid argument' is surely a copy of 'something went wrong', i.e. completely useless.
The second is that the behaviour does not match the man page. In string_to_guid, it never handles the single-letter cases.
It should be possible to alter string_to_guid to look for a string of length 1, and call gpt_entry_set_uuid to obtain a GUID such that this is compatible with the original sfdisk and the man page.

@karelzak
Copy link
Collaborator

karelzak commented Aug 6, 2020

Please. update. It's implemented by commit 08474fd since v2.35.

@karelzak karelzak closed this as completed Aug 6, 2020
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

No branches or pull requests

2 participants