Some worth knowing notes about EFISTUB kernel booting  [Solved]

Report Bugs, Issues and non- package Requests
Message
Author
lorn10
Posts: 6
Joined: Sat Mar 02, 2024 8:37 am

Some worth knowing notes about EFISTUB kernel booting

#1 Post by lorn10 »

Hi all

At first many thanks to all MX Linux maintainers and volunteers for the great work in this project!

Here follows some input regarding my recent observations with MX 23.2 on really old Apple x86 hardware. Yeah, MX Linux is one of the rare distros which are capable to be installed on those Apple models even in native EFI mode. And it runs really awesome! :number1:

There is just one thing which I really miss in newer MX Linux builds, - there exist no longer the option (at the UI) to install MX Linux without any boot-loader. I am sure this was possible at the "Wildflower" version.

Why is this so important? The answer is simple, on older Apple systems an EFISTUB booting of the Linux kernel is required otherwise I will end up with no hardware accelerated graphics. The reason for that problem is Apple or Apple's special behavior in implementing the EFI vBIOS information on their earlier x86 hardware. It is exposed just for a very short time at the startup. The rEFInd boot-loader / boot-manager is able to extent that period and pass the information to the Linux kernel. And, even more important, the Linux kernel has an alternative method (see https://patchwork.ozlabs.org/project/li ... ikelr.com/) to get the needed EFI vBIOS information but only if it is booted via EFISTUB.

Long story short, in my case for an iMac 5,1 the Linux kernel is loaded via the rEFInd boot-loader which enables also hardware accelerated graphics. This looks like:

Apple EFI firmware => rEFInd => Linux kernel (EFISTUB)

When GRUB is present, it is unfortunately messing up the topic because the Linux kernel is unable to reach the EFI vBIOS information. This is true at least for older variants of GRUB before version 2.12.

Yes, it is possible to remove GRUB after the installation is finished but this is quite a process and I am still unsure if I removed all the GRUB information. (Probably I missed some stuff.)

So please please reintroduce the "MX install without GRUB boot-loader" option in future MX builds. Thanks!

For the record, additional information about the even more complex mixed mode (64 bit from 32 bit) EFI booting can be found here:
https://github.com/systemd/systemd/issues/17056

User avatar
fehlix
Developer
Posts: 12909
Joined: Wed Apr 11, 2018 5:09 pm

Re: Some worth knowing notes about EFISTUB kernel booting

#2 Post by fehlix »

lorn10 wrote: Sat Mar 02, 2024 9:32 am There is just one thing which I really miss in newer MX Linux builds, - there exist no longer the option (at the UI) to install MX Linux without any boot-loader. I am sure this was possible at the "Wildflower" version.
Hmme, I might have missed that. But anyway, in case you don't want to get efi-grub-boot loader generated,
just select as GRUB target PBR (Partion Boot Record) and it would install a GRUB loader which won't work on UEFI boot
but also would not create any efi-loader.
lorn10 wrote: Sat Mar 02, 2024 9:32 am Long story short, in my case for an iMac 5,1 the Linux kernel is loaded via the rEFInd boot-loader which enables also hardware accelerated graphics. This looks like:

Apple EFI firmware => rEFInd => Linux kernel (EFISTUB)

When GRUB is present, it is unfortunately messing up the topic because the Linux kernel is unable to reach the EFI vBIOS information.
AFAIK, rEFInd would scan for both efi-loader and kernels by default.
Even if you have installed efi-GRUB loader, you can just skip this being displayed, with the rEFInd gui,
just press [Delete]-key on any boot loader not to be used. The found kernel found would be listed anyway within the rEFInd GUI.
lorn10 wrote: Sat Mar 02, 2024 9:32 am So please please reintroduce the "MX install without GRUB boot-loader" option in future MX builds. Thanks!
Not sure why it was removed, but agree I'd vote for GRUB boot loader installation should be optional.

User avatar
dolphin_oracle
Developer
Posts: 22733
Joined: Sun Dec 16, 2007 12:17 pm

Re: Some worth knowing notes about EFISTUB kernel booting

#3 Post by dolphin_oracle »

fehlix wrote: Sat Mar 02, 2024 10:51 am
Not sure why it was removed, but agree I'd vote for GRUB boot loader installation should be optional.
IIRC we removed it long ago because with the routine as it currnetly stands, if you don't install grub, then other grub installs will also not pick up the installation. installing to pbr always works and won't overwrite any other boot loaders, and it gets picked up by update-grub/os-prober.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

lorn10
Posts: 6
Joined: Sat Mar 02, 2024 8:37 am

Re: Some worth knowing notes about EFISTUB kernel booting

#4 Post by lorn10 »

Yes I have deleted the MX GRUB related entry via rEFInd.

I also removed / purged GRUB from MX Linux with:

Code: Select all

sudo apt remove --purge grub-common
(which also uninstalled some other stuff)

This worked all fine and in contrast to Kubuntu the GRUB packages are until now not automatically reinstalled. Will see if that changes at some point.

Nevertheless I am ending up sometimes during reboot at MX's GRUB emergency screen (which is a dead end because GRUB is mostly removed).

Whatever, as mentioned at the Wildflower build this was really super simple. There was at some point an "Install Grub" box present which I simply had to uncheck.

Or alternatively there could be implemented an EFISTUB installation option (for experts) which would exclude any additional boot-loader. :happy:

User avatar
dolphin_oracle
Developer
Posts: 22733
Joined: Sun Dec 16, 2007 12:17 pm

Re: Some worth knowing notes about EFISTUB kernel booting  [Solved]

#5 Post by dolphin_oracle »

I was off base. the option is only hidden when using the "full disk" option. the checkbox is still present when doing custom install path.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

User avatar
fehlix
Developer
Posts: 12909
Joined: Wed Apr 11, 2018 5:09 pm

Re: Some worth knowing notes about EFISTUB kernel booting

#6 Post by fehlix »

dolphin_oracle wrote: Sat Mar 02, 2024 1:59 pm I was off base. the option is only hidden when using the "full disk" option. the checkbox is still present when doing custom install path.
Ahh, good. Probably never noted it's only not available on auto "full disk" install, I guess b/c of rarely using this options.
lorn10 wrote: Sat Mar 02, 2024 1:27 pm Yes I have deleted the MX GRUB related entry via rEFInd.

I also removed / purged GRUB from MX Linux with:

Code: Select all

sudo apt remove --purge grub-common
(which also uninstalled some other stuff)
I'd probably keep GRUB packages installed. The option to install GRUB loader into the PBR (e.g of the root partition) does provide an important feature. Even the GRUB loader on PBR cannot be used with UEFI booting, but the generated GRUB menu, can be used to boot into the system with help of the MX-LiveUSB/ISO.
On the LiveBoot menu there is a BootRescue menu entry, which offers to find grub menus to boot into.
So in case LiveBooted System works ok, the assumption would be booting from LiveBoot menu into the installed would also be good. Which may help in case direct efi boot would fail.
And would allow to install rEFInd (sudo apt install refind), which automatically offers kernel-boot with help of rEFInd efistub feature for the found kernels installed.

lorn10
Posts: 6
Joined: Sat Mar 02, 2024 8:37 am

Re: Some worth knowing notes about EFISTUB kernel booting

#7 Post by lorn10 »

Okay, so the option is still there when using the "custom install" path. So I simply didn't see it.

I have installed MX Linux to an external SSD (USB) so that's the reason why I selected "full disk" install.

Whatever, thanks for the hint. Will remember that for the next time. And perhaps it would make sense for the very special situations (like mine) to include the "excluding GRUB" option also in the "full disk" install path. :wink:

Post Reply

Return to “Bugs and Non-Package Requests Forum”