A failed installer step still ends on "installation complete" #25

Closed
opened 2026-09-26 07:27:40 +08:00 by Breadway · 4 comments
Owner

Problem

modules/shellprocess.conf runs "-/usr/bin/bash /etc/calamares/post-install.sh". The leading - makes Calamares ignore the exit status, and the script deliberately avoids set -e. Boot-critical steps (mkinitcpio -P, both grub-install calls, grub-mkconfig, the snapper config) only echo "WARN: ...". A failed bootloader install still shows the success screen.

Where

  • iso/airootfs/etc/calamares/modules/shellprocess.conf line 10
  • iso/airootfs/etc/calamares/post-install.sh lines 179, 197-220, 360-376

Fix

  • Split steps into critical and best-effort. Critical: kernel present, mkinitcpio -P, at least one successful grub-install, grub-mkconfig, /boot/grub/grub.cfg exists and references vmlinuz-linux, the ESP holds EFI/BOOT/BOOTX64.EFI (UEFI).
  • Record critical failures in a CRITICAL_FAILED array. At the end, print them and exit 1 if the array isn't empty.
  • Remove the - prefix, so Calamares shows its error page.
  • Keep best-effort steps (plymouth, ufw, mDNS, etc.) as warnings.
  • Write the full log to /var/log/bos-install.log on the target.

Acceptance

  • Temporarily break grub-install (e.g. unmount /boot/efi before it runs). Calamares shows an error, not the finished page.
  • A normal install still succeeds.

Source: BOS v0.6.2 source review (tag dated 2026-09-19); paths and line numbers refer to that tree. Read AGENTS.md first. One issue per branch/PR, match existing style. Verify with FAST_BUILD=1 sudo ./build-local.sh plus UEFI and BIOS VM installs. Add a CHANGELOG [Unreleased] entry.

## Problem `modules/shellprocess.conf` runs `"-/usr/bin/bash /etc/calamares/post-install.sh"`. The leading `-` makes Calamares ignore the exit status, and the script deliberately avoids `set -e`. Boot-critical steps (`mkinitcpio -P`, both `grub-install` calls, `grub-mkconfig`, the snapper config) only `echo "WARN: ..."`. A failed bootloader install still shows the success screen. ## Where - `iso/airootfs/etc/calamares/modules/shellprocess.conf` line 10 - `iso/airootfs/etc/calamares/post-install.sh` lines 179, 197-220, 360-376 ## Fix - Split steps into **critical** and **best-effort**. Critical: kernel present, `mkinitcpio -P`, at least one successful `grub-install`, `grub-mkconfig`, `/boot/grub/grub.cfg` exists and references `vmlinuz-linux`, the ESP holds `EFI/BOOT/BOOTX64.EFI` (UEFI). - Record critical failures in a `CRITICAL_FAILED` array. At the end, print them and `exit 1` if the array isn't empty. - Remove the `-` prefix, so Calamares shows its error page. - Keep best-effort steps (plymouth, ufw, mDNS, etc.) as warnings. - Write the full log to `/var/log/bos-install.log` on the target. ## Acceptance - Temporarily break `grub-install` (e.g. unmount `/boot/efi` before it runs). Calamares shows an error, not the finished page. - A normal install still succeeds. --- Source: BOS v0.6.2 source review (tag dated 2026-09-19); paths and line numbers refer to that tree. Read AGENTS.md first. One issue per branch/PR, match existing style. Verify with `FAST_BUILD=1 sudo ./build-local.sh` plus UEFI and BIOS VM installs. Add a CHANGELOG `[Unreleased]` entry.
Author
Owner

PR: #55

Post-install now collects boot-critical failure messages, keeps attempting remaining setup, writes full output to /var/log/bos-install.log, and exits non-zero so Calamares shows its error page. bash -n, shellprocess YAML parsing, git diff --check, and the FAST_BUILD ISO build passed. The build reported the existing nbd-client initramfs hook warning.

Outstanding acceptance checks: a normal UEFI VM install, a normal BIOS VM install, and a UEFI install with grub-install deliberately failing to confirm Calamares shows the error page. These GUI installer checks are not yet run, so leaving BOS-25 in DOING.

PR: https://git.breadway.dev/Breadway/bos/pulls/55 Post-install now collects boot-critical failure messages, keeps attempting remaining setup, writes full output to `/var/log/bos-install.log`, and exits non-zero so Calamares shows its error page. `bash -n`, shellprocess YAML parsing, `git diff --check`, and the FAST_BUILD ISO build passed. The build reported the existing `nbd-client` initramfs hook warning. Outstanding acceptance checks: a normal UEFI VM install, a normal BIOS VM install, and a UEFI install with `grub-install` deliberately failing to confirm Calamares shows the error page. These GUI installer checks are not yet run, so leaving BOS-25 in DOING.
Author
Owner

Independent review of PR #55 found the error-reporting changes in place, but the required injected grub-install failure and successful UEFI/BIOS installation checks have not run. Forgejo reports the PR is not mergeable. No VM validation is currently active, so returning BOS-25 to TODO.

Independent review of PR #55 found the error-reporting changes in place, but the required injected grub-install failure and successful UEFI/BIOS installation checks have not run. Forgejo reports the PR is not mergeable. No VM validation is currently active, so returning BOS-25 to TODO.
Author
Owner

Updated existing PR #55 with current origin/main (5ae8040), preserving both the installer failure and main changelog entries. Head is 6478e5fe762f5a3166eb0158a7735f5e97b35ad2. bash -n, static critical-failure wiring checks, and PR-diff whitespace checks pass. BOS has no ordinary-push CI configured. A normal UEFI install, a normal BIOS install, and the injected grub-install failure page are still unverified. Root directed no further guest input and no additional VM, so this acceptance cannot be completed in the current run. BOS-25 remains TODO pending those checks.

Updated existing PR #55 with current `origin/main` (5ae8040), preserving both the installer failure and main changelog entries. Head is `6478e5fe762f5a3166eb0158a7735f5e97b35ad2`. `bash -n`, static critical-failure wiring checks, and PR-diff whitespace checks pass. BOS has no ordinary-push CI configured. A normal UEFI install, a normal BIOS install, and the injected `grub-install` failure page are still unverified. Root directed no further guest input and no additional VM, so this acceptance cannot be completed in the current run. BOS-25 remains TODO pending those checks.
Author
Owner

PR #55 has the implementation and static failure-path checks recorded on the rebased head. A normal UEFI install, normal BIOS install, and injected grub-install failure page remain unverified; BOS has no ordinary push CI. Moving the implementation to REVIEW for the requested handoff. Do not treat as verified or done until those acceptance checks are recorded.

PR #55 has the implementation and static failure-path checks recorded on the rebased head. A normal UEFI install, normal BIOS install, and injected grub-install failure page remain unverified; BOS has no ordinary push CI. Moving the implementation to REVIEW for the requested handoff. Do not treat as verified or done until those acceptance checks are recorded.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bos#25
No description provided.