Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions docs/skills/kernel-cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,20 @@ The installer also exercises LUKS/device-mapper, while OSTree needs its
filesystem support. `install-ogc-kernel.sh` enables these explicitly and checks
the same `required_config` list after `olddefconfig`, after installation, and
on cache extraction. Never omit a dracut module to work around a missing kernel
feature. Changes to this contract invalidate the cache through the existing
script hash and require a real kernel rebuild plus the ISO boot tests.
feature.

The installer also needs btrfs: the LUKS ISO test formats and mounts the root
on `btrfs`, and the OGC kernel's `x86_64_defconfig` omits `CONFIG_BTRFS_FS`, so
the gaming flavors' live kernel had no btrfs module -- `mkfs.btrfs` succeeded
and the mount then failed with `unknown filesystem type 'btrfs'`, the same
missing `/dev/btrfs-control` as a bare module, which looked like a bad
filesystem at install time. `install-ogc-kernel.sh` enables `BTRFS_FS` as a
module beside SquashFS/EROFS and asserts it in `required_config`, so the
absence fails the build rather than the install. `iso/scripts/luks-e2e.sh`
adds a `modprobe btrfs` pre-check before the installer runs, turning a repeat
into a one-line diagnosis. Changes to this contract invalidate the cache
through the existing script hash and require a real kernel rebuild plus the ISO
boot tests.

The contract also covers the display. `x86_64_defconfig` enables DRM and the
Intel i915 driver and nothing else, so on any other GPU, QEMU's included, the
Expand Down
14 changes: 14 additions & 0 deletions iso/scripts/luks-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,20 @@ cat > "${WORK}/recipe.json" <<EOF
EOF
scp_live "${WORK}/recipe.json" liveuser@127.0.0.1:/tmp/luks-recipe.json

# btrfs must be loadable in the live kernel before the installer formats the
# root on it. The OGC kernel the gaming flavors ship is a source build whose
# defconfig omitted CONFIG_BTRFS_FS, so the module was absent: mkfs.btrfs
# succeeded and the mount then failed with "unknown filesystem type 'btrfs'"
# (the same missing /dev/btrfs-control as a bare module), which reads as a bad
# filesystem or cryptsetup problem at install time. Fail here, in the live
# guest, with the real cause instead, so the next occurrence is a one-line
# diagnosis rather than a phase-3 failure deep in the installer.
echo "Checking the live kernel can load the btrfs module before install..."
if ! ssh_live 'sudo modprobe btrfs'; then
fail "live kernel cannot load the btrfs module (unknown filesystem type 'btrfs'): the gaming-flavor OGC kernel ships without CONFIG_BTRFS_FS, so the installer's mkfs.btrfs and mount fail. Rebuild the image -- scripts/install-ogc-kernel.sh enables CONFIG_BTRFS_FS and asserts it in required_config."
fi
echo " btrfs: loadable in the live kernel"

echo "Running the installer from the ISO's embedded store..."
ssh_live 'sudo /usr/local/bin/fisherman /tmp/luks-recipe.json'

Expand Down
9 changes: 5 additions & 4 deletions scripts/install-ogc-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ DNF="$(command -v dnf5 || command -v dnf)"
# simple-framebuffer device, and DRM_SIMPLEDRM drives it: an unaccelerated but
# real KMS device on any hardware, until a native driver takes over.
required_config=(SCHED_CLASS_EXT NTSYNC ANDROID_BINDERFS
OVERLAY_FS SQUASHFS SQUASHFS_ZSTD EROFS_FS
OVERLAY_FS SQUASHFS SQUASHFS_ZSTD EROFS_FS BTRFS_FS
BLK_DEV_LOOP ISO9660_FS BLK_DEV_DM DM_SNAPSHOT DM_CRYPT
CRYPTO_XTS FUSE_FS FS_VERITY
SYSFB_SIMPLEFB DRM_SIMPLEDRM)
Expand Down Expand Up @@ -126,9 +126,10 @@ scripts/config --enable BPF_SYSCALL --enable BPF_JIT \
--enable ANDROID_BINDER_IPC --enable ANDROID_BINDERFS \
--enable NTSYNC
scripts/config --module OVERLAY_FS --module SQUASHFS --enable SQUASHFS_ZSTD \
--module EROFS_FS --enable BLK_DEV_LOOP --enable ISO9660_FS \
--enable BLK_DEV_DM --module DM_SNAPSHOT --module DM_CRYPT \
--module CRYPTO_XTS --module FUSE_FS --enable FS_VERITY
--module EROFS_FS --module BTRFS_FS --enable BLK_DEV_LOOP \
--enable ISO9660_FS --enable BLK_DEV_DM --module DM_SNAPSHOT \
--module DM_CRYPT --module CRYPTO_XTS --module FUSE_FS \
--enable FS_VERITY
# The firmware framebuffer as a KMS device (see required_config above), plus
# the two paravirtual GPUs QEMU offers, so a VM gets a proper display rather
# than the boot framebuffer. Native GPU drivers for real gaming hardware
Expand Down
Loading