[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Auto-install EFI / BIOS bootloader
From: |
Danny Milosavljevic |
Subject: |
Re: Auto-install EFI / BIOS bootloader |
Date: |
Tue, 22 Jan 2019 20:33:45 +0100 |
Hi Pierre,
> From there, why wouldn't Guix do that automatically for use?
In practise UEFI likes to fake a lot of stuff. It can happen that
/sys/firmware/efi exists but the system cannot *boot* via EFI.
Likewise, /sys/firmware/efi can vanish just because you booted
from CD using UEFI's BIOS fallback.
There are lots of other "fun" situations--and also lots of bugs in EFI
implementations.
grub-hybrid is better: It supports booting both via EFI and via BIOS.
In order to support it we would have to partition somewhat like this:
http://www.slivermetal.org/2016/09/18/how-to-create-an-hybrid-uefi-gpt-bios-gptmbr-boot-usb-disk/
In short:
* Have both GPT and MBR partition tables, with the same entries.
* Invoke grub-install twice:
** Once with --target=x86_64-efi and the vfat ESP partition as argument,
** Once with --target=i386-pc and the drive (or a partition, I guess) as
argument
Now it always boots.
(Hybrid MBR/GPT are "dangerous" because they have to be updated in lock-step)
Also, if we want to convert people from Windows or similar other operating
systems,
the user should have to explicitly confirm overwriting the bootloader.
> Side question: I just tried installing GuixSD on a brandnew workstation
> and the motherboard (Asus PRIME B450M-K) displays "UEFI" when I press F2
> on start. Now when I boot the Guix image, /sys/firmware/efi does not
> exist, and indeed the Grub EFI installation fails (the BIOS one works).
> I tried with another distribution, same thing.
See?
pgpG79mIEMwjF.pgp
Description: OpenPGP digital signature