mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-05 22:04:48 +00:00
Expand Grub details and add a warning.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2987 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
f046b9baf1
commit
e3a72b120b
@ -96,6 +96,9 @@
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>October 13th, 2003 [greg]: Chapter 8 - Making the LFS system
|
||||
bootable: Expand Grub details and add a warning.</para></listitem>
|
||||
|
||||
<listitem><para>October 13th, 2003 [greg]: Chapter 9 - Rebooting the system:
|
||||
Reworked umount commands.</para></listitem>
|
||||
|
||||
|
@ -10,7 +10,7 @@ This procedure is not recommended for your first LFS install, but if you
|
||||
are short on disk space, and you feel brave, take a look at the hint at
|
||||
<ulink url="&hints-root;lfs_next_to_existing_systems.txt"/>.</para>
|
||||
|
||||
<para>For a minimal system you will need a partition of around 1 GB.
|
||||
<para>For a minimal system you will need a partition of around 1.2 GB.
|
||||
This is enough to store all the source tarballs and compile all the packages.
|
||||
But if you intend to use the LFS system as your primary Linux system, you
|
||||
will probably want to install additional software, and will need more space
|
||||
@ -23,11 +23,13 @@ The swap partition for your LFS system can be the same one as for your host
|
||||
system, so you won't have to create another if your host system already uses
|
||||
a swap partition.</para>
|
||||
|
||||
<para>Start the <userinput>cfdisk</userinput> program with an argument naming
|
||||
the hard disk upon which the new partition must be created -- for example
|
||||
<para>Start a disk partitioning program such as <userinput>cfdisk</userinput>
|
||||
or <userinput>fdisk</userinput> with an argument naming the hard disk upon
|
||||
which the new partition must be created -- for example
|
||||
<filename>/dev/hda</filename> for the primary IDE disk. Create a Linux native
|
||||
partition and a swap partition, if needed. Please refer to the man page of
|
||||
<userinput>cfdisk</userinput> if you don't yet know how to use the program.</para>
|
||||
partition and a swap partition, if needed. Please refer to the man pages of
|
||||
<userinput>cfdisk</userinput> or <userinput>fdisk</userinput> if you don't yet
|
||||
know how to use the programs.</para>
|
||||
|
||||
<para>Remember the designation of your new partition -- something like
|
||||
<filename>hda5</filename>. This book will refer to it as the LFS partition.
|
||||
|
@ -87,9 +87,15 @@ You'll see how this preparation is used later on in the
|
||||
chapter.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<!-- HACK - Force some whitespace to appease tidy -->
|
||||
<literallayout></literallayout>
|
||||
|
||||
<warning><para>Do not yet remove the Binutils build and source directories. You
|
||||
will need them again in their current state a bit further on in this
|
||||
chapter.</para></warning>
|
||||
|
||||
<!-- HACK - Force some whitespace to appease tidy -->
|
||||
<literallayout></literallayout>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -60,5 +60,8 @@ make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
|
||||
We'll need these directories again in the next chapter in the state they are in
|
||||
now.</para></warning>
|
||||
|
||||
<!-- HACK - Force some whitespace to appease tidy -->
|
||||
<literallayout></literallayout>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -85,6 +85,9 @@ different.</para>
|
||||
<screen><userinput>rm dummy.c a.out</userinput></screen>
|
||||
</caution>
|
||||
|
||||
<!-- HACK - Force some whitespace to appease tidy -->
|
||||
<literallayout></literallayout>
|
||||
|
||||
<para>This completes the installation of the self-contained toolchain, and it
|
||||
can now be used to build the rest of the temporary tools.</para>
|
||||
|
||||
|
@ -56,5 +56,8 @@ throughout the book.</para>
|
||||
<filename>tcl&tcl-version;</filename> source directory yet, as the next package
|
||||
will need its internal headers.</para></caution>
|
||||
|
||||
<!-- HACK - Force some whitespace to appease tidy -->
|
||||
<literallayout></literallayout>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -56,6 +56,9 @@ linker is something other than <filename>ld-linux.so.2</filename>, you
|
||||
name of your platform's dynamic linker in the above commands. Refer back to
|
||||
<xref linkend="ch05-toolchaintechnotes"/> if necessary.</para></important>
|
||||
|
||||
<!-- HACK - Force some whitespace to appease tidy -->
|
||||
<literallayout></literallayout>
|
||||
|
||||
<caution><para>It is imperative at this point to stop and ensure that the
|
||||
basic functions (compiling and linking) of the adjusted toolchain are working
|
||||
as expected. For this we are going to perform a simple sanity check:</para>
|
||||
@ -84,5 +87,8 @@ different.</para>
|
||||
<screen><userinput>rm dummy.c a.out</userinput></screen>
|
||||
</caution>
|
||||
|
||||
<!-- HACK - Force some whitespace to appease tidy -->
|
||||
<literallayout></literallayout>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -2,9 +2,30 @@
|
||||
<title>Making the LFS system bootable</title>
|
||||
<?dbhtml filename="grub.html" dir="chapter08"?>
|
||||
|
||||
<para>Now that we have our shiny new Linux-From-Scratch system completed,
|
||||
we need to ensure we can boot it. To do this, we will run the
|
||||
<userinput>grub</userinput> program.</para>
|
||||
<para>Your shiny new LFS system is almost complete. One of the last things to
|
||||
do is ensure you can boot it. The instructions below apply only to computers
|
||||
of IA-32 architecture, i.e. mainstream PC's. Information on "boot loading" for
|
||||
other architectures should be available in the usual resource specific
|
||||
locations for those architectures.</para>
|
||||
|
||||
<para>Boot loading can be a complex area. First, a few cautionary words. You
|
||||
really should be familiar with your current boot loader and any other
|
||||
operating systems present on your hard drive(s) that you might wish to keep
|
||||
bootable. Please make sure that you have an emergency boot disk ready, so that
|
||||
you can rescue your computer if, by any chance, your computer becomes unusable
|
||||
(unbootable).</para>
|
||||
|
||||
<para>Earlier, we compiled and installed the Grub boot loader software in
|
||||
preparation for this step. The procedure involves writing some special Grub
|
||||
files to specific locations on the hard drive. Before we get to that, we
|
||||
highly recommend that you create a Grub boot floppy diskette just in case.
|
||||
Insert a blank floppy diskette and run the following commands:</para>
|
||||
|
||||
<screen><userinput>dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
|
||||
dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1</userinput></screen>
|
||||
|
||||
<para>Remove the diskette and store it somewhere safe. Now we'll run the
|
||||
<userinput>grub</userinput> shell.</para>
|
||||
|
||||
<screen><userinput>grub</userinput></screen>
|
||||
|
||||
@ -26,13 +47,26 @@ files -- you can use Tab everywhere to make Grub show the alternatives:</para>
|
||||
|
||||
<screen><userinput>root (hd0,3)</userinput></screen>
|
||||
|
||||
<!-- HACK - Force some whitespace to appease tidy -->
|
||||
<literallayout></literallayout>
|
||||
|
||||
<warning><para>The following command will overwrite your current boot loader.
|
||||
Don't run the command if this is not what you want. For example, you may be
|
||||
using a third party boot manager to manage your MBR (Master Boot Record). In
|
||||
this scenario, it would probably make more sense to install Grub into the
|
||||
"boot sector" of the LFS partition, in which case the command would become
|
||||
<userinput>setup (hd0,3)</userinput>:</para></warning>
|
||||
|
||||
<!-- HACK - Force some whitespace to appease tidy -->
|
||||
<literallayout></literallayout>
|
||||
|
||||
<para>Then tell it to install itself into the MBR (Master Boot Record) of
|
||||
<filename>hda</filename>:</para>
|
||||
|
||||
<screen><userinput>setup (hd0)</userinput></screen>
|
||||
|
||||
<para>If all is well, Grub will have reported finding its files in
|
||||
<filename>/boot/grub</filename>. That's all there was to it:</para>
|
||||
<filename>/boot/grub</filename>. That's all there is to it:</para>
|
||||
|
||||
<screen><userinput>quit</userinput></screen>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user