[lfs] branch zeckma/uefi-support updated: chapter10/grub: Add note for some UEFI firmware.

"Git Owner" ([email protected] via lfs-book Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.book
Message-ID <177507415369.8409.8821903594571271235@rivendell.linuxfromscratch.org>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch zeckma/uefi-support
in repository lfs.

The following commit(s) were added to refs/heads/zeckma/uefi-support by this push:
     new 9c4ccdcd1 chapter10/grub: Add note for some UEFI firmware.
9c4ccdcd1 is described below

commit 9c4ccdcd1ca8f0f2d703aae20019263d4253a77e
Author: Zeckmathederg <[email protected]>
AuthorDate: Wed Apr 1 14:07:47 2026 -0600

    chapter10/grub: Add note for some UEFI firmware.
    
    Some UEFI firmware, notably old implimentations, skip loading the
    hardcoded EFI path, meaning that in such cases, efibootmgr is required
    to create a boot entry for the new EFI generated by GRUB.
    
    From the looks of it, it doesn't seem that bad of a process but still
    requires the user to go to BLFS for a few packages.
    
    From what I read, efivarfs doesn't need to get mounted at boot time,
    since the firmware should now already be aware of the boot entry, load
    that, the GRUB takes over. Thus, efivarfs is only used for EFI variable
    manipulation, in which the variables have already been manipulated. This
    seems to be rarely required, but Lenevo ThinkPads, Dells, and HPs like
    to skip over what is definined in the UEFI spec.
    
    If the note doesn't work for any of the editors, please report it or
    make changes. I want to make sure this is done right. Thanks!
---
 chapter10/grub.xml | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/chapter10/grub.xml b/chapter10/grub.xml
index 2e584b58c..3efb83a17 100644
--- a/chapter10/grub.xml
+++ b/chapter10/grub.xml
@@ -193,6 +193,41 @@ xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></
         needed to manipulate EFI variables.
       </para>
 
+      <note>
+        <para>
+          Some UEFI bootloaders, while rare, skip the hardcoded EFI path. Such
+          systems most of the time are old, like Lenevo ThinkPads or HP
+          desktops/laptops. When the boot entry is missing in the BIOS, you
+          will need to install the BLFS package <ulink
+          url="&blfs-book;postlfs/efibootmgr.html">efibootmgr</ulink> to create
+          a boot entry for UEFI.
+        </para>
+        <para>
+          First install the package, then mount the EFI variable file system:
+        </para>
+<screen role="nodump"><userinput>mountpoint /sys/firmware/efi/efivars || mount -v -t efivarfs efivarfs /sys/firmware/efi/efivars</userinput></screen>
+        <para>
+          Now create a boot entry for the EFI:
+        </para>
+<screen role="nodump"><userinput>efibootmgr -c -d /dev/sd<replaceable>&lt;x&gt;</replaceable> \
+  -p <replaceable>&lt;y&gt;</replaceable> -L "LFS" -l '\EFI\BOOT\BOOT<replaceable>&lt;X64&gt;</replaceable>.EFI'</userinput></screen>
+        <para>
+          The <literal>/dev/sd<replaceable>&lt;x&gt;</replaceable></literal>
+          drive should match the one you are installing LFS onto. The
+          <replaceable>&lt;y&gt;</replaceable> partition number should match
+          the number which the ESP is mounted. If the ESP is on
+          <literal>/dev/sda2</literal>, then the partition number would be
+          <literal>2</literal>. If you are using 32-bit UEFI, replace
+          <replaceable>&lt;X64&gt;</replaceable> with <literal>IA32</literal>.
+        </para>
+        <para>
+          Now umount the EFI variable file system, which should no longer be
+          needed for the boot process, as the file system is only used for
+          EFI manipulation:
+        </para>
+<screen role="nodump"><userinput>umount -v /sys/firmware/efi/efivars</userinput></screen>
+      </note>
+
     </sect3>
 
   </sect2>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.