Gracefully handle installations on ZFS file systems#5938
Open
berenddeboer wants to merge 8 commits into
Open
Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
ZFS root pools record a hostid, and UKIs rebuilt without /etc/hostid can fail to import the pool during early boot. Add a ZFS-only mkinitcpio drop-in so limine-mkinitcpio includes the installed system hostid before generating boot artifacts.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR refactors pacman configuration into a reusable helper and expands install/runtime support to ZFS alongside Btrfs, including Limine/mkinitcpio and snapshot behavior updates.
Changes:
- Centralize pacman config/mirrorlist application into
use_omarchy_pacman_configand reuse it in preflight/post-install. - Allow ZFS as a supported root filesystem in install guards and adjust Limine/mkinitcpio hooks accordingly.
- Extend
omarchy-snapshotto create ZFS snapshots when the root filesystem is ZFS.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| install/preflight/pacman.sh | Uses the new pacman helper function during online install preflight. |
| install/preflight/guard.sh | Permits ZFS root alongside Btrfs for snapshot-capable installs. |
| install/post-install/pacman.sh | Reuses the centralized pacman config helper. |
| install/login/limine-snapper.sh | Adds ZFS-specific mkinitcpio hooks and gates snapper/limine-snapper-sync logic to Btrfs; adjusts Limine config file access via sudo. |
| install/helpers/pacman.sh | Introduces use_omarchy_pacman_config, preserving existing [archzfs] repo config. |
| install/helpers/all.sh | Sources the new pacman helper as part of helper bootstrap. |
| bin/omarchy-snapshot | Adds ZFS snapshot creation/retention logic; keeps snapper flow for non-ZFS. |
| bin/omarchy-hibernation-setup | Skips hibernation setup unless root is Btrfs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| if [[ -f /etc/pacman.conf ]]; then | ||
| archzfs_repo=$(awk ' | ||
| /^\[/ { in_archzfs = ($0 == "[archzfs]") } |
Comment on lines
+12
to
+13
| sudo cp -f "$OMARCHY_PATH/default/pacman/pacman-$mirror.conf" /etc/pacman.conf | ||
| sudo cp -f "$OMARCHY_PATH/default/pacman/mirrorlist-$mirror" /etc/pacman.d/mirrorlist |
Comment on lines
+24
to
33
| if sudo test -f /boot/EFI/arch-limine/limine.conf; then | ||
| limine_config="/boot/EFI/arch-limine/limine.conf" | ||
| elif [[ -f /boot/EFI/BOOT/limine.conf ]]; then | ||
| elif sudo test -f /boot/EFI/BOOT/limine.conf; then | ||
| limine_config="/boot/EFI/BOOT/limine.conf" | ||
| elif [[ -f /boot/EFI/limine/limine.conf ]]; then | ||
| elif sudo test -f /boot/EFI/limine/limine.conf; then | ||
| limine_config="/boot/EFI/limine/limine.conf" | ||
| elif [[ -f /boot/limine/limine.conf ]]; then | ||
| elif sudo test -f /boot/limine/limine.conf; then | ||
| limine_config="/boot/limine/limine.conf" | ||
| elif [[ -f /boot/limine.conf ]]; then | ||
| elif sudo test -f /boot/limine.conf; then | ||
| limine_config="/boot/limine.conf" |
| fi | ||
|
|
||
| CMDLINE=$(grep "^[[:space:]]*cmdline:" "$limine_config" | head -1 | sed 's/^[[:space:]]*cmdline:[[:space:]]*//') | ||
| CMDLINE=$(sudo grep "^[[:space:]]*cmdline:" "$limine_config" | head -1 | sed 's/^[[:space:]]*cmdline:[[:space:]]*//') |
Comment on lines
1
to
5
| source $OMARCHY_INSTALL/helpers/chroot.sh | ||
| source $OMARCHY_INSTALL/helpers/pacman.sh | ||
| source $OMARCHY_INSTALL/helpers/presentation.sh | ||
| source $OMARCHY_INSTALL/helpers/errors.sh | ||
| source $OMARCHY_INSTALL/helpers/logging.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[archzfs]pacman repo when Omarchy replaces pacman config./etc/hostidin the ZFS initramfs so imported pools continue to boot reliably.omarchy-*ZFS snapshots for ZFS roots and retain the newest five snapshots; keep the existing Snapper snapshot path for non-ZFS roots.This does not enable or install ZFS. It only keeps Omarchy from rejecting or breaking an already configured ZFS-root system, preserves the ZFS boot requirements, and lets Omarchy's snapshot command create root dataset snapshots on those systems.
Tests
omarchy-isorepo: working, PR here.ISO
A full test ISO is available here: https://www.berenddeboer.net/tmp/omarchy-2026.05.14-x86_64-master.iso
Replaces #5637.