Jump to content

[GUIDE] Using OpenLinuxBoot to easily boot Linux from OpenCore


mswgen
 Share

12 posts in this topic

Recommended Posts

Before OpenCore 0.7.3, we had to go to UEFI Shell, get linux bootloader path, and add it to config.plist-Misc-Entries. It was quite complicated. config.plist-Misc-BlessOverride is an easier way, but it appears before Windows and has a name of EFI(not changable).

But starting from 0.7.3, booting Linux from OC became much easier.

OpenCore 0.7.3~ includes OpenLinuxBoot. Just add 2~3 drivers and tweak some quirks, it's done.

To use OpenLinuxBoot, do the following steps.

  1. Add driver for your Linux root(/) file system. 
    Download OpenCore Binary Data, unzip, and go to Drivers directory.
    There will be ext4_x64.efi, btrfs_x64.efi, HfsPlus.efi, and so on.
    If your root fs is ext4(majority of users will use ext4), add ext4_x64.efi to /EFI/OC/Drivers and config.plist-UEFI-Drivers. No arguments required.
    If you use btrfs, add btrfs_x64.efi.
  2. Add OpenLinuxBoot.efi.
    In the downloaded OpenCorePkg, go to X64/EFI/OC/Drivers and copy OpenLinuxBoot.efi to your /EFI/OC/Drivers.
    Then, add OpenLinuxBoot.efi to config.plist-UEFI-Drivers. No args.
  3. Set config.plist-UEFI-Quirks-RequestBootVarRouting to True.
  4. Set config.plist-Misc-Boot-LauncherOption to prevent Linux bootloader from setting itself as the first boot option.
    If your bios is Insyde based, set it to Short. Otherwise(AMI, Phoenix, etc), set it to Full.
  5. If you are using Misc-Entries or Misc-BlessOverride to boot Linux, delete them.
  6. Newest Linux kernel entries will appear as a normal entry, and old kernels will appear as an auxiliary one.
    The display order depends on the disk/partition order.
    If multiple kernels are installed, it might be a bit messy because OpenLinuxBoot will create boot entry of each kernel.
    You may set config.plist-Misc-Boot-HideAuxiliary to True so that boot picker is not messy(it hides older linux kernel entries).
    If you do this, press space bar in boot picker to show old Linux kernel entries.
    This is optional and will also hide macOS Recovery, Reset NVRAM, and tools marked as Auxiliary. I have no problem without this.
  7. Reboot and Linux entries will appear.

6f07666eeac28a230df02ce82b2e5cd0.thumb.jpg.65032479fee2deef23ff0d9796ead8ca.jpg

If it doesn't work, check your kernel config. It should have:

CONFIG_EFI_STUB=y

If there's no CONFIG_EFI_STUB, it is commented out(there's a # before it), or the value is n, the kernel has to be recompiled. However, almost all modern distros set it as y.

Also check if you have appropriate drivers both in /EFI/OC/Drivers and config.plist-UEFI-Drivers. Or try changing the order(fs drivers first then OpenLinuxBoot).

If the kernel is not in /boot, they won't be detected.

Also if the kernel file name doesn't start with vmlinuz and it is not in /boot/loader/entries/*.conf, they won't be detected.

The original linux bootloader(grub, systemd-boot, syslinux, etc) should not be deleted.

 

Try OpenLinuxBoot to easily boot Linux from OpenCore!

Edited by mswgen
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

Hi, thanks for the post.

 

I think just two parts of it might be slightly misleading though.

 

One entry (per distro) will always show up as non-auxiliary - only additional, older kernels are shown as auxiliary.

 

Also, whether Linux is before or after macOS depends on the underlying partition order in your system.

Edited by Bmju
  • Like 2
Link to comment
Share on other sites

Also fwiw kernels not named vmlinuz* can be detected, using {BOOT_PARTITION}/loader/entries if it is present, as e.g. in Fedora (although even then they are usually named vmlinuz* anyway, they just don't have to be in that case).

Edited by Bmju
  • Like 1
Link to comment
Share on other sites

On 12/6/2021 at 1:47 AM, Bmju said:

Hi, thanks for the post.

 

I think just two parts of it might be slightly misleading though.

 

One entry (per distro) will always show up as non-auxiliary - only additional, older kernels are shown as auxiliary.

 

Also, whether Linux is before or after macOS depends on the underlying partition order in your system.

 

On 12/6/2021 at 2:03 AM, Bmju said:

Also fwiw kernels not named vmlinuz* can be detected, using {BOOT_PARTITION}/loader/entries if it is present, as e.g. in Fedora (although even then they are usually named vmlinuz* anyway, they just don't have to be in that case).

Thanks! I've just edited the post.

Edited by mswgen
  • Like 2
Link to comment
Share on other sites

On 12/6/2021 at 4:15 AM, 5T33Z0 said:

The whole formatting and structure could be better. Utilize the list tool.

I wrote this post in mobile so I couldn't use the list tool. Now in notebook I updated the post with the it. Thanks!

Link to comment
Share on other sites

12 hours ago, mswgen said:

I wrote this post in mobile so I couldn't use the list tool. Now in notebook I updated the post with the it. Thanks!

 

... `CrScreenshotDxe.efi` - install as driver, then F10 to take screenshot and result appears in root of ESP drive... ;-)

Edited by Bmju
  • Like 1
Link to comment
Share on other sites

  • 8 months later...
  • 1 month later...
  • 7 months later...
 Share

×
×
  • Create New...