Ignore:
Timestamp:
08/08/2004 02:11:37 AM (20 years ago)
Author:
Gerard Beekmans <gerard@…>
Branches:
6.0
Children:
dbc195c
Parents:
5ba3d1d
Message:

Completed global edits for upcoming 6.0 release

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/testing/BOOK@4002 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/grub.xml

    r5ba3d1d r1dc34de7  
    1212<secondary>configuring</secondary></indexterm>
    1313
    14 <para>Your shiny new LFS system is almost complete. One of the last things to
    15 do is ensure you can boot it. The instructions below apply only to computers of
    16 IA-32 architecture, meaning mainstream PCs. Information on <quote>boot
    17 loading</quote> for other architectures should be available in the usual
    18 resource-specific locations for those architectures.</para>
     14<para>Your shiny new LFS system is almost complete. One of the last
     15things to do is ensure that it can be properly booted. The
     16instructions below apply only to computers of IA-32 architecture,
     17meaning mainstream PCs. Information on <quote>boot loading</quote> for
     18other architectures should be available in the usual resource-specific
     19locations for those architectures.</para>
    1920
    20 <para>Boot loading can be a complex area. First, a few cautionary words. You
    21 really should be familiar with your current boot loader and any other
    22 operating systems present on your hard drive(s) that you might wish to keep
    23 bootable. Please make sure that you have an emergency boot disk ready, so that
    24 you can rescue your computer if, by any chance, your computer becomes unusable
    25 (un-bootable).</para>
     21<para>Boot loading can be a complex area. First, a few cautionary
     22words. Be familiar with the current boot loader and any other
     23operating systems present on the hard drive(s) that need to be
     24bootable. Please make sure that an emergency boot disk is ready to
     25<quote>rescue</quote> the computer if, by chance, the computer becomes
     26unusable (un-bootable).</para>
    2627
    27 <para>Earlier, we compiled and installed the Grub boot loader software in
    28 preparation for this step. The procedure involves writing some special Grub
    29 files to specific locations on the hard drive. Before we get to that, we
    30 highly recommend that you create a Grub boot floppy diskette just in case.
    31 Insert a blank floppy diskette and run the following commands:</para>
     28<para>Earlier, we compiled and installed the Grub boot loader software
     29in preparation for this step. The procedure involves writing some
     30special Grub files to specific locations on the hard drive. We highly
     31recommend a Grub boot floppy diskette be created as a backup. Insert a
     32blank floppy diskette and run the following commands:</para>
    3233
    3334<screen><userinput>dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
    3435dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1</userinput></screen>
    3536
    36 <para>Remove the diskette and store it somewhere safe. Now we'll run the
     37<para>Remove the diskette and store it somewhere safe. Now, run the
    3738<command>grub</command> shell:</para>
    3839
    3940<screen><userinput>grub</userinput></screen>
    4041
    41 <para>Grub uses its own naming structure for drives and partitions, in the form
    42 of (hdn,m), where <emphasis>n</emphasis> is the hard drive number, and
    43 <emphasis>m</emphasis> the partition number, both starting from zero. This
    44 means, for instance, that partition <filename class="partition">hda1</filename> is (hd0,0) to
    45 Grub, and <filename class="partition">hdb2</filename> is (hd1,1). In contrast to Linux, Grub
    46 doesn't consider CD-ROM drives to be hard drives, so if you have a CD on
    47 <filename class="partition">hdb</filename>, for example, and a second hard drive on
    48 <filename class="partition">hdc</filename>, that second hard drive would still be (hd1).</para>
     42<para>Grub uses its own naming structure for drives and partitions, in
     43the form of <emphasis>(hdn,m)</emphasis>, where <emphasis>n</emphasis>
     44is the hard drive number and <emphasis>m</emphasis> is the partition
     45number, both starting from zero. For example, partition <filename
     46class="partition">hda1</filename> is <emphasis>(hd0,0)</emphasis> to
     47Grub, and <filename class="partition">hdb3</filename> is
     48<emphasis>(hd1,2)</emphasis>. In contrast to Linux, Grub does not
     49consider CD-ROM drives to be hard drives. For example, if using a CD
     50on <filename class="partition">hdb</filename> and a second hard drive
     51on <filename class="partition">hdc</filename>, that second hard drive
     52would still be <emphasis>(hd1)</emphasis>.</para>
    4953
    50 <para>Using the above information, determine the appropriate designator for
    51 your root partition (or boot partition, if you use a separate one). For the
    52 following example, we'll assume your root (or separate boot) partition is
    53 <filename class="partition">hda4</filename>.</para>
     54<para>Using the above information, determine the appropriate
     55designator for the root partition (or boot partition, if a separate
     56one is used). For the following example, it is assumed that the root
     57(or separate boot) partition is <filename
     58class="partition">hda4</filename>.</para>
    5459
    55 <para>First, tell Grub where to search for its <filename>stage{1,2}</filename>
    56 files -- you can use the Tab key everywhere to make Grub show the alternatives:</para>
     60<para>First, tell Grub where to search for its
     61<filename>stage{1,2}</filename> files. The Tab key can be used
     62everywhere to make Grub show the alternatives:</para>
    5763
    5864<screen><userinput>root (hd0,3)</userinput></screen>
    5965
    60 
    61 <warning><para>The following command will overwrite your current boot loader.
    62 Don't run the command if this is not what you want. For example, you may be
    63 using a third party boot manager to manage your MBR (Master Boot Record). In
    64 this scenario, it would probably make more sense to install Grub into the
    65 <quote>boot sector</quote> of the LFS partition, in which case this next command
    66 would become: <userinput>setup (hd0,3)</userinput>.</para></warning>
    67 
     66<warning><para>The following command will overwrite the current boot
     67loader. Do not run the command if this is not desired, for example, if
     68using a third party boot manager to manage the Master Boot Record
     69(MBR). In this scenario, it would probably make more sense to install
     70Grub into the <quote>boot sector</quote> of the LFS partition. In this
     71case, this next command would become: <userinput>setup
     72(hd0,3)</userinput>.</para></warning>
    6873
    6974<para>Tell Grub to install itself into the MBR (Master Boot Record) of
     
    7277<screen><userinput>setup (hd0)</userinput></screen>
    7378
    74 <para>If all is well, Grub will have reported finding its files in
    75 <filename class="directory">/boot/grub</filename>. That's all there is to it:</para>
     79<para>If all went well, Grub will have reported finding its files in
     80<filename class="directory">/boot/grub</filename>. That's all there is
     81to it. Quit the <command>grub</command> shell:</para>
    7682
    7783<screen><userinput>quit</userinput></screen>
    7884
    79 <para>Now we need to create a <quote>menu list</quote> file, defining Grub's
    80 boot menu:</para>
     85<para>Create a <quote>menu list</quote> file defining Grub's boot menu:</para>
    8186
    8287<screen><userinput>cat &gt; /boot/grub/menu.lst &lt;&lt; "EOF"
     
    98103EOF</userinput></screen>
    99104
    100 <para>You may want to add an entry for your host distribution. It might look
     105<para>Add an entry for the host distribution if desired. It might look
    101106like this:</para>
    102107
     
    108113EOF</userinput></screen>
    109114
    110 <para>Also, if you happen to dual-boot Windows, the following entry should
    111 allow booting it:</para>
     115<para>Also, if dual-booting Windows, the following entry will allow
     116booting it:</para>
    112117
    113118<screen><userinput>cat &gt;&gt; /boot/grub/menu.lst &lt;&lt; "EOF"
     
    117122EOF</userinput></screen>
    118123
    119 <para>If <command>info grub</command> doesn't tell you all you want to
    120 know, you can find more information regarding Grub on its website, located at:
     124<para>If <command>info grub</command> does not provide all necessary material, additional
     125information regarding Grub is located on its website at:
    121126<ulink url="http://www.gnu.org/software/grub/"/>.</para>
    122127
    123128</sect1>
     129
Note: See TracChangeset for help on using the changeset viewer.