Skip to content

Instantly share code, notes, and snippets.

View cgwalters's full-sized avatar
👍
LGTM

Colin Walters cgwalters

👍
LGTM
View GitHub Profile

Example virt-install:

virt-install --connect qemu:///system --initrd-inject ~/tmp/inst.ks --extra-args inst.ks=file:/inst.ks --location /var/srv/walters/machine-images/fedora/Fedora-Everything-netinst-x86_64-42-1.1.iso --os-variant rhel9-unknown --name test-install-localregistry

Example kickstart used:

%pre
mkdir -p /etc/containers/registries.conf.d/
cat > /etc/containers/registries.conf.d/local-registry.conf << 'EOF'
From d392d548ce9380a68e9319a9f2445740430cfaf5 Mon Sep 17 00:00:00 2001
From: Colin Walters <[email protected]>
Date: Fri, 4 Apr 2025 19:50:46 -0400
Subject: [PATCH] wip
Signed-off-by: Colin Walters <[email protected]>
---
docs/src/building/users-and-groups.md | 78 ++++++++++++++++-----------
1 file changed, 46 insertions(+), 32 deletions(-)
```
diff --git a/Cargo.toml b/Cargo.toml
index bd6165a..5bf6f9f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,7 +19,7 @@ serde = { features = ["derive"], version = "1.0.125" }
serde_json = "1.0.64"
semver = "1.0.4"
thiserror = "1"
-tokio = { features = ["fs", "io-util", "macros", "process", "rt", "sync"], version = "1" }
```
Problem: problem with installed package
- container-selinux-2:2.234.2-1.fc42.noarch does not belong to a distupgrade repository
- nothing provides selinux-policy >= 41.29 needed by container-selinux-102:2.234.2-1.20250120151756441139.main.6.g7c024e3.fc42.noarch from copr-rhcontainerbot-podman
- nothing provides selinux-policy-any >= 41.29 needed by container-selinux-102:2.234.2-1.20250120151756441139.main.6.g7c024e3.fc42.noarch from copr-rhcontainerbot-podman
- nothing provides selinux-policy-base >= 41.29 needed by container-selinux-102:2.234.2-1.20250120151756441139.main.6.g7c024e3.fc42.noarch from copr-rhcontainerbot-podman
You can try to add to command line:
--skip-broken to skip uninstallable packages
```
flowchart TD
    firmware --- sd-boot --- UKI --- Linux-kernel
    Linux-kernel --- initramfs --- ostree-prepare-root.service
    ostree-prepare-root.service --- rootfs-key
    rootfs-key --- signature-on-ostree-commit
$ tmt run -vvv -ddd -l login
Using tree '/var/home/walters/src/github/containers/bootc'.
Workdir '/var/tmp/tmt/run-005' already exists.
/var/tmp/tmt/run-005
tmt version: 1.33.0
tmt command line: /usr/bin/tmt run -vvv -ddd -l login
Run command: cat /etc/os-release
out: NAME="Fedora Linux"
out: VERSION="40 (Container Image Prerelease)"
manifest - finished successfully
cp: error writing '/output/image/./disk.raw': Resource temporarily unavailable
Traceback (most recent call last):
  File "/usr/bin/osbuild", line 33, in <module>
    sys.exit(load_entry_point('osbuild==119', 'console_scripts', 'osbuild')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/osbuild/main_cli.py", line 197, in osbuild_cli
    export(pid, output_directory, object_store, manifest)
  File "/usr/lib/python3.12/site-packages/osbuild/main_cli.py", line 62, in export

containers/storage and composefs

The composefs project is a generic utility to create and mount filesystem trees; it knows nothing about OCI or containers.

The containers/storage project is a Go library for storing and mounting OCI/Docker containers; it can optionally use composefs.

Enabling

At the current time, the composefs backend is not enabled by default. Enabling it requires at least these flags:

$ cargo build --release
   Compiling krunkit v0.1.0 (/Users/walters/src/github/containers/krunkit)
error: linking with `cc` failed: exit status: 1
  |
  = note: env -u IPHONEOS_DEPLOYMENT_TARGET -u TVOS_DEPLOYMENT_TARGET LC_ALL="C" PATH="/Users/walters/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/usr/bin:/bin:/opt/podman/bin:/opt/homebrew/bin:/Users/walters/.cargo/bin:/usr/local/bin" VSLANG="1033" ZERO_AR_DATE="1" "cc" "-arch" "arm64" "/var/folders/9j/jpms114j76q64fhjrq8kw71w0000gn/T/rustcAo9YET/symbols.o" "/Users/walters/src/github/containers/krunkit/target/release/deps/krunkit-0fa2d8ec3a3c8061.krunkit.65e17eeac52f16f7-cgu.00.rcgu.o" "/Users/walters/src/github/containers/krunkit/target/release/deps/krunkit-0fa2d8ec3a3c8061.krunkit.65e17eeac52f16f7-cgu.01.rcgu.o" "/Users/walters/src/github/containers/krunkit/target/release/deps/krunkit-0fa2d8ec3a3c8061.krunkit.65e17eeac52f16f7-cgu.02.rcgu.o" "/Users/walters/src/github/containers/krunkit/target/release/deps/krunkit-
podman --log-level debug machine init --now 01/02/24 10:13:12 AM
INFO[0000] /Users/walters/src/github/containers/podman/bin/darwin/podman filtering at log level debug
DEBU[0000] Using Podman machine with `applehv` virtualization provider
DEBU[0000] Detected compression format gzip
Extracting compressed file: podman-machine-default_fedora-coreos-39.20231204.2.1-applehv.aarch64.raw: done
DEBU[0007] creating runtimeDir: /var/folders/9j/jpms114j76q64fhjrq8kw71w0000gn/T/podman
DEBU[0007] resizing disk to 100 GiB
DEBU[0007] resizing /Users/walters/.local/share/containers/podman/machine/applehv/podman-machine-default_fedora-coreos-39.20231204.2.1-applehv.aarch64.raw to 107374182400 bytes
Machine init complete
Starting machine "podman-machine-default"