feat(native-to-disk): direct block-device installer via privileged podman (no QEMU)#1
Open
corning-croak-cable wants to merge 2 commits into
Open
feat(native-to-disk): direct block-device installer via privileged podman (no QEMU)#1corning-croak-cable wants to merge 2 commits into
corning-croak-cable wants to merge 2 commits into
Conversation
Adds `crates/kit/src/native_to_disk.rs` — a no-VM path for installing bootc images directly to physical block devices via a privileged podman container (no QEMU, no virtiofsd, no SSH). Assisted-by: Sauna (claude-sonnet-4-6)
Adds: - `mod native_to_disk` to Linux module list - `Commands::NativeToDisk` variant - match arm routing to `native_to_disk::run` Assisted-by: Sauna (claude-sonnet-4-6)
a27b9ea to
61152e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
bcvk native-to-disk <image> <device>— a no-VM installation path that writes a bootc OCI image directly to a physical block device by runningbootc install to-diskinside a privileged podman container.Before:
bcvk to-diskalways boots an ephemeral QEMU VM, waits for SSH, then runsbootc install to-diskagainst a/dev/disk/by-id/virtio-outputpassthrough. Requires QEMU, virtiofsd, KVM.After:
bcvk native-to-diskskips the VM entirely:This runs:
New file:
crates/kit/src/native_to_disk.rsSafety checks (before any destructive I/O)
fstat→S_IFBLK/proc/mounts(exact match + prefix)--yesCLI flags
--yes--rootfulsudo(for environments where rootless podman can't access block devices)--install-logRUST_LOGfor bootc install inside the container--filesystem,--root-size,--kargbootc install to-diskviaInstallOptionsUnit tests (table-driven per REVIEW.md)
test_check_not_mounted_parse— 4 cases (exact match, prefix match, absent)test_device_info_human_size— 3 casestest_build_podman_cmd_contains_device— verifies--privileged,to-disk, source image, device as last argWhen to use which command
bcvk native-to-diskbcvk to-diskbcvk ephemeral runAttribution
Assisted-by: Sauna (claude-sonnet-4-6)