Skip to content

[WIP] feat(format): allow custom partition layout specification in linuxkit format #4104

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SmartArray
Copy link

@SmartArray SmartArray commented Feb 7, 2025

- What I did
Add an option to linuxkit/format that allows specifying multiple partitions.

- How I did it
I modified the format.go source code by adding a partitionLayoutVar that allows specifying a different value than ";" (create one partition)

- How to verify it

/usr/bin/format --layout "size=20M,type=83\nsize=30M,type=83\n" /dev/vda

should create two partition.

This PR is a WIP because I still have to verify this in my production setup.

- Description for the changelog

allow specification of partition layout in linuxkit/format

- A picture of a cute animal (not mandatory but encouraged)
Screenshot 2025-02-07 at 07 42 25

…/format

Signed-off-by: Yoshi Jaeger <github@jaeger.berlin>
Signed-off-by: Yoshi Jaeger <github@jaeger.berlin>
@SmartArray SmartArray changed the title feat(format): allow custom partition layout specification in linuxkit format [WIP] feat(format): allow custom partition layout specification in linuxkit format Feb 7, 2025
@deitch
Copy link
Collaborator

deitch commented Feb 7, 2025

This makes sense. You are saying that the partition command used is sfdisk, it partitions it by passing stdin, which, if it is is ;, just does the whole disk. So make that the default, and you can override it by passing any valid sfdisk options?

In that case, can it be documented and an example provided?

@SmartArray
Copy link
Author

Yeah this was the goal! I would have edited exactly this documentation without you pointing it out! 🙂

I need to work out the specifics and I am currently checking whether the tooling is working as expected. It looks good so far!

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

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy