Protect Windows and other Linux boot entries before running an Omarchy factory reset
Read reset_limine_config in /usr/share/omarchy/bin/omarchy-system-factory-reset (lines 190-214) and limine_entries_stale plus reset_limine_config in omarchy-provision-owner (lines 945-1035) on 4.0.4-1. Both copy the template over limine.conf and rm -rf every machine-id directory the old file named except the current one, as the cause says. #13689 and its comment report exactly this. The cause holds. limine-install with FIND_BOOTLOADERS=yes only re-adds systemd-boot, rEFInd and the EFI fallback, never Windows, so the manual /Windows stanza is needed. protocol: efi with path: is valid per Limine CONFIG.md. The fix has a gap for the second Linux: restoring its /boot/<id>/ directory alone does not bring back its menu entry, because the stanza that pointed at it is gone from limine.conf. A limine-entry-tool distro sharing Limine often has no firmware entry of its own to boot from either. Fix rewritten to restore both the directory and its stanza from the .pre-reset copy, with real commands for the backup. Not exercised: no reset was run.
A factory reset discards the user, user-installed packages and /etc changes by design. Editing /boot/limine.conf wrongly can leave the menu unparseable, so keep the .pre-reset copy until every OS boots.
Symptom
After omarchy-system-factory-reset on a machine that shares its ESP with Windows or another Linux, the Omarchy Bootloader menu lists only Omarchy. Windows still boots from the firmware boot menu, but its Limine entry is gone. A second Linux install managed by limine-entry-tool loses its entry and its /<machine-id>/ boot directory on the ESP.
Cause
reset_limine_config in omarchy-system-factory-reset (present on 4.0.4-1 here) copies the shipped template over the ESP's limine.conf, which removes every entry that is not the new Omarchy one, including /Windows. It then deletes the ESP directory of every machine-id= the old limine.conf referenced except the new one, which includes another limine-entry-tool-managed Linux. The comment in the script says only ids from the old file are removed, but a foreign install's id is in that file too. omarchy-provision-owner repeats the same logic on the first boot after the reset (limine_entries_stale treats any other machine-id as stale), so a fix applied between the two is lost again. Windows' own boot files under EFI/Microsoft survive.
Fix
Before resetting, keep a copy of the menu on the ESP (the reset rewrites limine.conf but leaves other files there) and note which machine-ids it names:
sudo cp /boot/limine.conf /boot/limine.conf.pre-reset
cat /etc/machine-id # this install's id, the only one the reset should replace
sudo grep -o 'machine-id=[0-9a-f]\{32\}' /boot/limine.conf | sort -u
The reset deletes the boot directory of every other id printed, so copy each one to a USB drive. Do not keep it in /root or your home directory, because the reset swaps the root subvolume and discards the user:
lsblk -o NAME,MOUNTPOINTS # find where the USB drive is mounted
sudo cp -a /boot/<other-machine-id> /run/media/$USER/<usb-drive>/
After the reset, and only after first-boot setup has finished (it repeats the cleanup), add Windows back to the end of /boot/limine.conf with sudo nano /boot/limine.conf:
/Windows
protocol: efi
path: boot():/EFI/Microsoft/Boot/bootmgfw.efi
Compare with the stanza in /boot/limine.conf.pre-reset and copy it exactly if it differs.
For another Linux, restore its boot directory and then its menu entry:
sudo cp -a /run/media/$USER/<usb-drive>/<other-machine-id> /boot/
sudo grep -n -B4 -A12 'machine-id=<other-machine-id>' /boot/limine.conf.pre-reset
Copy that install's whole entry block, from its / title line down to the line before the next top-level / entry, to the end of /boot/limine.conf. The # hashes on its paths stay valid because the restored files are unchanged. If that system has its own firmware boot entry, you can instead boot it from the firmware boot menu and rebuild its entry from inside it (on a limine-entry-tool distro, sudo limine-mkinitcpio).
Verify
The Omarchy Bootloader menu lists Windows (and the other Linux) again after a reboot, and each one boots from it.