Opened 7 hours ago
Last modified 6 hours ago
#5819 new enhancement
UEFI support
| Reported by: | zeckma | Owned by: | lfs-book | 
|---|---|---|---|
| Priority: | normal | Milestone: | 12.5 | 
| Component: | Book | Version: | git | 
| Severity: | normal | Keywords: | |
| Cc: | 
Description
We tell users to go to BLFS to build and setup GRUB for UEFI boot support. The issue with this is that most systems nowadays use UEFI booting, and a lot don't even have a legacy boot option available. Being told to go to another book for this is clumsy, and also requires the user to find a way to get the packages from BLFS. Some users are led to believe that they have to install more than 5 packages just for UEFI support. They are also told pretty late in the process, instead of being told upfront during the partitioning stage the situation regarding BIOS and UEFI.
This has been a long standing issue and I think it's time we work something out here. There already has been some work in branches me and xry111 created. I worked mainly on documentation, while xry111 worked on instructions. This was done in early 12.4. Fundamentally, the issue is simple. We don't need FreeType2 or efibootmgr at all. All that's needed is to build GRUB as shown in BLFS, which only adds the --with-platform=efi and --target=x86_64 parameters, and do a normal install from there. For doing grub-install, just add the --removable flag so that the EFI file gets put in a hardcoded location, skipping the need for efibootmgr. We should still keep efibootmgr in BLFS to better handle EFI entries if needed.
This has been known about for a little while now. There is an issue though, regarding --target=x86_64 specifically, and handling different architectures. Most solutions would look fine when rendered, for humans to read. But jhalfs would break as it wouldn't reconcile with which instructions to actually run. We have to find a way to create XML that doesn't break jhalfs, or alter jhalfs somehow to reconcile.
It's been a while since this issue was being worked on, xry111 knew most about this issue. So for further info, it'd be good for him to better shed light on the issue.
Ideally, I want this coming in at 12.5. This was planned before 12.4, but the issue stopped us from working on it.

While I understand what your motivations are, I'm not sure that we really need to do this. There are several issues regarding the transition from LFS to BLFS that we don't address comprehensively. These include wireless connectivity and dhcp.
From my point of view sudo, wget (along with make-ca), and ssh are also pretty critical packages. I did address all these issues in my article at https://anduin.linuxfromscratch.org/~bdubbs/external-lfs.
At a presentation I made a couple of weeks ago I was asked what a user could do with a base LFS system. My answer was "Build more packages."
From the standpoint of UEFI, perhaps the easiest way to do an initial boot is to not install GRUB at all, but to use what is installed for the host unless you are going to have a dedicated bootable drive.