| Newsgroups |
gmane.linux.lfs.book |
| Message-ID |
<177042722294.24425.18324549478743809998@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 9a803f34b UEFI: Address comments by Bruce.
9a803f34b is described below
commit 9a803f34b817817517f03a556ee1f6df5e3e318f
Author: Zeckmathederg <[email protected]>
AuthorDate: Fri Feb 6 18:21:35 2026 -0700
UEFI: Address comments by Bruce.
---
chapter02/creatingfilesystem.xml | 4 +--
chapter02/creatingpartition.xml | 19 +++++++++-----
chapter08/grub.xml | 53 +++++++++++++++++++++++++---------------
chapter10/grub.xml | 25 ++++++++++++++-----
4 files changed, 67 insertions(+), 34 deletions(-)
diff --git a/chapter02/creatingfilesystem.xml b/chapter02/creatingfilesystem.xml
index 75751fea1..71fc41f9d 100644
--- a/chapter02/creatingfilesystem.xml
+++ b/chapter02/creatingfilesystem.xml
@@ -88,9 +88,9 @@
<systemitem class="filesystem">VFAT</systemitem>, you can run the following
instead:</para>
-<screen role="nodump"><userinput>mkfs.vfat /dev/<replaceable><yyy></replaceable></userinput></screen>
+<screen role="nodump"><userinput>mkfs.vfat /dev/<replaceable><zzz></replaceable></userinput></screen>
- <para>Replace <replaceable><yyy></replaceable> with the name of the
+ <para>Replace <replaceable><zzz></replaceable> with the name of the
EFI System Partition.</para>
</sect1>
diff --git a/chapter02/creatingpartition.xml b/chapter02/creatingpartition.xml
index bdafd5da5..165040f60 100644
--- a/chapter02/creatingpartition.xml
+++ b/chapter02/creatingpartition.xml
@@ -132,16 +132,23 @@
<para>This partition, also known as the <emphasis>ESP</emphasis>, is needed
when booting the system with UEFI. It stores the EFI application that is
- ran during bootup. The boot drive can be partitioned with MBR Partition
+ ran during bootup. The boot drive can be partitioned with MBR Partition
Table, or DOS, but compatibility issues will tend to arise as a result.
Therefore, it is always a good idea in this case to partition the boot
- drive with a GUID Partition Table (GPT). Typically 256 MB for this
- partition suffices, although the needed size for a Grub EFI application can
- go down to 20 MB or lower. The partition label should be 'EFI System' if
- using <command>fdisk</command>.</para>
+ drive with a GUID Partition Table (GPT). If you're only booting LFS from
+ the partition, 20 MB or lower can suffice. The partition should be bigger
+ than the EFI image size because GRUB dumps a lot of data to the partition
+ before creating the EFI image. To be safe, 128 MB to 256 MB is recommended
+ but can be dropped much lower with some experimentation. The partition
+ label should be 'EFI System' if using <command>fdisk</command>.</para>
<para>For Grub, the EFI System Partion should be located at
- /boot/efi.</para>
+ <filename class="directory">/boot/efi</filename>.</para>
+
+ <para>A lot of UEFI systems have a Compatibility Support Mode (CSM) or
+ Legacy Boot option, allowing to boot with Bios. It could be a good idea to
+ create a Grub Bios partition if your system supports CSM in case UEFI
+ booting does not work as expected.
</sect3>
<sect3>
diff --git a/chapter08/grub.xml b/chapter08/grub.xml
index cc1cc7afa..79f7f1d93 100644
--- a/chapter08/grub.xml
+++ b/chapter08/grub.xml
@@ -25,6 +25,15 @@
<para>The GRUB package contains the GRand Unified Bootloader.</para>
+ <note><para>This page is split up into multiple sections aimed to install
+ for a specific boot method (BIOS, 64-bit UEFI, and 32-bit UEFI). You may
+ skip other sections to go to the boot method you need. If in doubt, you may
+ follow all of the sections at the cost of extra build time. After you have
+ installed support for your boot method, then continue building the rest of
+ the packages in this chapter. Making your LFS system bootable with GRUB
+ will be discussed in <xref linkend="ch-bootable-grub"
+ role='.'/></para></note>
+
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
@@ -53,7 +62,7 @@
<para>Prepare GRUB for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/usr \
+<screen><userinput remap="configure">../configure --prefix=/usr \
--sysconfdir=/etc \
--disable-efiemu \
--disable-werror</userinput></screen>
@@ -89,26 +98,24 @@
<para>Install the package:</para>
-<screen><userinput remap="install">make install</userinput></screen>
-
- <para>There are following sections that allow you to install support for
- UEFI. After you have installed that support, if at all, making your LFS
- system bootable with GRUB will be discussed in
- <xref linkend="ch-bootable-grub" role='.'/></para>
-
- <para>There are still more packages that need to be installed before the
- system can become bootable.</para>
+ <screen><userinput remap="install">make install</userinput></screen>
</sect2>
<sect2 role="installation">
<title>Installation of GRUB for 64-bit UEFI</title>
- <para>If you want to boot with 64-bit UEFI, build the package again to
- include support for it:</para>
+ <para>If you want to boot with 64-bit UEFI, you should build support for
+ it.</para>
+
+ <para>First, if you built GRUB from any of the sections above,
+ clean the source tree:</para>
+
+<screen><userinput remap="pre">make clean</userinput></screen>
-<screen><userinput remap="configure">make clean
-./configure --prefix=/usr \
+ <para>Now build GRUB with 64-bit UEFI support:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr \
--sysconfdir=/etc \
--target=x86_64 \
--with-platform=efi \
@@ -121,18 +128,24 @@
<para>Install support for 64-bit UEFI:</para>
-<screen><userinput remap="install">make -C grub-core install</userinput></screen>
+<screen><userinput remap="install">make install</userinput></screen>
</sect2>
<sect2 role="installation">
<title>Installation of GRUB for 32-bit UEFI</title>
- <para>If you need support for 32-bit UEFI, which is very rare, then once
- again build the package to include that support:</para>
+ <para>If you want to boot with 32-bit UEFI, which is very rare, you should
+ build support for it.</para>
+
+ <para>First, if you built GRUB from any of the sections above,
+ clean the source tree:</para>
-<screen><userinput remap="configure">make clean
-./configure --prefix=/usr \
+<screen><userinput remap="pre">make clean</userinput></screen>
+
+ <para>Now build GRUB with 32-bit UEFI support:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr \
--sysconfdir=/etc \
--target=i386 \
--with-platform=efi \
@@ -145,7 +158,7 @@
<para>Install support for 32-bit UEFI:</para>
-<screen><userinput remap="install">make -C grub-core install</userinput></screen>
+<screen><userinput remap="install">make install</userinput></screen>
</sect2>
diff --git a/chapter10/grub.xml b/chapter10/grub.xml
index 4b1b78074..a12d0e22a 100644
--- a/chapter10/grub.xml
+++ b/chapter10/grub.xml
@@ -111,14 +111,27 @@ xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso</userinput></
<para>
The following sections go over how to boot with BIOS and UEFI.
The GRUB installations for BIOS, 64-bit UEFI, and 32-bit UEFI can
- coexist and share the same configuration. So you can create both
- the BIOS Boot Partition and the EFI System Partition, and install
- GRUB for all the supported firmware types (i.e. running three
- <command>grub-install</command> commands). If you are unsure about
- your firmware type, or you plan to move the hard drive to a different
- computer, this is something you can do as a blanket strategy.
+ coexist and share the same configuration. The images and data live at
+ different locations, so you can create both the BIOS Boot Partition and
+ the EFI System Partition, and install GRUB for all the supported firmware
+ types (i.e. running three <command>grub-install</command> commands). If
+ you are unsure about your firmware type, or you plan to move the hard
+ drive to a different computer, this is something you can do as a blanket
+ strategy.
</para>
+ <note><para>
+ If you're doing UEFI boot but have created the Grub Bios partition, it
+ may be a good idea to run the command for BIOS in case UEFI booting does
+ not work as expected.
+ </para></note>
+
+ <note><para>
+ If you only need to install GRUB for one boot method, you don't have to
+ run commands for both methods. You can just run the command for the boot
+ method you need.
+ </para></note>
+
<sect3>
<title>Booting With BIOS</title>
--
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