GRUB EFI blues - Debian 9/FAI 5.3.6

Andreas Heinlein aheinlein at gmx.com
Wed Apr 18 12:21:53 CEST 2018


Am 18.04.2018 um 10:14 schrieb tt-fai at kky.ttu.ee:
>
> I can second to that. I installed a SuperMicro X10SLM-F based server
> last month and did not find any option in the BIOS to PXE-boot FAI
> into UEFI mode. Ended up using disklabel:gpt-bios and GRUB_PC. I did
> not try to boot off an USB stick, so it is worth investigating if an
> option exists for booting that in UEFI mode.
>
>  
>
> From my experiments I was left with the impression that it is not easy
> (or even possible) to “cross-install” UEFI-boot-capable disk if the
> system was booted into legacy (BIOS) mode. If someone has found a way
> to do it, I would also appreciate suggestions.
>
>  
>
> Regards,
>
> Toomas
>
>  
>
> *From:*linux-fai <linux-fai-bounces at uni-koeln.de> *On Behalf Of
> *Andreas Heinlein
> *Sent:* Wednesday, April 18, 2018 9:56 AM
> *To:* linux-fai at uni-koeln.de
> *Subject:* Re: GRUB EFI blues - Debian 9/FAI 5.3.6
>
>  
>
> Am 18.04.2018 um 00:28 schrieb Bob Apodaca:
>
>     I think the first issue is FAI is setting the GRUB_PC class
>     instead of the GRUB_EFI class and I'm not sure why.
>
> I am pretty sure this depends on how the installation was started.
> That means you will have to boot your FAI installation using UEFI as
> well. This can be a bit tricky if you want to install from network - I
> also tried setting up PXE with UEFI some time ago and failed.
> Bye,
> Andreas
>
I am pretty sure it is not possible to set up grub-efi correctly when
booted in legacy mode. While it is possible to detect that we are
actually running an EFI-capable machine (dmidecode or lshw can detect
that), we cannot access the efi variables under /sys/efi since the
firmware doesn't expose them to the host when running under CSM aka
"Legacy mode".

Booting from USB with UEFI is possible, in fact I have such a USB device
here somewhere. But I need to remember what I did, it was not (yet)
completed in FAI at that time. I remember I wanted to make some patches
available, but never found the time. This is almost a year ago now. What
you basically need is a small FAT partition preferrably of type 'ef'
(EFI Boot Partition) on the USB drive, which contains a grub efi image
as EFI/BOOT/BOOTX64.EFI. That image can be created with grub-mkimage and
needs to include at least all modules for reading the "main" partition
and the grub.cfg on it. That will be mostly ext filesystem and msdos
partition table, I think. That image should also include an embedded
config file with a one-liner like
configfile (hd0,msdos1)
if the main partition is the second on the USB drive.

I will try to find this again and post it here.

Bye,
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20180418/41fa9484/attachment.html>


More information about the linux-fai mailing list