📄 building-a-bootloader.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content= "application/xhtml+xml; charset=iso-8859-1" /> <title> 7.12. Building a bootloader </title> <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /> <link rel="stylesheet" href="../stylesheets/lfs-print.css" type= "text/css" media="print" /> </head> <body id="lfs" class="CLFS-SVN-20060417-x86_64-Pure64"> <div class="navheader"> <div class="headertitles"> <h4> Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86_64-Pure64 </h4> <h3> Chapter 7. If You Are Going to Boot </h3> </div> <ul class="headerlinks"> <li class="prev"> <a accesskey="p" href="kernel.html" title="Linux-2.6.16.5">Prev</a> <p> Linux-2.6.16.5 </p> </li> <li class="next"> <a accesskey="n" href="bin86.html" title="Bin86-0.16.17">Next</a> <p> Bin86-0.16.17 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 7. If You Are Going to Boot">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86_64-Pure64"> Home</a> </li> </ul> </div> <div class="wrap" lang="en" xml:lang="en"> <div class="titlepage"> <h1 class="sect1"> 7.12. Building a bootloader </h1> </div> <p> On x86 and x86_64 (multilib) architectures, the preferred bootloader is Grub. Unfortunately, Grub doesn"t work on x86_64 Pure64 - the stage2 files can be correctly built as 32-bit, but the grub shell is a 64-bit program, and tries to execute some of the stage2 routines - this results in a segmentation fault. Therefore, in the final system we use Lilo as the bootloader. </p> <p> If you already have a bootloader, such as Grub, installed on the system then you should use that to make your new kernel bootable. </p> <div class="note"> <div class="admonhead"> <img alt="[Note]" src="../images/note.png" /> <h3 class="admontitle"> Note </h3> </div> <div class="admonbody"> <p> We will now cross-compile Bin86 and Lilo - these instructions assume you are using an x86_64 machine (e.g. booted fron a Live CD), either pure64 or multilib. This approach will not work if you are running the machine as i686, because a 32-bit kernel will not be able to execute a 64-bit binary to install the bootloader. If that is the case, you will need to install an i686 bootloader on the host system. </p> </div> </div> </div> <div class="navfooter"> <ul> <li class="prev"> <a accesskey="p" href="kernel.html" title="Linux-2.6.16.5">Prev</a> <p> Linux-2.6.16.5 </p> </li> <li class="next"> <a accesskey="n" href="bin86.html" title="Bin86-0.16.17">Next</a> <p> Bin86-0.16.17 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 7. If You Are Going to Boot">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86_64-Pure64"> Home</a>. </li> </ul> </div> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -