Skip to content

Libreboot coreboot support#4230

Closed
Somnius wants to merge 2 commits intobasecamp:masterfrom
Somnius:libreboot-coreboot-support
Lines changed: 590 additions & 71 deletions
Closed

Libreboot coreboot support#4230
Somnius wants to merge 2 commits intobasecamp:masterfrom
Somnius:libreboot-coreboot-support

Conversation

@Somnius
Copy link
Copy Markdown

@Somnius Somnius commented Jan 11, 2026

Summary

This PR adds automatic detection and support for Libreboot/Coreboot systems without EFI payload.

Problem

Omarchy installer assumed UEFI and installed EFI-mode bootloader (Limine), causing boot failures on Libreboot/Coreboot systems that:

  • Use GRUB payload instead of EFI
  • Have no EFI services available
  • Require BIOS/Legacy boot mode

Issue: #4209
Permission: Granted by @dhh

Solution

  • Automatic detection of Libreboot/Coreboot systems (multiple detection methods)
  • Installs GRUB with i386-pc modules (works with Libreboot GRUB payload)
  • Automatically detects and fixes UUIDs (prevents USB UUID from being used in grub.cfg)
  • Automatically adds cryptdevice parameter for LUKS encrypted root
  • Skips Limine for Libreboot systems (GRUB only)
  • Enhanced installer log saving to /root/omarchy-install.log

Key Discovery

i386-pc GRUB modules are sufficient for Libreboot GRUB payload! No need to build i386-coreboot modules. The Libreboot GRUB payload can use standard GRUB modules.

Testing

  • ✅ Tested on Libreboot T480 (Libreboot 25.06 Luminus Lemon)
  • ✅ Tested on **QEMU/KVM using libvirt with EFI / Tianocore enabled configuration
  • ✅ System boots successfully to desktop
  • LUKS encryption works correctly
  • UUID detection and fixing works (prevents USB UUID issues)
  • cryptdevice parameter automatically added
  • All functionality verified
  • Safe for all systems (EFI and non-EFI unaffected)

Files Changed

New Files

  • install/preflight/detect-libreboot.sh - Detection script with multiple detection methods

Modified Files

  • install/preflight/all.sh - Added call to detect-libreboot.sh
  • install/login/limine-snapper.sh - GRUB installation, UUID management, cryptdevice handling
  • install/post-install/finished.sh - Enhanced log saving
  • install/post-install/allow-reboot.sh - Passwordless sudo for log operations

Technical Details

Detection Methods

  1. EFI absence check (primary indicator)
  2. dmesg markers (coreboot/libreboot)
  3. BIOS vendor/version check
  4. Hardware model detection (ThinkPad, etc.)

GRUB Installation

  • Uses grub-install --target=i386-pc (standard modules)
  • Creates /boot/grub/ structure
  • Generates grub.cfg with correct UUIDs
  • Automatically adds cryptdevice=UUID=<LUKS_UUID>:rootfs parameter

UUID Management

  • Detects LUKS and Btrfs UUIDs from installed disk (not USB)
  • Verifies UUIDs after grub-mkconfig
  • Automatically fixes wrong UUIDs (e.g., from USB stick)

Backward Compatibility

  • EFI systems: Unaffected (Limine still installed)
  • Non-EFI non-Libreboot: Unaffected (Limine in BIOS mode)
  • Libreboot/Coreboot: Now supported (GRUB only)

For Testers

  • ISO master with all changes already created and can be shared with testers upon request.

Closes: #4209

- Add automatic detection of Libreboot/Coreboot systems
- Install GRUB with i386-pc modules for Libreboot GRUB payload compatibility
- Automatically detect and fix UUIDs (prevents USB UUID issues)
- Automatically add cryptdevice parameter for LUKS encrypted root
- Skip Limine installation for Libreboot systems (GRUB only)
- Enhanced installer log saving

Fixes: basecamp#4209
Tested on: Libreboot T480, successfully boots to desktop
@whughesiii2187
Copy link
Copy Markdown

How does this affect booting into snapshots. There are tools being used so that at the bootloader, snapshots can be booted.

@Somnius
Copy link
Copy Markdown
Author

Somnius commented Jan 12, 2026

How does this affect booting into snapshots. There are tools being used so that at the bootloader, snapshots can be booted.

As of yesterday, Snapshots aren't supported while using this implementation of GRUB as bootloader.. 😔 I will check as soon as I'm able to about this..

@dhh
Copy link
Copy Markdown
Member

dhh commented Jan 12, 2026

Hmm, I'd like to support more options, but we can't carry this heavy of a modification to the default flow, as we won't have the capacity to test on libreboot. Think we're going to need a different path. Maybe you could make a manual install wrapper script that does the libreboot setup, then it calls the Omarchy installer? Thanks for exploring this!

@dhh dhh closed this Jan 12, 2026
@Somnius
Copy link
Copy Markdown
Author

Somnius commented Jan 12, 2026

@dhh [...] Maybe you could make a manual install wrapper script that does the libreboot setup, then it calls the Omarchy installer? Thanks for exploring this!

I thought that the guidance of you and @AndyBodnar was spot on, that is why i followed that path, but.. No worries, i get where you come from.

So any ideas on how to proceed with this when you say a manual install wrapper script, how will it work when if not identified while it installs.. it won't make the proper GRUB install/setup. How will the user be able to run that script if the installer is fully automated... 🤷

Tell the user to boot another live distro iso just to run a script? Or maybe switch to TTY on the installer and if networking is enabled fetch it from the web and run it? After the installer finishes and says X,XX time to install before reboot to drop into TTY and do that?

Any ideas?

edit: maybe a script to produce an iso with patches and warnings of not having snapshots?

@dhh
Copy link
Copy Markdown
Member

dhh commented Jan 12, 2026

The manual install would be as described here: https://learn.omacom.io/2/the-omarchy-manual/96/manual-installation. User would install arch (using grub), then run your setup script, which would then call the omarchy install after it's setup everything that's needed. Does that make sense?

@Somnius
Copy link
Copy Markdown
Author

Somnius commented Jan 12, 2026

The manual install would be as described here: https://learn.omacom.io/2/the-omarchy-manual/96/manual-installation. User would install arch (using grub), then run your setup script, which would then call the omarchy install after it's setup everything that's needed. Does that make sense?

Totally forgot about the manual install, and i personally have commented about it when users need dual boot to use that method.. 🥹

I'll go with that next weekend.
edit: If archinstall manages to work on libreboot OTB then no need for any libreboot/coreboot patch...

@AndyBodnar
Copy link
Copy Markdown

The manual install is sweaty af and is going to cause headaches if the user doesn't know it exists.

@dhh
Copy link
Copy Markdown
Member

dhh commented Jan 13, 2026

I think if you're already running Libreboot, you're probably an experienced adventurer. The manual install is mentioned in the first paragraph of the getting started guide: https://learn.omacom.io/2/the-omarchy-manual/50/getting-started.

@Somnius
Copy link
Copy Markdown
Author

Somnius commented Jan 17, 2026

Well after pure arch with archinstall, and minimal only tty without any de/wm, omarchy manual install said it will fail without limine, finished, rebooted, booted in using grub from archinstall and got an empty/default sddm with a freshly initialized hyprland with default screens but the shell was configured.

So until now only the custom ISO i've built is the only way to install omarchy properly on libreboot/coreboot custom bios devices.
Archinstall grub installs correctly but the system feels incomplete.

I will do some tests using the omarchy manual install but i don't think i'll have the success i had with the custom ISO.

Eitherway my patches will live on as non-merged to prod if anyone searches for this will find the discussion and know what to do. I'll even upload the Custom ISO to some file hoster and someone with libreboot/coreboot can use it and upgrade from there to the latest Omarchy of the time.

@Somnius
Copy link
Copy Markdown
Author

Somnius commented Jan 18, 2026

My forked ISO with libreboot/coreboot grub installer patches that works as expected also on EFI systems is now available on sf.net and archive.org

@githubisnonfree
Copy link
Copy Markdown

githubisnonfree commented Apr 10, 2026

Hi. I'm Leah Rowe, creator of Libreboot. I want to be ten thousand percent clear: I am not affiliated with Omarchy Linux, in fact I find that project's leadership quite repugnant, and I do not support them at all. I consider the fact that they invoke Libreboot's name to be an insult to Libreboot, and I hope that they will stop doing so - of course, making it easier to boot Linux on Libreboot is a noble goal, but the creator of Omarch, dubbed DHH, has been known to associate heavily with the far-right; the development channel for Hyprland of which he and his project is associated is rife with racism, transphobia and all sorts of bigotry in general. As a trans person, and someone who wishes to see myself and others of my kind flourish in prosperity, I consider that our community has no place for people like DHH. I found this post during a random Google/DuckDuckGo sweep for the word "libreboot", and felt the need to say something here. DHH and co are of course free to associate as they wish, and partake in any sort of open source development they wish, but I would ask that they do not associate either Libreboot, my name, or the names of my compratriots with that of his ilk, even if only tenuously as in this instance.Thank you, and have a wonderful day.

@Somnius
Copy link
Copy Markdown
Author

Somnius commented Apr 10, 2026

Hello Leah.

Thank you for taking the time to post your detailed concerns regarding the relationship between Libreboot and Omarchy Linux. I respect your right to express your views.

To clarify my position: I am not affiliated with Omarchy Linux. My involvement with Libreboot is strictly technical; I am working on the installation process for my own system (T480) to ensure a viable path for users utilizing Libreboot, independent of any specific distribution.

My contribution, including the PR and the custom ISO image, was driven by a desire to help a specific user base who might be interested in combining DHH's distribution with a Libreboot environment. I focused solely on the technical implementation of the installation process. I hope this contribution is seen as purely technical assistance and not as an endorsement of any political stance.

I value the open-source community and wish you all the best moving forward.

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.

None yet

5 participants