Skip to content

iso/calamares: run grub-install + update-grub after bootloader, and fix eggs' own boot-fix from silently going stale - #26

Open
cyryllo wants to merge 1 commit into
MTSistemi:mainfrom
cyryllo:fix/calamares-grub-boot-reconfigure
Open

iso/calamares: run grub-install + update-grub after bootloader, and fix eggs' own boot-fix from silently going stale#26
cyryllo wants to merge 1 commit into
MTSistemi:mainfrom
cyryllo:fix/calamares-grub-boot-reconfigure

Conversation

@cyryllo

@cyryllo cyryllo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What's broken

The iso/ live-build Calamares sequence stops at bootloader:

- grubcfg
- bootloader
- shellprocess@post-install   # snapper only
- umount

Nothing re-runs grub-install/update-grub afterwards, and nothing repairs
the kernel files unpackfs writes. Two already-diagnosed bugs follow directly
from that gap:

The fix for both already exists in this repo as
scripts/fix-eggs-calamares-boot.py and system/usr/local/bin/skillfish-fix-boot-extents
— but:

  1. That fix only patches the eggs/penguins-eggs build pipeline (templates
    under /etc/penguins-eggs.d/distros/*/calamares/modules and the live
    /etc/calamares/modules on the build machine). It never touches
    iso/config/includes.chroot/etc/calamares/..., so an ISO built the
    documented way (docs/BUILD.md, iso/build.sh, plain live-build) ships
    with neither fix.
  2. skillfish-fix-boot-extents lives under system/, which iso/ does not
    sync from — it was never actually shipped in a live-build ISO.
  3. fix-eggs-calamares-boot.py itself isn't invoked by anything — not
    scripts/build-iso.sh, not CI. It has to be remembered and run by hand
    before every eggs produce, and a penguins-eggs package upgrade can
    silently overwrite the very templates it patches (as already happened once
    to customize-partitions.js/show.qml, per the comments in that file).

What this PR does

  • Add iso/config/includes.chroot/etc/calamares/modules/shellprocess@boot_reconfigure.conf:
    after bootloader, run skillfish-fix-boot-extents, then grub-install
    twice (normal NVRAM entry + --removable), then update-grub. Content
    mirrors the already-verified RECONF_BODY in fix-eggs-calamares-boot.py.
  • Ship skillfish-fix-boot-extents under iso/config/includes.chroot/usr/local/bin/
    (copied from system/, 755) so it actually exists on a live-build install.
  • Wire shellprocess@boot_reconfigure into settings.conf's exec sequence,
    right after bootloader and before umount.
  • scripts/build-iso.sh: run fix-eggs-calamares-boot.py before every
    eggs produce and abort the build if its own verify() fails, instead
    of relying on someone remembering to run it by hand. This closes gap deps(website): bump astro from 5.18.2 to 6.4.4 in /website in the astro group across 1 directory #3
    above for the eggs pipeline without touching the pipeline's logic itself.

How I tested this

I have not built or booted an ISO from iso/ with this change — no BC-250
hardware or VM available in this environment. What I did verify:

  • bash -n scripts/build-iso.sh — syntax OK.
  • The new shellprocess@boot_reconfigure.conf content is byte-for-byte the
    same script body already exercised and confirmed working in a VM per the
    comments in scripts/fix-eggs-calamares-boot.py ("verificato in VM il
    10/08/2026") — I only relocated it to the module Calamares actually loads
    for the iso/ pipeline, plus adjusted the sequence/settings wiring.
  • skillfish-fix-boot-extents is copied unmodified from system/.

This needs a real install test before merging — both an ext4 install and
a btrfs install, checking that the system boots both from the NVRAM entry and
from the removable EFI fallback path. I'm not in a position to do that BC-250
hardware test myself; flagging it explicitly rather than claiming it's
verified.

Fixes #12, Fixes #20 (pending the hardware test above).

…Sistemi#12, MTSistemi#20)

The live-build (iso/) Calamares config stopped at the bootloader module, so
neither the removable EFI fallback grub.cfg stub (MTSistemi#20, hits ext4 and btrfs
alike) nor the btrfs kernel-extent corruption (MTSistemi#12) ever got fixed on an
install produced from iso/ — the fix only existed as a standalone helper
(scripts/fix-eggs-calamares-boot.py) targeting the separate eggs/penguins-eggs
build pipeline, and that script itself was never invoked by any build or CI.

- Add shellprocess@boot_reconfigure.conf: re-runs grub-install for both the
  normal NVRAM entry and --removable, then update-grub, and calls
  skillfish-fix-boot-extents first.
- Ship skillfish-fix-boot-extents in iso/config/includes.chroot (previously
  only present under system/, which iso/ does not sync from).
- Wire shellprocess@boot_reconfigure into settings.conf, right after
  bootloader.
- scripts/build-iso.sh: run fix-eggs-calamares-boot.py before every
  eggs produce and abort the build if its own verify() step fails, so the
  eggs pipeline can't silently ship the same broken GRUB config again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant