Changeset d5cc78a
- Timestamp:
- 03/23/2021 07:24:51 PM (4 years ago)
- Branches:
- 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 12.2, gimp3, 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, upgradedb, xry111/for-12.3, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/spidermonkey128, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 5910991c
- Parents:
- a2c3f1d3
- Location:
- postlfs/filesystems/uefi-bootloaders
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
postlfs/filesystems/uefi-bootloaders/efibootmgr.xml
ra2c3f1d3 rd5cc78a 118 118 <para> 119 119 <parameter>EFIDIR=LFS</parameter>: 120 This option specif ythe distro's subdirectory name under120 This option specifies the distro's subdirectory name under 121 121 <filename class="directory">/boot/efi/EFI</filename>. 122 122 The building system of this package needs it to be set explicitly. … … 125 125 <para> 126 126 <parameter>EFI_LOADER=grubx64.efi</parameter>: 127 This option specif ythe name of the default EFI boot loader. It is128 set to match the EFI boot loader provided by 129 GRUB<!--xref linkend="grub-efi"/-->.127 This option specifies the name of the default EFI boot loader. It is 128 set to match the EFI boot loader provided by GRUB 129 <!--xref linkend="grub-efi"/-->. 130 130 </para> 131 131 … … 156 156 157 157 <varlistentry id="efibootdump"> 158 <term><command>efiboot mgr</command></term>158 <term><command>efibootdump</command></term> 159 159 <listitem> 160 160 <para> -
postlfs/filesystems/uefi-bootloaders/efivar.xml
ra2c3f1d3 rd5cc78a 90 90 91 91 <para> 92 At first, apply a patch to fix an issue breaking the build with GCC 9 93 or later: 92 First, apply a patch to fix an issue building with GCC 9 or later: 94 93 </para> 95 94 … … 97 96 98 97 <para> 99 Build <application>efivar</application> with the following 100 commands: 98 Build <application>efivar</application> with the following commands: 101 99 </para> 102 100 … … 132 130 <para> 133 131 <parameter>CFLAGS="-O2 -Wno-stringop-truncation"</parameter>: 134 This option overrides the compiler flags defaulted by this package, 135 to avoid build failure. 132 This option overrides the default compiler flags to avoid a build failure. 136 133 </para> 137 134 -
postlfs/filesystems/uefi-bootloaders/grub-efi.xml
ra2c3f1d3 rd5cc78a 123 123 124 124 <para> 125 At first, install font data as the125 First, install font data as the 126 126 <systemitem class="username">root</systemitem> user: 127 127 </para> … … 152 152 --with-platform=efi \ 153 153 --disable-werror && 154 155 154 make</userinput></screen> 156 155 157 156 <para> 158 This package does not have a test suite providing meaningful result .157 This package does not have a test suite providing meaningful results. 159 158 </para> 160 159 … … 172 171 173 172 <para> 174 <parameter>--enable-grub-mkfont</parameter>: Buil tthe tool named175 <command>grub-mkfont</command> to generate font file for the boot176 loader ,from the font data we've installed.173 <parameter>--enable-grub-mkfont</parameter>: Build the tool named 174 <command>grub-mkfont</command> to generate the font file for the boot 175 loader from the font data we've installed. 177 176 </para> 178 177 179 178 <warning> 180 179 <para>If the recommended dependency <xref linkend="freetype2"/> is not 181 installed, it 's possible to omit this option and build GRUB. However,180 installed, it is possible to omit this option and build GRUB. However, 182 181 if <command>grub-mkfont</command> is not built, or the unicode font 183 182 data is not avaliable at the time GRUB is built, GRUB won't install 184 183 any font for the boot loader. The GRUB boot menu will be displayed 185 in an ugly way,and the early stage of kernel initialization will be186 in <quote>blind mode</quote> - you can't see any kernel messagebefore184 using a coarse font and the early stage of kernel initialization will be 185 in <quote>blind mode</quote> — you can't see any kernel messages before 187 186 the graphics card driver is initialized. It will be very difficult to 188 diagnos tic some boot issue (especially,if the graphics driver is189 built as module ).</para>187 diagnose some boot issues, especially if the graphics driver is 188 built as module.</para> 190 189 </warning> 191 190 192 191 <para> 193 <parameter>--with-platform=efi</parameter>: Ensures to buildGRUB with194 for EFI.192 <parameter>--with-platform=efi</parameter>: Ensures building GRUB with 193 EFI enabled. 195 194 </para> 196 195 -
postlfs/filesystems/uefi-bootloaders/grub-setup.xml
ra2c3f1d3 rd5cc78a 20 20 21 21 <para> 22 BLFS does n't have the essential packages to support Secure Boot. To22 BLFS does not have the essential packages to support Secure Boot. To 23 23 set up the boot process with GRUB for UEFI installed in BLFS, Secure 24 24 Boot must be turned off from the configuration interface of the … … 33 33 <para> 34 34 Ensure that an emergency boot disk is ready to <quote>rescue</quote> 35 the system , in case the system becomes un-bootable. To make a36 emergency boot disk with GRUB for EFI platform, at firstfind a spare35 the system in case the system becomes un-bootable. To make an 36 emergency boot disk with GRUB for an EFI based system, find a spare 37 37 USB flash drive and create a 38 38 <systemitem class="filesystem">vfat</systemitem> file system on it. … … 55 55 <para> 56 56 Still as the <systemitem class="username">root</systemitem> user, use 57 the CLI of<command>fdisk</command> utility to set the first parition57 the <command>fdisk</command> utility to set the first parition 58 58 of the USB flash drive to be an <quote>EFI system</quote> partition 59 59 (change <userinput>sdx</userinput> to the device node corresponding … … 101 101 <para> 102 102 Now the USB flash drive can be used as a emergency boot disk on x86-64 103 UEFI platform. It will boot the system and show GRUB shell. Then you104 can type commands to boot your operati onsystems on the hard drive.105 To gethow to select the boot device, read the manual of your103 UEFI platform. It will boot the system and show the GRUB shell. Then you 104 can type commands to boot your operating systems on the hard drive. 105 To learn how to select the boot device, read the manual of your 106 106 motherboard or laptop. 107 107 </para> … … 145 145 <term><parameter>CONFIG_EFI_STUB</parameter></term> 146 146 <listitem> 147 <para> ThoughEFI stub is designed to boot a kernel directly from148 the UEFI firmware (without bootloaderslike GRUB), GRUB needs the149 kernel being loaded to supportEFI handover protocol enabled by147 <para>Although the EFI stub is designed to boot a kernel directly from 148 the UEFI firmware (without a bootloader like GRUB), GRUB needs the 149 kernel to be loaded to support the EFI handover protocol enabled by 150 150 this option.</para> 151 151 </listitem> … … 155 155 <term><parameter>CONFIG_EFI_VARS</parameter></term> 156 156 <listitem> 157 <para>Don't use this option deprecated because of an1024-byte157 <para>Don't use this deprecated option because of a 1024-byte 158 158 variable size limit. Its function is replaced by 159 159 <parameter>CONFIG_EFIVAR_FS</parameter>.</para> … … 165 165 <listitem> 166 166 <para>The combination of these two options allows the kernel to 167 print debug messages (along with Tux logos) onearly stage of boot168 process with UEFI.</para>167 print debug messages (along with Tux logos) at the early stage of boot 168 the process with UEFI.</para> 169 169 </listitem> 170 170 </varlistentry> … … 179 179 <para> 180 180 On EFI based system, the bootloaders are installed in a special FAT32 181 partition called <emphasis>EFI System Partition</emphasis> (ESP).181 partition called an <emphasis>EFI System Partition</emphasis> (ESP). 182 182 If your system supports EFI, and a recent version of Linux 183 183 distribution or Windows is pre-installed, it's likely that the ESP … … 185 185 <systemitem class="username">root</systemitem> user, list all the 186 186 partitions on your hard drive (replace <userinput>sda</userinput> 187 with the device node corresponding to the hard drive):187 with the device corresponding to the appropriate hard drive): 188 188 </para> 189 189 … … 196 196 197 197 <para> 198 If the system or the hard drive is new, or it's the first time to199 install an UEFI booted OS on the system, the ESP may be nonexistent.200 Thencreate a new partition, make a198 If the system or the hard drive is new, or it's a first time 199 install an UEFI booted OS on the system, the ESP may not exist. 200 In that case, create a new partition, make a 201 201 <systemitem class="filesystem">vfat</systemitem> file system on it, 202 and set the partition type to <quote>EFI system</quote>. Readthe202 and set the partition type to <quote>EFI system</quote>. See the 203 203 instructions for the emergency boot device above as a reference. 204 204 </para> … … 222 222 223 223 <para> 224 It's recommended to add an entry for the ESP in224 Add an entry for the ESP in 225 225 <filename>/etc/fstab</filename>, so it will be mounted automatically 226 226 during system boot: … … 237 237 238 238 <para> 239 The installation of GRUB on UEFI platform requiresthe EFI Variable240 file system (<systemitem class="filesystem">efivarfs</systemitem>)239 The installation of GRUB on a UEFI platform requires that the EFI Variable 240 file system, <systemitem class="filesystem">efivarfs</systemitem>, to be 241 241 mounted. As the <systemitem class="username">root</systemitem> user: 242 242 </para> … … 248 248 If the system is booted with UEFI and systemd, 249 249 <systemitem class="filesystem">efivarfs</systemitem> will be mounted 250 automatically. However in LFS chroot environment it still needs to250 automatically. However in the LFS chroot environment it still needs to 251 251 be mounted manually. 252 252 </para> … … 254 254 255 255 <para revision="sysv"> 256 It's recommended toadd an entry for the256 Now add an entry for the 257 257 <systemitem class="filesystem">efivarfs</systemitem> in 258 <filename>/etc/fstab</filename> ,so it will be mounted automatically258 <filename>/etc/fstab</filename> so it will be mounted automatically 259 259 during system boot: 260 260 </para> … … 279 279 <para> 280 280 On UEFI based systems, GRUB works by installing an EFI application 281 (a special kind of PEexecutable) into281 (a special kind of executable) into 282 282 <filename class="directory">/boot/efi/EFI/[id]/grubx64.efi</filename>, 283 283 where <filename class="directory">/boot/efi</filename> is the mount 284 284 point of the ESP, and <literal>[id]</literal> is replaced with an 285 285 identifier specified in the <command>grub-install</command> command 286 line. ThenGRUB will create an entry in the EFI variables containing287 the path <literal>EFI/[id]/grubx64.efi</literal> ,so the EFI firmware286 line. GRUB will create an entry in the EFI variables containing 287 the path <literal>EFI/[id]/grubx64.efi</literal> so the EFI firmware 288 288 can find <filename>grubx64.efi</filename> and load it. 289 289 </para> … … 291 291 <para> 292 292 <filename>grubx64.efi</filename> is very lightweight (136 KB with 293 GRUB-2.06~rc1) so it w on't costmuch space in the ESP. A typical ESP294 size is 100 MB (for Windows boot manager, which costabout 50 MB in293 GRUB-2.06~rc1) so it will not use much space in the ESP. A typical ESP 294 size is 100 MB (for Windows boot manager, which uses about 50 MB in 295 295 the ESP). Once <filename>grubx64.efi</filename> loaded by the 296 296 firmware, it will load GRUB modules in the boot partition. … … 302 302 As the <systemitem class="username">root</systemitem> user, install 303 303 the GRUB files into <filename>/boot/efi/EFI/LFS/grubx64.efi</filename> 304 and <filename class="directory">/boot/grub</filename> , andset up the304 and <filename class="directory">/boot/grub</filename>. Then set up the 305 305 boot entry in the EFI variables: 306 306 </para> … … 331 331 332 332 <para> 333 Note that <literal>0005</literal> is the first in 333 Note that <literal>0005</literal> is the first in the 334 334 <literal>BootOrder</literal>, and <literal>Boot0005</literal> 335 is <literal>LFS</literal>. So on the next boot, GRUB installed336 by LFS will be used to boot the system.335 is <literal>LFS</literal>. This means that on the next boot, the 336 version of GRUB installed by LFS will be used to boot the system. 337 337 </para> 338 338 … … 384 384 <para> 385 385 From GRUB's perspective, the files are relative to the partition 386 used. If you used a separate /boot partition, remove /boot from the386 are used. If you used a separate /boot partition, remove /boot from the 387 387 above paths (to kernel and to <filename>unicode.pf2</filename>). You 388 388 will also need to change the set root line to point to the boot … … 418 418 <para> 419 419 <literal>(hd0,1)</literal> should be replaced with the GRUB 420 designated name for the ESP. <literal>chainloader</literal>420 designated name for the ESP. The <literal>chainloader</literal> 421 421 directive can be used to tell GRUB to run another EFI executable, 422 422 in this case the Windows Boot Manager. You may put more usable tools
Note:
See TracChangeset
for help on using the changeset viewer.