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

non-sequential partiton numbers #254

Open
toabctl opened this issue Sep 2, 2024 · 1 comment
Open

non-sequential partiton numbers #254

toabctl opened this issue Sep 2, 2024 · 1 comment

Comments

@toabctl
Copy link

toabctl commented Sep 2, 2024

Hi,

is there a way to create a partition table where each entry has a specific partition number? So eg. 3 partitions with the numbers, 1, 13 and 14. Like:

Device         Start     End Sectors  Size Type
/dev/nbd0p1  2099200 7339998 5240799  2.5G Linux filesystem
/dev/nbd0p15    2048  204800  202753   99M EFI System
/dev/nbd0p16  206848 2097152 1890305  923M Linux extended boot
@deitch
Copy link
Collaborator

deitch commented Sep 2, 2024

I was about to write, "sure, just look at the type for Partition" (I assume you mean GPT), and then I saw it had nothing there. Much to my surprise. That is a good idea, so definitely open to a PR.

You would need to update gpt.Partition to include a partition number, and then update Table.toPartitionArrayBytes to account for them rather than just assigning it the next number. You also would need to be sure there were no conflicts. And tests, of course.

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