install: Use systemd-repart for partitioning#2314
Conversation
If `systemd-repart` binary is present and we find one of the directories associated with systemd-repart configurations, then use systemd-repart for partitioning, else fallback to sfdisk Also, update the default ESP size to 2G for composefs installs. This only applies to sfdisk path. Closes: bootc-dev#2132 Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
cgwalters
left a comment
There was a problem hiding this comment.
Thanks for starting this! ACK on the principle.
Needs docs and tests at least.
| .arg("--dry-run=no") | ||
| .arg("--empty=allow") | ||
| .arg("--no-pager") | ||
| .arg("--json=pretty") |
There was a problem hiding this comment.
I would say it's better to use its varlink API now; I was already proposing pulling in zlink for bootc-dev/bcvk#222
| } | ||
|
|
||
| let rootpn = | ||
| rootpn.ok_or_else(|| anyhow::anyhow!("systemd-repart output missing root partition"))?; |
There was a problem hiding this comment.
I think we should support images that have repart.d definitions that are expected to run on firstboot in the target environment, without defining the default root either.
I would flip this around a bit - we default to running repart.d definitions for the root and esp/xbootldr, but probably not the other ones? And we let the other ones naturally run on firstboot.
There was a problem hiding this comment.
I think we should support images that have repart.d definitions that are expected to run on firstboot in the target environment, without defining the default root either.
so this will entail us creating a root partition if it's not defined?
Agree with the second point. We can only include root,esp and xbootldr
If
systemd-repartbinary is present and we find one of the directories associated with systemd-repart configurations, then use systemd-repart for partitioning, else fallback to sfdiskAlso, update the default ESP size to 2G for composefs installs. This only applies to sfdisk path.
Closes: #2132