Skip to content

Digits as type does not work in sfdisk script. #2361

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
mindbeat opened this issue Jul 5, 2023 · 1 comment
Closed

Digits as type does not work in sfdisk script. #2361

mindbeat opened this issue Jul 5, 2023 · 1 comment

Comments

@mindbeat
Copy link

mindbeat commented Jul 5, 2023

Hello!

Im using sfdisk from util-linux 2.37.2
Running into issues with my old script.

sudo sfdisk HDD.img << EOF
label:gpt
,16M,4,*
,64M,U,*
,64M,L,
,1000M,L,
,,L,
EOF

It does not like the ,16M,4,* and the stated 4 to create a BIOS partition. I get output
HDD.img1: Failed to add #1 partition: Invalid command.

How do I use digits in this new version? Another synax?

Thanks

@t-8ch
Copy link
Member

t-8ch commented Jul 5, 2023

"4" is just the offset in the list of partition types, it does not seem to work for GPT tables.
To be safe use the type UUID:

label:gpt
,16M,21686148-6449-6E6F-744E-656564454649,*

You can also use sfdisk --dump on a manually formatted disk to get a starting point for a new sfdisk script.

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

3 participants