source: chapter08/grub.xml@ e0a04e8

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 e0a04e8 was e0a04e8, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Removed text in chapter 08.

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

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