<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Suse-Labs on danyspin97's site</title><link>https://danyspin97.org/tags/suse-labs/</link><description>Recent content in Suse-Labs on danyspin97's site</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 13 May 2026 15:00:00 +0000</lastBuildDate><atom:link href="https://danyspin97.org/tags/suse-labs/index.xml" rel="self" type="application/rss+xml"/><item><title>Error recovery at boot with MicroOS and systemd-bless-boot</title><link>https://danyspin97.org/talks/health-checker-suse-labs/</link><pubDate>Wed, 13 May 2026 15:00:00 +0000</pubDate><guid>https://danyspin97.org/talks/health-checker-suse-labs/</guid><description>&lt;p>class: center, middle
name: start&lt;/p>
&lt;h3 id="error-recovery">Error recovery&lt;/h3>
&lt;h2 id="with-microos-and-systemd-bless-boot">with MicroOS and systemd-bless-boot&lt;/h2>
&lt;h2 id="purplefooterdanilo-spinellabrsuse-labs-ifab-fa-suse">.purple[.footer[Danilo Spinella&lt;br>SUSE Labs ![:i](fab fa-suse)]]&lt;/h2>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="who-am-i">Who am I&lt;/h2>
&lt;h3 id="danilo-spinellabr_linux-research-engineer_brfuture-technologies-team---greenifab-fa-suse">Danilo Spinella&lt;/br>&lt;em>Linux Research Engineer&lt;/em>&lt;/br>Future Technologies Team @ .green[![:i](fab fa-suse)]&lt;/h3>
&lt;hr>
&lt;h2 id="background-image-urlhttpsipinimgcom736xe4bbf6e4bbf6d987196ca49097a7604d734d89jpg">background-image: url(&lt;a href="https://i.pinimg.com/736x/e4/bb/f6/e4bbf6d987196ca49097a7604d734d89.jpg">https://i.pinimg.com/736x/e4/bb/f6/e4bbf6d987196ca49097a7604d734d89.jpg&lt;/a>)&lt;/h2>
&lt;p>class: left, middle&lt;/p>
&lt;h1 id="contents">Contents&lt;/h1>
&lt;p>health-checker&lt;/p>
&lt;p>Boot Loader Specification&lt;/p>
&lt;p>Automatic Boot Assessment&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h1 id="health-checker">health-checker&lt;/h1>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="opensuse-microos-and-suse-micro">openSUSE MicroOS and SUSE Micro&lt;/h2>
&lt;p>Immutable system (by using &lt;strong>btrfs snapshots&lt;/strong> and &lt;strong>transactional-update&lt;/strong>)&lt;/p>
&lt;p>User applications installed in containers&lt;/p>
&lt;p>Reliability first by leveraging snapshots&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="snapshots">Snapshots&lt;/h2>
&lt;p>Changing the system (adding and removing a package / updating the system) &lt;strong>creates a new snapshot&lt;/strong>&lt;/p>
&lt;p>Every snapshot has a different boot entry: &lt;code>rootflags=subvol=@/.snapshots/1/snapshot&lt;/code>&lt;/p>
&lt;p>&lt;code>transactional-update&lt;/code> handles btrfs snapshots and changes&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="health-checker-1">health-checker&lt;/h2>
&lt;p>Check the status of the system during the boot process&lt;/p>
&lt;p>&lt;strong>Plug-in based&lt;/strong>, each plug-in checks a different system component&lt;/p>
&lt;p>&lt;strong>Fail-safe mechanism&lt;/strong>, reboot on error to a working snapshot&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="health-checker-fail-safe">health-checker fail-safe&lt;/h2>
&lt;p>If a boot entry is new, &lt;strong>automatically reboot&lt;/strong> up to 3 times when the boot fails&lt;/p>
&lt;p>&lt;strong>Update&lt;/strong> the default entry to a working snapshot&lt;/p>
&lt;p>If the entry was working before: reboot one time, if it still fails, &lt;strong>open an emergency shell&lt;/strong>&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="health-checker-plugins-12">health-checker plugins (1/2)&lt;/h2>
&lt;p>&lt;strong>btrfs-subvolumes-mounted&lt;/strong>: Check all btrfs subvolumes from fstab are mounted&lt;/p>
&lt;p>&lt;strong>etc-overlayfs&lt;/strong>: Check that /etc overlayfs is mounted&lt;/p>
&lt;p>&lt;strong>logind&lt;/strong>: Check systemd-logind service status&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="health-checker-plugins-22">health-checker plugins (2/2)&lt;/h2>
&lt;p>&lt;strong>rebootmgr&lt;/strong>: Check rebootmgr service status&lt;/p>
&lt;p>&lt;strong>rpmdb-consistency&lt;/strong>: Verify RPM database integrity&lt;/p>
&lt;p>&lt;strong>tmp&lt;/strong>: Check /tmp mount status&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="plugin-example-logind-12">Plugin example: logind (1/2)&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="k">case&lt;/span> &lt;span class="s2">&amp;#34;&lt;/span>&lt;span class="nv">$1&lt;/span>&lt;span class="s2">&amp;#34;&lt;/span> in
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> check&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> run_checks
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">;;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> stop&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> stop_services
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">;;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> *&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nb">echo&lt;/span> &lt;span class="s2">&amp;#34;Usage: &lt;/span>&lt;span class="nv">$0&lt;/span>&lt;span class="s2"> {check|stop}&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nb">exit&lt;/span> &lt;span class="m">1&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="p">;;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">esac&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nb">exit&lt;/span> &lt;span class="m">0&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="plugin-example-logind-22">Plugin example: logind (2/2)&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">run_checks&lt;span class="o">()&lt;/span> &lt;span class="o">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> systemctl is-enabled -q systemd-logind
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nb">test&lt;/span> &lt;span class="nv">$?&lt;/span> -ne &lt;span class="m">0&lt;/span> &lt;span class="o">&amp;amp;&amp;amp;&lt;/span> &lt;span class="k">return&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> systemctl is-failed -q systemd-logind
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nb">test&lt;/span> &lt;span class="nv">$?&lt;/span> -ne &lt;span class="m">1&lt;/span> &lt;span class="o">&amp;amp;&amp;amp;&lt;/span> &lt;span class="nb">exit&lt;/span> &lt;span class="m">1&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">stop_services&lt;span class="o">()&lt;/span> &lt;span class="o">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> systemctl stop systemd-logind
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="o">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h1 id="boot-loader-specification-bls">Boot Loader Specification (BLS)&lt;/h1>
&lt;hr>
&lt;p>class: center, middle&lt;/p>
&lt;h2 id="linux-system">Linux system&lt;/h2>
&lt;p>
&lt;img src="https://danyspin97.org/img/health-checker-fosdem-26/linux.drawio.svg" alt=":resize 800">
&lt;/p>
&lt;hr>
&lt;p>class: middle, top&lt;/p>
&lt;h2 id="adding-another-system">Adding another system&amp;hellip;&lt;/h2>
&lt;p>&amp;ndash;&lt;/p>
&lt;p>The &lt;em>EFI partition&lt;/em> must be &lt;strong>unique&lt;/strong> on each disk&lt;/p>
&lt;p>&amp;ndash;&lt;/p>
&lt;p>Which bootloader will be the default? Does it read the other partition &lt;code>/boot&lt;/code> folder?&lt;/p>
&lt;hr>
&lt;p>class: middle, left&lt;/p>
&lt;h2 id="boot-loader-specification">Boot Loader Specification&lt;/h2>
&lt;p>Allow the boot loader menu entries to be &lt;strong>shared&lt;/strong> between &lt;em>multiple operating systems&lt;/em>&lt;/p>
&lt;p>Standardize configuration between bootloader, firmware and system components&lt;/p>
&lt;p>Supports two simple formats, found in &lt;code>/loader/entries&lt;/code>&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="boot-loader-specification-type1-entry">Boot Loader Specification type#1 entry&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-ini" data-lang="ini">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># /boot/efi/loader/entries/opensuse-microos-6.18.4-5-default-1.conf &lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">title openSUSE MicroOS 1&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">version 1@6.18.4-5-default&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">sort-key opensuse-microos&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">options quiet rootflags&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">subvol=@/.snapshots/1/snapshot systemd.show_status=yes console=ttyS0,115200 console=tty0 ignition.platform.id=qemu security=selinux selinux=1 root=UUID=8f71b02c-9905-b5e6-fafe-9efdb7c0ecd0&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">linux /opensuse-microos/6.18.4-5-default/linux-03046d37a644bdf18e0d0dbe4677405926c6df24&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">initrd /opensuse-microos/6.18.4-5-default/initrd-95afcf129ca424d5481026705a360d3bc92d5d75&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;p>class: middle, left&lt;/p>
&lt;h1 id="automatic-boot-assessment">Automatic Boot Assessment&lt;/h1>
&lt;hr>
&lt;p>class: middle, left&lt;/p>
&lt;h2 id="automatic-boot-assessment-1">Automatic Boot Assessment&lt;/h2>
&lt;p>&lt;strong>Revert back to the previous version&lt;/strong> of the OS or kernel when the system fails to boot&lt;/p>
&lt;p>Relies on &lt;strong>Boot Loader Specification&lt;/strong> and support from system components&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="boot-counting">Boot counting&lt;/h2>
&lt;p>Add a number of boot attempts on new boot entries&lt;/p>
&lt;p>Entries with non-zero tries left are &amp;ldquo;&lt;em>indeterminate&lt;/em>&amp;rdquo;&lt;/p>
&lt;p>Entries without boot counting are considered &amp;ldquo;&lt;em>good&lt;/em>&amp;rdquo;&lt;/p>
&lt;p>Entries with zero tries left are &amp;ldquo;&lt;em>bad&lt;/em>&amp;rdquo;&lt;/p>
&lt;hr>
&lt;p>class: center, middle&lt;/p>
&lt;p>
&lt;img src="https://danyspin97.org/img/health-checker-fosdem-26/boot-counting.drawio.svg" alt=":resize 1000">
&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="installing-new-entries">Installing new entries&lt;/h2>
&lt;p>The initial counter defined in &lt;code>/etc/kernel/tries&lt;/code>&lt;/p>
&lt;p>&lt;strong>kernel-install&lt;/strong> adds boot entries with the boot counter enabled&lt;/p>
&lt;p>&lt;strong>sdbootutil&lt;/strong> manages the boot counter when editing the boot entries&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="bootloader-support">Bootloader support&lt;/h2>
&lt;p>Put the entries with zero left tries at the bottom&lt;/p>
&lt;p>Adjust boot counter when an entry is booted&lt;/p>
&lt;p>&lt;strong>systemd-boot&lt;/strong> and &lt;strong>grub2&lt;/strong>&lt;em>*&lt;/em> supports Automatic Boot Assessment, but support can be extended to any bootloader&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="grub2-12">grub2 (1/2)&lt;/h2>
&lt;p>&lt;em>BLS&lt;/em> support added by different set of patches (one by &lt;em>Fedora&lt;/em> and one by &lt;em>openSUSE&lt;/em>)&lt;/p>
&lt;p>Upstream &lt;em>grub2 2.14&lt;/em> added initial &lt;strong>incomplete BLS support&lt;/strong>&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="grub2-22">grub2 (2/2)&lt;/h2>
&lt;p>&lt;em>Boot counting&lt;/em> and partial BLI support &lt;strong>implemented via downstream&lt;/strong> patches in &lt;em>openSUSE&lt;/em>*&lt;/p>
&lt;p>The patches are currently being reviewed upstream (&lt;a href="https://gitlab.freedesktop.org/gnu-grub/grub/-/merge_requests/124">MR&lt;/a>)&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="boottarget">boot.target&lt;/h2>
&lt;p>Services that check for a successful boot (like health-checker)&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-systemd" data-lang="systemd">&lt;span class="line">&lt;span class="cl">&lt;span class="na">RequiredBy&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">boot-complete.target&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Services that run when the system boots successfully (like systemd-bless-boot)&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-systemd" data-lang="systemd">&lt;span class="line">&lt;span class="cl">&lt;span class="na">Requires&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">boot-complete.target&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="na">After&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="s">boot-complete.target&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="systemd-bless-boot">systemd-bless-boot&lt;/h2>
&lt;p>Remove the boot counter when the boot succeeds&lt;/p>
&lt;p>Get the status of the current boot entry&lt;/p>
&lt;p>Change the status of a boot entry&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="issues-with-automatic-boot-assessment">Issues with Automatic Boot Assessment&lt;/h2>
&lt;p>&lt;strong>No automatic reboot&lt;/strong> on failed boot - user must manually intervene&lt;/p>
&lt;p>&lt;strong>Default entry not updated&lt;/strong> - next boot attempts the same failed entry&lt;/p>
&lt;p>&lt;strong>Simple by design&lt;/strong> - bootloaders can&amp;rsquo;t (and shouldn&amp;rsquo;t) understand complex failure scenarios&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="health-checker-fail-safe-in-detail">health-checker fail-safe (in detail)&lt;/h2>
&lt;p>Checks the status of the boot entry by using &lt;code>systemd-bless-boot&lt;/code>&lt;/p>
&lt;p>&lt;strong>Update&lt;/strong> or &lt;strong>remove&lt;/strong> the current default entry to use the bootloader&amp;rsquo;s sorting&lt;/p>
&lt;p>If the entry has boot counting enabled, &lt;strong>reboot automatically&lt;/strong> (can be disabled via kernel cmdline)&lt;/p>
&lt;p>If the entry was working before: reboot one time, if it still fails, &lt;strong>opens an emergency shell&lt;/strong>&lt;/p>
&lt;hr>
&lt;p>class: left, middle&lt;/p>
&lt;h2 id="thank-you-for-your-attention">Thank you for your attention&lt;/h2>
&lt;h1 id="questions-ifa-fa-question">Questions ![:i](fa fa-question)&lt;/h1>
&lt;hr>
&lt;p>template: start&lt;/p></description></item></channel></rss>