- Download RHCOS 4.1 from the RHCOS release browser (qemu qcow2) or the mirror (metal BIOS or UEFI image).
- Write a spec v2 Ignition config that sets the password for
core
to e.g.changeme
:
{
"ignition": {
"config": {},
"security": {
"tls": {}
},
"timeouts": {},
"version": "2.2.0"
},
"passwd": {
"users": [
{
"name": "core",
"groups": [
"sudo",
"wheel"
],
"passwordHash": "$6$QoJFNpDLghwtyeZV$dINZU8AH.2Q/wfFF9HbVKg9zZ7AFUagaCZO.n/Ma19y8mhbmXZydKXRJy7L9WsVRBKySnBJp3dq7UmcgIlx2u."
}
]
}
}
- Boot it using
kola qemuexec --qemu-image image.qcow2 --ignition-direct -i config.ign -U
. Log in usingcore
/changeme
.- For the metal images, you can just pass the .raw file directly to the
--qemu-image
field. You'll also want to add--kargs ignition.platform.id=qemu
. - For the UEFI metal image, additionally pass
--qemu-firmware uefi
.
- For the metal images, you can just pass the .raw file directly to the
- Rebase the guest using the same
deploy-from-self
trick that the MCO uses:
setenforce 0
IMG=localhost/rhel-9.6
podman run --privileged --pid=host --net=host --rm -v /:/run/host $IMG rpm-ostree ex deploy-from-self /run/host
(The IMG
there is normally e.g. the latest RHCOS 9.6 pullspec. But if you're using a locally built rhel-9.6 anyway, it might be easier to just e.g. curl down the OCI archive from the host and then skopeo copy
it into container storage in the guest.)