Changeset 54ff0b9


Ignore:
Timestamp:
10/08/2003 10:31:01 PM (21 years ago)
Author:
Alex Gronenwoud <alex@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
c1e4223
Parents:
4b8a426
Message:

Adapting the style of the Grub configuration section.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/grub.xml

    r4b8a426 r54ff0b9  
    99<para><screen><userinput>grub</userinput></screen></para>
    1010
    11 <para>Grub uses its own naming structure for drives, in the form of (hdn,m),
    12 where n is the hard drive number, and m is the partition number, both of which
    13 start from zero.  So, partition hda1 would be (hd0,0) to Grub, and hdb2 would
    14 be (hd1,1).  Also, Grub doesn't pay attention to CD-ROM drives at all, so if,
    15 for example, you have a CD on hdb, and a second hard drive on hdc, partitions
    16 on that second hard drive would still be (hd1,m).</para>
     11<para>Grub uses its own naming structure for drives and partitions, in the form
     12of (hdn,m), where <emphasis>n</emphasis> is the hard drive number, and
     13<emphasis>m</emphasis> the partition number, both starting from zero. This
     14means, for instance, that partition <filename>hda1</filename> is (hd0,0) to
     15Grub, and <filename>hdb2</filename> is (hd1,1). In contrast to Linux, Grub
     16doesn't consider CD-ROM drives to be hard drives, so if you have a CD on
     17<filename>hdb</filename>, for example, and a second hard drive on
     18<filename>hdc</filename>, that second hard drive would still be (hd1).</para>
    1719
    18 <para>So, using the information above, select the appropriate designator for
    19 your root partition.  For the purposes of this, we will assume (hd0,3) for
    20 your root partition.  First, we tell grub where to find its files:</para>
     20<para>Using the above information, determine the appropriate designator for
     21your root partition. For the folowing example, we'll assume your root partition
     22is <filename>hda4</filename>.</para>
    2123
    22 <para><screen><userinput>root (hd0,3)
    23 setup (hd0)
    24 quit</userinput></screen></para>
     24<para>First, tell Grub where to search for its <filename>stage{1,2}</filename>
     25files -- you can use Tab everywhere to make Grub show the alternatives:</para>
    2526
    26 <para>This tells Grub to look for its files on hda4 (hd0,3), and install itself
    27 into the MBR (Master Boot Record) of hda.</para>
     27<para><screen><userinput>root (hd0,3)</userinput></screen></para>
    2828
    29 <para>Also, we need to create the <filename>menu.lst</filename> file, which
    30 Grub uses to designate its boot menu:</para>
     29<para>Then tell it to install itself into the MBR (Master Boot Record) of
     30<filename>hda</filename>:</para>
    3131
    32 <para><screen><userinput>cat &gt; /boot/grub/menu.lst &lt;&lt; "EOF"
     32<para><screen><userinput>setup (hd0)</userinput></screen></para>
     33
     34<para>If all is well, Grub will have reported finding its files in
     35<filename>/boot/grub</filename>. That's all there was to it:</para>
     36
     37<para><screen><userinput>quit</userinput></screen></para>
     38
     39<para>Now we need to create the <filename>menu.lst</filename> file, which
     40defines Grub's boot menu:</para>
     41
     42<para><screen><userinput>cat &gt; /boot/grub/menu.lst &lt;&lt; "EOF"</userinput>
    3343# Begin /boot/grub/menu.lst
    3444
    35 # Default to first menu entry
     45# By default boot the first menu entry.
    3646default 0
    3747
    38 # Allow 30 seconds before booting default
     48# Allow 30 seconds before booting the default.
    3949timeout 30
    4050
    41 # Use prettier colors
     51# Use prettier colors.
    4252color green/black light-green/black
    4353
    44 # Default Entry for LFS
     54# The first entry is for LFS.
    4555title LFS 5.0
    4656root (hd0,3)
    4757kernel /boot/lfskernel root=/dev/hda4 ro
    48 EOF</userinput></screen></para>
     58<userinput>EOF</userinput></screen></para>
    4959
    50 <para>You might also want to add in an entry for your host distribution.  It
    51 might look similar to this:</para>
     60<para>You may want to add an entry for your host distribution.  It might look
     61like this:</para>
    5262
    53 <para><screen><userinput>cat &gt;&gt; /boot/grub/menu.lst &lt;&lt; "EOF"
    54 # Redhat Linux
    55 title Redhat
     63<para><screen><userinput>cat &gt;&gt; /boot/grub/menu.lst &lt;&lt; "EOF"</userinput>
     64title Red Hat
    5665root (hd0,2)
    5766kernel /boot/kernel-2.4.20 root=/dev/hda3 ro
    5867initrd /boot/initrd-2.4.20
    59 EOF</userinput></screen></para>
     68<userinput>EOF</userinput></screen></para>
    6069
    6170<para>Also, if you happen to dual-boot Windows, the following entry should
    6271allow booting it:</para>
    6372
    64 <para><screen><userinput>cat &gt;&gt; /boot/grub/menu.lst &lt;&lt; "EOF"
    65 # Windows
     73<para><screen><userinput>cat &gt;&gt; /boot/grub/menu.lst &lt;&lt; "EOF"</userinput>
    6674title Windows
    6775rootnoverify (hd0,0)
    6876chainloader +1
    69 EOF</userinput></screen></para>
     77<userinput>EOF</userinput></screen></para>
    7078
    71 <para>You can find more information regarding Grub on its website, located at:
     79<para>If <userinput>info grub</userinput> doesn't tell you all you want to
     80know, you can find more information regarding Grub on its website, located at:
    7281<ulink url="http://www.gnu.org/software/grub"/>.</para>
    7382
Note: See TracChangeset for help on using the changeset viewer.