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

Support sfdisk backend for partitioning #1926

Open
jlebon opened this issue Aug 22, 2024 · 4 comments · May be fixed by #1929
Open

Support sfdisk backend for partitioning #1926

jlebon opened this issue Aug 22, 2024 · 4 comments · May be fixed by #1929
Assignees

Comments

@jlebon
Copy link
Member

jlebon commented Aug 22, 2024

sfdisk is part of util-linux and has supported GPT partitioning for a while now. It'd be desirable to support using sfdisk instead of sgdisk for partitioning for OSes that want to shed that dependency.

Proposal:

  1. add a new sfdisk package that implements the same API as the sgdisk one
  2. support a compile option to change the default backend to use from sgdisk to sfdisk
  3. support a kernel argument option (e.g. ignition.partition-backend=(sfdisk|sgdisk)) to override compile-time defaults
  4. once we have some confidence in the code, change the upstream default to sfdisk and declare the sgdisk backend deprecated
  5. after a reasonable window, drop support for the sgdisk backend

On the FCOS side, we can start using the sfdisk backend in some of the non-production streams to get some early testing, and if deemed necessary, bake it in the next stream as well.

@jlebon
Copy link
Member Author

jlebon commented Aug 22, 2024

cc @tormath1 @pothos for thoughts on this from the Flatcar Linux side.

@pothos
Copy link
Contributor

pothos commented Aug 23, 2024

With sfdisk we can skip running partx here:

// In contrast to similar tools, sgdisk does not trigger the update of the
(And later delete it when only sfdisk woud be supported)

@travier
Copy link
Member

travier commented Aug 28, 2024

We'll have to update things downstream as well. Filed: coreos/fedora-coreos-tracker#1787

travier added a commit to travier/fedora-coreos-config that referenced this issue Aug 28, 2024
Look for sgdisk in the alternative libexec path on EL systems as a
temporary workaround until we complete the migration from gdisk to
fdisk in Ignition.

See: coreos/ignition#1926
See: https://issues.redhat.com/browse/RHEL-56080
travier added a commit to travier/fedora-coreos-config that referenced this issue Aug 28, 2024
Look for sgdisk in the alternative libexec path on EL systems as a
temporary workaround until we complete the migration from gdisk to
fdisk in Ignition.

See: coreos/ignition#1926
See: https://issues.redhat.com/browse/RHEL-56080
@travier
Copy link
Member

travier commented Aug 29, 2024

Found some examples on how to pass commands to sfdisks:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants