RHEL 10 image mode:bootc CLI 能装,但传统系统不是 bootc 主机
This content is not available in your language yet.
“装了 bootc 就是 image mode”是常见误解。bootc 只是一个客户端;传统 RHEL 上它能看到自己“不是 bootc 主机”,upgrade 会直接失败。本页把这套边界在 390 上跑出来。
在 PVE 390 rhel10-lab(RHEL 10.2)执行:
sudo dnf -y install bootcbootc --versionsudo bootc statussudo bootc upgradebootc install --helpE3 记录:plans/content-expansion/evidence/rhel/rhel-image-mode/run.json(4 步)。
先给结论:CLI ≠ image mode
Section titled “先给结论:CLI ≠ image mode”$ bootc --versionbootc 1.16.4$ rpm -q bootcbootc-1.16.4-2.el10_2.x86_64传统主机装完 CLI,bootc status 仍然说“没有镜像”:
apiVersion: org.containers.bootc/v1kind: BootcHostmetadata: name: hostspec: image: null bootOrder: defaultstatus: staged: null booted: null rollback: null rollbackQueued: false type: null usrOverlay: nullspec.image: null 表示系统不是从 bootc 镜像部署的。
upgrade 报错
Section titled “upgrade 报错”$ sudo bootc upgradeerror: Initializing storage: System not booted via bootc这不是“没订阅/没网络”,而是启动链不是 bootc:没有 /sysroot 的 bootc 部署元数据。
install 子命令
Section titled “install 子命令”$ bootc install --helpInstall the running container to a target.Takes a container image and installs it to disk in a bootable format.Usage: bootc install <COMMAND>bootc install to-disk 可以从 live/容器环境把镜像写到磁盘;本次没有拉取镜像、也没有覆盖任何磁盘。
image mode 的前提
Section titled “image mode 的前提”要真正进入 image mode,至少需要:
- 一个 bootc 格式的容器镜像(含
/usr等); - 从该镜像部署(
bootc install to-disk或厂商提供的 image mode 镜像); - 系统从该部署启动,
bootc status的spec.image非 null; - 之后
bootc upgrade/switch才有意义。
只 dnf install bootc 不会转换现有系统。
-
bootc --version与包版本; -
bootc status的spec.image是否非 null; - 传统系统预期
upgrade报 “System not booted via bootc”; -
bootc install只在空盘/独立 VM 做; - 镜像来源、digest、签名已记录。
未实测与边界
Section titled “未实测与边界”- 未拉取/部署 bootc 镜像;
- 未测试
bootc switch/upgrade的实际更新; - 未测试 image mode 的回滚;
- 未测试容器存储/签名策略。
- RHEL 10 Image Builder — 镜像构建
- RHEL 10 Podman rootless — 容器基础
- 官方:Using image mode for RHEL