source: postlfs/filesystems/uefi-bootloaders/grub-efi.xml@ e724cb7

11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since e724cb7 was e724cb7, checked in by Xi Ruoyao <xry111@…>, 2 years ago

grub-efi: warn that it won't work for 32-bit LFS, and mention i386-efi

  • Property mode set to 100644
File size: 6.7 KB
RevLine 
[756a787]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../../general.ent">
5 %general-entities;
6
[227bd7d6]7 <!ENTITY grub-efi-download-http "https://ftp.gnu.org/gnu/grub/grub-&grub-version;.tar.xz">
[756a787]8 <!ENTITY grub-efi-download-ftp " ">
[227bd7d6]9 <!ENTITY grub-efi-md5sum "cf0fd928b1e5479c8108ee52cb114363">
10 <!ENTITY grub-efi-size "6.3 MB">
[7a91c80]11 <!ENTITY grub-efi-buildsize "137 MB">
12 <!ENTITY grub-efi-time "1.0 SBU">
[756a787]13
[c6b192c]14 <!ENTITY unifont-download-http "https://unifoundry.com/pub/unifont/unifont-&unifont-version;/font-builds/unifont-&unifont-version;.pcf.gz">
[7a91c80]15 <!ENTITY unifont-md5sum "8191ca4fce0eb6073d47c7573e6babc1">
[756a787]16 <!ENTITY unifont-size "1.3 MB">
17]>
18
19<sect1 id="grub-efi" xreflabel="GRUB-&grub-version; for EFI">
20 <?dbhtml filename="grub-efi.html"?>
21
22 <sect1info>
[fda29e4]23 <date>$Date$</date>
[756a787]24 </sect1info>
25
26 <title>GRUB-&grub-version; for EFI</title>
27
28 <indexterm zone="grub-efi">
29 <primary sortas="a-grub-efi">grub-efi</primary>
30 </indexterm>
31
32 <sect2 role="package">
33 <title>Introduction to GRUB</title>
34
35 <para>
36 The <application>GRUB</application> package provides GRand Unified
37 Bootloader. In this page it will be built with UEFI support, which
38 is not enabled for GRUB built in LFS.
39 </para>
40
[7d95c1c]41 &lfs111_checked;
[756a787]42
43 <bridgehead renderas="sect3">Package Information</bridgehead>
44 <itemizedlist spacing="compact">
45 <listitem>
46 <para>
47 Download (HTTP): <ulink url="&grub-efi-download-http;"/>
48 </para>
49 </listitem>
50 <listitem>
51 <para>
52 Download (FTP): <ulink url="&grub-efi-download-ftp;"/>
53 </para>
54 </listitem>
55 <listitem>
56 <para>
57 Download MD5 sum: &grub-efi-md5sum;
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Download size: &grub-efi-size;
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Estimated disk space required: &grub-efi-buildsize;
68 </para>
69 </listitem>
70 <listitem>
71 <para>
72 Estimated build time: &grub-efi-time;
73 </para>
74 </listitem>
75 </itemizedlist>
76
77 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
78
79 <itemizedlist spacing="compact">
80 <title>Unicode font data used to display GRUB menu</title>
81 <listitem>
82 <para>
83 Download (HTTP): <ulink url="&unifont-download-http;"/>
84 </para>
85 </listitem>
86 <listitem>
87 <para>
88 Download MD5 sum: &unifont-md5sum;
89 </para>
90 </listitem>
91 <listitem>
92 <para>
93 Download size: &unifont-size;
94 </para>
95 </listitem>
96 </itemizedlist>
97
98 <bridgehead renderas="sect3">GRUB Dependencies</bridgehead>
99
100 <bridgehead renderas="sect4">Required (runtime)</bridgehead>
101 <para role="runtime">
102 <xref linkend="efibootmgr"/>
103 </para>
104
105 <bridgehead renderas="sect4">Recommended</bridgehead>
106 <para role="recommended">
107 <xref linkend="freetype2"/>
108 </para>
109
110 <bridgehead renderas="sect4">Optional</bridgehead>
111 <para role="optional">
112 <xref linkend="lvm2"/>
113 </para>
114
115 <para condition="html" role="usernotes">User Notes:
116 <ulink url="&blfs-wiki;/grub-efi"/></para>
117
118 </sect2>
119
120 <sect2 role="installation">
121 <title>Installation of GRUB</title>
122
[e724cb7]123 <warning>
124 <para>
125 The instruction does not work correctly on 32-bit LFS system
126 at now.
127 </para>
128 </warning>
129
[756a787]130 <para>
[d5cc78a]131 First, install font data as the
[756a787]132 <systemitem class="username">root</systemitem> user:
133 </para>
134
135<screen role="root"><userinput>mkdir -pv /usr/share/fonts/unifont &amp;&amp;
[ad34447a]136gunzip -c ../unifont-&unifont-version;.pcf.gz > /usr/share/fonts/unifont/unifont.pcf</userinput></screen>
[756a787]137
138 <warning>
139 <para>Unset any environment variables which may affect the build:</para>
140
141 <screen><userinput>unset {C,CPP,CXX,LD}FLAGS</userinput></screen>
142
143 <para>Don't try <quote>tuning</quote> this package with custom
144 compilation flags: this package is a bootloader, with low-level
145 operations in the source code which is likely to be broken by some
146 aggressive optimizations.</para>
147 </warning>
148
149 <para>
150 Build <application>GRUB</application> with the following commands:
151 </para>
152
153<screen><userinput>./configure --prefix=/usr \
154 --sysconfdir=/etc \
155 --disable-efiemu \
156 --enable-grub-mkfont \
157 --with-platform=efi \
158 --disable-werror &amp;&amp;
159make</userinput></screen>
160
161 <para>
[d5cc78a]162 This package does not have a test suite providing meaningful results.
[756a787]163 </para>
164
165 <para>
166 Now, as the <systemitem class="username">root</systemitem> user:
167 </para>
168
169<screen role="root"><userinput>make install &amp;&amp;
170mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions</userinput></screen>
171
172 </sect2>
173
174 <sect2 role="commands">
175 <title>Command Explanations</title>
176
177 <para>
[d5cc78a]178 <parameter>--enable-grub-mkfont</parameter>: Build the tool named
179 <command>grub-mkfont</command> to generate the font file for the boot
180 loader from the font data we've installed.
[756a787]181 </para>
182
183 <warning>
184 <para>If the recommended dependency <xref linkend="freetype2"/> is not
[d5cc78a]185 installed, it is possible to omit this option and build GRUB. However,
[756a787]186 if <command>grub-mkfont</command> is not built, or the unicode font
[2c87187]187 data is not available at the time GRUB is built, GRUB won't install
[756a787]188 any font for the boot loader. The GRUB boot menu will be displayed
[d5cc78a]189 using a coarse font and the early stage of kernel initialization will be
190 in <quote>blind mode</quote> &mdash; you can't see any kernel messages before
[756a787]191 the graphics card driver is initialized. It will be very difficult to
[d5cc78a]192 diagnose some boot issues, especially if the graphics driver is
193 built as module.</para>
[756a787]194 </warning>
195
196 <para>
[d5cc78a]197 <parameter>--with-platform=efi</parameter>: Ensures building GRUB with
198 EFI enabled.
[756a787]199 </para>
200
[e724cb7]201 <para>
202 <option>--target=i386</option>: Some x86_64 systems have 32-bit UEFI
203 implementation, but they are very old and rare.
204 Do <emphasis role='bold'>not</emphasis> use this option unless you are
205 absolutely sure that LFS is running on such a system.
206 </para>
207
[756a787]208 </sect2>
209
210 <sect2>
211 <title>Configuring GRUB</title>
212
213 <para>
214 Using GRUB to make the LFS system bootable on UEFI platform will be
215 discussed in <xref linkend="grub-setup"/>.
216 </para>
217 </sect2>
218
219 <sect2 role="content">
220 <title>Contents</title>
221
222 <para>See the page for GRUB in LFS book.</para>
223 </sect2>
224
225</sect1>
Note: See TracBrowser for help on using the repository browser.