Skip to content

Instantly share code, notes, and snippets.

View jlebon's full-sized avatar

Jonathan Lebon jlebon

View GitHub Profile
@jlebon
jlebon / gemini-pro.md
Last active June 5, 2025 18:53
One-shot asking Goose (w/ Gemini Pro) about the MCO using OpenShift docs
( O)> using the docs in this repo, what is the machine config operator?
I'll start by searching the documentation for "Machine Config Operator" to understand what it is.
─── shell | developer ──────────────────────────
command: rg "Machine Config Operator" -l



Okay, many files. I'll check `modules/understanding-machine-config-operator.adoc` and `modules/machine-config-operator.adoc` first, starting with the former.
─── text_editor | developer ──────────────────────────
@jlebon
jlebon / README.md
Last active June 4, 2025 15:20
Boot RHCOS 4.1 and rebase to RHCOS 9.6
  1. Download RHCOS 4.1 from the RHCOS release browser (qemu qcow2) or the mirror (metal BIOS or UEFI image).
  2. Write a spec v2 Ignition config that sets the password for core to e.g. changeme:
{
  "ignition": {
    "config": {},
    "security": {
      "tls": {}
    },
    "timeouts": {},
@jlebon
jlebon / os-release
Created September 27, 2024 19:24
/etc/os-release in "pure RHEL" RHCOS system
NAME="Red Hat Enterprise Linux CoreOS"
VERSION="9.4.202409221629-0 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux CoreOS 9.4.202409221629-0 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
@jlebon
jlebon / gist:ffd60c37da4575f8d71f91485ebd1bf7
Created July 28, 2020 14:51
Using gdb from a container to debug rpm-ostree
Start the container using at least these switches:
(host) podman run -ti \
--privileged \
--pid=host \
-v /:/host \
--name gdb \
--detach-keys=ctrl-t \
registry.fedoraproject.org/fedora:32 /bin/bash
@jlebon
jlebon / meta.json
Created June 5, 2020 20:25
testing db diff with parent-diff
{
"ref": "fedora/x86_64/coreos/testing",
"ostree-n-metadata-total": 8363,
"ostree-n-metadata-written": 2800,
"ostree-n-content-total": 4836,
"ostree-n-content-written": 241,
"ostree-n-cache-hits": 15054,
"ostree-content-bytes-written": 120538393,
"ostree-commit": "f482e2f1870124abf1f0094b7fcc66f86db8394a4096e1e66984b80178e84b34",
"ostree-content-checksum": "ca63ec06f384ec21076be1f0f14c6c80fdaaf7edd1d862733942cd46c2541a88",
@jlebon
jlebon / udev-rule.json
Created March 13, 2020 14:14
Create udev rule via Ignition
{
"ignition": {
"version": "2.2.0"
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/udev/rules.d/39-redhat.rules",
"mode": 420,
@jlebon
jlebon / config-var-partitions.ign
Last active November 29, 2019 03:28
Ignition v3 config with many /var partitions -- use with e.g. `cosa run --size 15 -i config-var-partitions.ign`
{
"ignition": {
"config": {},
"security": {
"tls": {}
},
"timeouts": {},
"version": "3.0.0"
},
"passwd": {
@jlebon
jlebon / iterating-on-ignition.md
Last active August 18, 2019 16:39
Iterating on Ignition or other things in the initrd

Switch to a dev branch and enable initrd regeneration:

ostree commit -b dev --fsync=no --tree=ref=$booted_commit
rpm-ostree rebase :dev
rpm-ostree initramfs --enable
reboot

Updating files:

{
"ignition": {
"config": {},
"security": {
"tls": {}
},
"timeouts": {},
"version": "2.2.0"
},
"networkd": {},
[
{
"ID": "c5e0871c45fbc1d5b15d486c146f5022c35b4a46a49d14622e6f90da469c65df",
"Created": "2018-08-07T14:09:31.854809081-04:00",
"Path": "/bin/bash",
"Args": [
"/bin/bash"
],
"State": {
"OciVersion": "1.0.0",