Skip to content

manifest: add set -e to bootc switch... kickstart %post#2093

Merged
thozza merged 1 commit intoosbuild:mainfrom
mvo5:bootc-ks-fatal-on-error
Dec 17, 2025
Merged

manifest: add set -e to bootc switch... kickstart %post#2093
thozza merged 1 commit intoosbuild:mainfrom
mvo5:bootc-ks-fatal-on-error

Conversation

@mvo5
Copy link
Contributor

@mvo5 mvo5 commented Dec 15, 2025

The bootc switch command we use in our bootc installer ISOs stopped working [0] with the error:

error: Switching: Initializing storage: System not booted via bootc

However the install continue because while we do set --erroronfail the script is not setting set -e.

This commit fixes this and makes the bootc switch error in script a hard failure. This means that installs will error currently but its better to error than to install a system that is then not connected to any updates :(

With that the install looks like this:

Configuring installed system
........
Writing network configuration
.
Creating users
.....
Configuring addons
Generating initramfs
....
Storing configuration files and kickstarts
.
Running post-installation scripts
====================================================================
====================================================================
Error

  There was an error running the kickstart script at line 12.  This 
  error and installation will be aborted.  The details of this error
  
  error: Switching: Initializing storage: System not booted via boot
  

Press ENTER to exit: 
care:fatal==

which is not great but preferable (IMHO) over the current silent error.

[0] osbuild/image-builder-cli#410

@mvo5 mvo5 requested a review from a team as a code owner December 15, 2025 16:25
@mvo5 mvo5 requested review from bcl, lzap and thozza December 15, 2025 16:25
lzap
lzap previously approved these changes Dec 15, 2025
supakeen
supakeen previously approved these changes Dec 15, 2025
@supakeen supakeen enabled auto-merge December 15, 2025 17:11
@supakeen supakeen added this pull request to the merge queue Dec 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 16, 2025
thozza
thozza previously approved these changes Dec 16, 2025
Copy link
Member

@thozza thozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but the PR needs a rebase @mvo5

@mvo5 mvo5 dismissed stale reviews from thozza, supakeen, and lzap via 939f52a December 16, 2025 08:13
@mvo5 mvo5 force-pushed the bootc-ks-fatal-on-error branch from 51b0ab1 to 939f52a Compare December 16, 2025 08:13
The `bootc switch` command we use in our bootc installer ISOs
stopped working [0] with the error:
```
error: Switching: Initializing storage: System not booted via bootc
```

However the install continue because while we do set
`--erroronfail` the script is not setting `set -e`.

This commit fixes this and makes the bootc switch error in script
a hard failure. This means that installs will error currently
but its better to error than to install a system that is then
not connected to any updates :(

[0] osbuild/image-builder-cli#410
@lzap lzap force-pushed the bootc-ks-fatal-on-error branch from 939f52a to 5a9de35 Compare December 16, 2025 09:00
@supakeen supakeen enabled auto-merge December 16, 2025 09:30
@supakeen supakeen added this pull request to the merge queue Dec 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 16, 2025
@thozza thozza added this pull request to the merge queue Dec 17, 2025
Merged via the queue into osbuild:main with commit 818b24b Dec 17, 2025
23 checks passed
croissanne added a commit to croissanne/osbuild-composer that referenced this pull request Jan 21, 2026
Changes with 0.231.0
----------------
  - Drop iommu.strict=0 from aarch64 EC2 images (osbuild/images#2090)
    - Author: Achilleas Koutsou, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
  - bootc: Fix selinux labeling when using separate build container (osbuild/images#2092)
    - Author: Alexander Larsson, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
  - ci: resolve dubious ownership for git (osbuild/images#2100)
    - Author: Lukáš Zapletal, Reviewers: Achilleas Koutsou, Michael Vogt
  - data: import RH v4 key on rhel-10.1+ only (osbuild/images#2097)
    - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger
  - distrodefs: drop `use_syslinux` as it has no effect (osbuild/images#2088)
    - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger
  - fedora: /boot on btrfs for Fedora Cloud 44 (HMS-9737) (osbuild/images#1960)
    - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Neal Gompa (ニール・ゴンパ), Tomáš Hozza
  - fedora: add `server-network-installer` (osbuild/images#2094)
    - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza
  - installer: only install `syslinux` when needed (osbuild/images#2089)
    - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza
  - manifest: add `set -e` to `bootc switch...` kickstart %post (osbuild/images#2093)
    - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
  - many: include legal and license files in ISO (osbuild/images#2099)
    - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza
  - osbuild: drop `valueIn` helper (osbuild/images#2086)
    - Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger
  - readme: update link to image definitions (osbuild/images#2070)
    - Author: Anna Vítová, Reviewers: Achilleas Koutsou, Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
  - test: cross arch build/boot smoke test for ppc64le,s390x (osbuild/images#2069)
    - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
achilleas-k pushed a commit to osbuild/osbuild-composer that referenced this pull request Jan 21, 2026
Changes with 0.231.0
----------------
  - Drop iommu.strict=0 from aarch64 EC2 images (osbuild/images#2090)
    - Author: Achilleas Koutsou, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
  - bootc: Fix selinux labeling when using separate build container (osbuild/images#2092)
    - Author: Alexander Larsson, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
  - ci: resolve dubious ownership for git (osbuild/images#2100)
    - Author: Lukáš Zapletal, Reviewers: Achilleas Koutsou, Michael Vogt
  - data: import RH v4 key on rhel-10.1+ only (osbuild/images#2097)
    - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger
  - distrodefs: drop `use_syslinux` as it has no effect (osbuild/images#2088)
    - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger
  - fedora: /boot on btrfs for Fedora Cloud 44 (HMS-9737) (osbuild/images#1960)
    - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Neal Gompa (ニール・ゴンパ), Tomáš Hozza
  - fedora: add `server-network-installer` (osbuild/images#2094)
    - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza
  - installer: only install `syslinux` when needed (osbuild/images#2089)
    - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza
  - manifest: add `set -e` to `bootc switch...` kickstart %post (osbuild/images#2093)
    - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
  - many: include legal and license files in ISO (osbuild/images#2099)
    - Author: Simon de Vlieger, Reviewers: Lukáš Zapletal, Tomáš Hozza
  - osbuild: drop `valueIn` helper (osbuild/images#2086)
    - Author: Michael Vogt, Reviewers: Brian C. Lane, Simon de Vlieger
  - readme: update link to image definitions (osbuild/images#2070)
    - Author: Anna Vítová, Reviewers: Achilleas Koutsou, Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
  - test: cross arch build/boot smoke test for ppc64le,s390x (osbuild/images#2069)
    - Author: Michael Vogt, Reviewers: Lukáš Zapletal, Simon de Vlieger, Tomáš Hozza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants