|
@@ -8,7 +8,7 @@
|
|
<?dbhtml filename="grub.html"?>
|
|
<?dbhtml filename="grub.html"?>
|
|
|
|
|
|
<indexterm zone="ch-bootable-grub">
|
|
<indexterm zone="ch-bootable-grub">
|
|
-<primary sortas="a-Grub">Grub</primary>
|
|
|
|
|
|
+<primary sortas="a-Grub">GRUB</primary>
|
|
<secondary>configuring</secondary></indexterm>
|
|
<secondary>configuring</secondary></indexterm>
|
|
|
|
|
|
<para>Your shiny new LFS system is almost complete. One of the last
|
|
<para>Your shiny new LFS system is almost complete. One of the last
|
|
@@ -25,10 +25,10 @@ bootable. Make sure that an emergency boot disk is ready to
|
|
<quote>rescue</quote> the computer if the computer becomes
|
|
<quote>rescue</quote> the computer if the computer becomes
|
|
unusable (un-bootable).</para>
|
|
unusable (un-bootable).</para>
|
|
|
|
|
|
-<para>Earlier, we compiled and installed the Grub boot loader software
|
|
|
|
|
|
+<para>Earlier, we compiled and installed the GRUB boot loader software
|
|
in preparation for this step. The procedure involves writing some
|
|
in preparation for this step. The procedure involves writing some
|
|
-special Grub files to specific locations on the hard drive. We highly
|
|
|
|
-recommend creating a Grub boot floppy diskette as a backup. Insert a
|
|
|
|
|
|
+special GRUB files to specific locations on the hard drive. We highly
|
|
|
|
+recommend creating a GRUB boot floppy diskette as a backup. Insert a
|
|
blank floppy diskette and run the following commands:</para>
|
|
blank floppy diskette and run the following commands:</para>
|
|
|
|
|
|
<screen><userinput>dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
|
|
<screen><userinput>dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
|
|
@@ -39,13 +39,13 @@ dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1</userinput></screen>
|
|
|
|
|
|
<screen><userinput>grub</userinput></screen>
|
|
<screen><userinput>grub</userinput></screen>
|
|
|
|
|
|
-<para>Grub uses its own naming structure for drives and partitions in
|
|
|
|
|
|
+<para>GRUB uses its own naming structure for drives and partitions in
|
|
the form of <emphasis>(hdn,m)</emphasis>, where <emphasis>n</emphasis>
|
|
the form of <emphasis>(hdn,m)</emphasis>, where <emphasis>n</emphasis>
|
|
is the hard drive number and <emphasis>m</emphasis> is the partition
|
|
is the hard drive number and <emphasis>m</emphasis> is the partition
|
|
number, both starting from zero. For example, partition <filename
|
|
number, both starting from zero. For example, partition <filename
|
|
class="partition">hda1</filename> is <emphasis>(hd0,0)</emphasis> to
|
|
class="partition">hda1</filename> is <emphasis>(hd0,0)</emphasis> to
|
|
-Grub and <filename class="partition">hdb3</filename> is
|
|
|
|
-<emphasis>(hd1,2)</emphasis>. In contrast to Linux, Grub does not
|
|
|
|
|
|
+GRUB and <filename class="partition">hdb3</filename> is
|
|
|
|
+<emphasis>(hd1,2)</emphasis>. In contrast to Linux, GRUB does not
|
|
consider CD-ROM drives to be hard drives. For example, if using a CD
|
|
consider CD-ROM drives to be hard drives. For example, if using a CD
|
|
on <filename class="partition">hdb</filename> and a second hard drive
|
|
on <filename class="partition">hdb</filename> and a second hard drive
|
|
on <filename class="partition">hdc</filename>, that second hard drive
|
|
on <filename class="partition">hdc</filename>, that second hard drive
|
|
@@ -57,9 +57,9 @@ one is used). For the following example, it is assumed that the root
|
|
(or separate boot) partition is <filename
|
|
(or separate boot) partition is <filename
|
|
class="partition">hda4</filename>.</para>
|
|
class="partition">hda4</filename>.</para>
|
|
|
|
|
|
-<para>Tell Grub where to search for its
|
|
|
|
|
|
+<para>Tell GRUB where to search for its
|
|
<filename>stage{1,2}</filename> files. The Tab key can be used
|
|
<filename>stage{1,2}</filename> files. The Tab key can be used
|
|
-everywhere to make Grub show the alternatives:</para>
|
|
|
|
|
|
+everywhere to make GRUB show the alternatives:</para>
|
|
|
|
|
|
<screen><userinput>root (hd0,3)</userinput></screen>
|
|
<screen><userinput>root (hd0,3)</userinput></screen>
|
|
|
|
|
|
@@ -67,22 +67,22 @@ everywhere to make Grub show the alternatives:</para>
|
|
loader. Do not run the command if this is not desired, for example, if
|
|
loader. Do not run the command if this is not desired, for example, if
|
|
using a third party boot manager to manage the Master Boot Record
|
|
using a third party boot manager to manage the Master Boot Record
|
|
(MBR). In this scenario, it would make more sense to install
|
|
(MBR). In this scenario, it would make more sense to install
|
|
-Grub into the <quote>boot sector</quote> of the LFS partition. In this
|
|
|
|
|
|
+GRUB into the <quote>boot sector</quote> of the LFS partition. In this
|
|
case, this next command would become <userinput>setup
|
|
case, this next command would become <userinput>setup
|
|
(hd0,3)</userinput>.</para></warning>
|
|
(hd0,3)</userinput>.</para></warning>
|
|
|
|
|
|
-<para>Tell Grub to install itself into the MBR of
|
|
|
|
|
|
+<para>Tell GRUB to install itself into the MBR of
|
|
<filename class="partition">hda</filename>:</para>
|
|
<filename class="partition">hda</filename>:</para>
|
|
|
|
|
|
<screen><userinput>setup (hd0)</userinput></screen>
|
|
<screen><userinput>setup (hd0)</userinput></screen>
|
|
|
|
|
|
-<para>If all went well, Grub will have reported finding its files in
|
|
|
|
|
|
+<para>If all went well, GRUB will have reported finding its files in
|
|
<filename class="directory">/boot/grub</filename>. That's all there is
|
|
<filename class="directory">/boot/grub</filename>. That's all there is
|
|
to it. Quit the <command>grub</command> shell:</para>
|
|
to it. Quit the <command>grub</command> shell:</para>
|
|
|
|
|
|
<screen><userinput>quit</userinput></screen>
|
|
<screen><userinput>quit</userinput></screen>
|
|
|
|
|
|
-<para>Create a <quote>menu list</quote> file defining Grub's boot menu:</para>
|
|
|
|
|
|
+<para>Create a <quote>menu list</quote> file defining GRUB's boot menu:</para>
|
|
|
|
|
|
<screen><userinput>cat > /boot/grub/menu.lst << "EOF"
|
|
<screen><userinput>cat > /boot/grub/menu.lst << "EOF"
|
|
<literal># Begin /boot/grub/menu.lst
|
|
<literal># Begin /boot/grub/menu.lst
|
|
@@ -122,10 +122,10 @@ chainloader +1</literal>
|
|
EOF</userinput></screen>
|
|
EOF</userinput></screen>
|
|
|
|
|
|
<para>If <command>info grub</command> does not provide all necessary material, additional
|
|
<para>If <command>info grub</command> does not provide all necessary material, additional
|
|
-information regarding Grub is located on its website at:
|
|
|
|
|
|
+information regarding GRUB is located on its website at:
|
|
<ulink url="http://www.gnu.org/software/grub/"/>.</para>
|
|
<ulink url="http://www.gnu.org/software/grub/"/>.</para>
|
|
|
|
|
|
-<para>The FHS stipulates that Grub's <filename>menu.lst</filename> file should be symlinked to
|
|
|
|
|
|
+<para>The FHS stipulates that GRUB's <filename>menu.lst</filename> file should be symlinked to
|
|
<filename class="symlink">/etc/grub/menu.lst</filename>. To satisfy this requirement, issue the
|
|
<filename class="symlink">/etc/grub/menu.lst</filename>. To satisfy this requirement, issue the
|
|
following command:</para>
|
|
following command:</para>
|
|
|
|
|