source: chapter08/grub.xml@ 395942a

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.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 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
Last change on this file since 395942a was 3f0c882, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Removed the text in chapter 06.

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

  • Property mode set to 100644
File size: 2.6 KB
RevLine 
[673b0d8]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
[3be4d97]6<sect1 id="ch-bootable-grub">
[955533b]7<title>Making the LFS system bootable</title>
[673b0d8]8<?dbhtml filename="grub.html"?>
9
[955533b]10
[e0a04e8]11<para>We highly recommend that you create a Grub boot floppy diskette just in case.
[e3a72b1]12Insert a blank floppy diskette and run the following commands:</para>
13
14<screen><userinput>dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
15dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1</userinput></screen>
16
17<para>Remove the diskette and store it somewhere safe. Now we'll run the
[0719866]18<command>grub</command> shell:</para>
[1561534]19
[21ba4e3]20<screen><userinput>grub</userinput></screen>
[1561534]21
[54ff0b9]22<para>First, tell Grub where to search for its <filename>stage{1,2}</filename>
[673b0d8]23files -- you can use the Tab key everywhere to make Grub show the alternatives:</para>
[1561534]24
[21ba4e3]25<screen><userinput>root (hd0,3)</userinput></screen>
[1561534]26
[673b0d8]27<para>Tell Grub to install itself into the MBR (Master Boot Record) of
[0719866]28<filename class="partition">hda</filename>:</para>
[1561534]29
[21ba4e3]30<screen><userinput>setup (hd0)</userinput></screen>
[54ff0b9]31
32<para>If all is well, Grub will have reported finding its files in
[0719866]33<filename class="directory">/boot/grub</filename>. That's all there is to it:</para>
[54ff0b9]34
[21ba4e3]35<screen><userinput>quit</userinput></screen>
[54ff0b9]36
[673b0d8]37<para>Now we need to create a <quote>menu list</quote> file, defining Grub's
38boot menu:</para>
[54ff0b9]39
[0719866]40<screen><userinput>cat &gt; /boot/grub/menu.lst &lt;&lt; "EOF"
[1561534]41# Begin /boot/grub/menu.lst
42
[54ff0b9]43# By default boot the first menu entry.
[1561534]44default 0
45
[54ff0b9]46# Allow 30 seconds before booting the default.
[1561534]47timeout 30
48
[54ff0b9]49# Use prettier colors.
[1561534]50color green/black light-green/black
51
[54ff0b9]52# The first entry is for LFS.
[52216a8]53title LFS &version;
[bc362d4]54root (hd0,3)
[eb443a3]55kernel /boot/lfskernel-&linux-version; root=/dev/hda4
[0719866]56EOF</userinput></screen>
[1561534]57
[17476c5]58<para>You may want to add an entry for your host distribution. It might look
[54ff0b9]59like this:</para>
[1561534]60
[0719866]61<screen><userinput>cat &gt;&gt; /boot/grub/menu.lst &lt;&lt; "EOF"
[54ff0b9]62title Red Hat
[bc362d4]63root (hd0,2)
[1969cea]64kernel /boot/kernel-2.4.20 root=/dev/hda3
[bc362d4]65initrd /boot/initrd-2.4.20
[0719866]66EOF</userinput></screen>
[1561534]67
68<para>Also, if you happen to dual-boot Windows, the following entry should
69allow booting it:</para>
70
[0719866]71<screen><userinput>cat &gt;&gt; /boot/grub/menu.lst &lt;&lt; "EOF"
[bc362d4]72title Windows
73rootnoverify (hd0,0)
74chainloader +1
[0719866]75EOF</userinput></screen>
[1561534]76
[205af12]77<para>The FHS stipulates that Grub's menu.lst file should be symlinked to
78/etc/grub/menu.lst. To satisfy this requirement, issue the following
79command:</para>
80
81<screen><userinput>mkdir /etc/grub &amp;&amp;
82ln -s /boot/grub/menu.lst /etc/grub</userinput></screen>
83
[955533b]84</sect1>
Note: See TracBrowser for help on using the repository browser.