Cleaning up the revision of chroot and reboot sections.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3259 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Alex Gronenwoud 2004-02-23 22:09:27 +00:00
parent b157558174
commit f89de33022
6 changed files with 38 additions and 135 deletions

View File

@ -19,6 +19,9 @@ first a summary, then a detailed log.</para>
<listitem><para>ncurses-5.4</para></listitem>
</itemizedlist></listitem>
<listitem><para>February 23rd, 2004 [alex]: Chapters 6 + 9 : Cleaned up the
Revision of chroot and Reboot sections.</para></listitem>
<listitem><para>February 22nd, 2004 [alex]: Moved the stripping of the final
system from chapter 9 to the end of chapter 6.</para></listitem>

View File

@ -1,49 +0,0 @@
<sect1 id="ch-tools-util-linux">
<title>Installing Util-linux-&util-linux-version;</title>
<?dbhtml filename="util-linux.html" dir="chapter05"?>
<screen>&buildtime; &util-linux-time-tools;
&diskspace; &util-linux-compsize-tools;</screen>
&aa-utillinux-down;
&aa-utillinux-dep;
<sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
<sect2>
<title>Installation of Util-linux</title>
<para>Util-linux doesn't use the freshly installed headers and libraries from
the <filename>/tools</filename> directory. This is fixed by altering the
configure script:</para>
<screen><userinput>cp configure configure.backup
sed "s@/usr/include@/tools/include@g" configure.backup &gt; configure</userinput></screen>
<para>Prepare Util-linux for compilation:</para>
<screen><userinput>./configure</userinput></screen>
<para>Compile some support routines:</para>
<screen><userinput>make -C lib</userinput></screen>
<para>And, since you'll need only a couple of the utilities contained in this
package, build just those:</para>
<screen><userinput>make -C mount mount umount
make -C text-utils more
make -C sys-utils arch</userinput></screen>
<para>Now copy these programs to the temporary tools directory:</para>
<screen><userinput>cp mount/{,u}mount text-utils/more sys-utils/arch /tools/bin</userinput></screen>
</sect2>
<sect2><title>&nbsp;</title><para>&nbsp;</para>
<para>The details on this package are found in <xref linkend="contents-utillinux"/>.</para>
<para>&nbsp;</para></sect2>
</sect1>

View File

@ -1,50 +0,0 @@
<sect1 id="ch-system-aboutdebug">
<title>About debugging symbols</title>
<?dbhtml filename="aboutdebug.html" dir="chapter06"?>
<para>Most programs and libraries are, by default, compiled with debugging
symbols included (with gcc option -g).</para>
<para>When debugging a program or library that was compiled with debugging
information included, the debugger can give you not only memory addresses
but also the names of the routines and variables.</para>
<para>But the inclusion of these debugging symbols enlarges a program or
library significantly. To get an idea of the amount of space these symbols
occupy, have a look at the following:</para>
<itemizedlist>
<listitem><para>a bash binary
with debugging symbols: 1200 KB</para></listitem>
<listitem><para>a bash binary
without debugging symbols: 480 KB</para></listitem>
<listitem><para>Glibc and GCC files (/lib and /usr/lib)
with debugging symbols: 87 MB</para></listitem>
<listitem><para>Glibc and GCC files
without debugging symbols: 16 MB</para></listitem>
</itemizedlist>
<para>Sizes may vary a little, depending on which compiler was used and
which C library. But when comparing programs with and without debugging
symbols, the difference will generally be a factor between 2 and 5.</para>
<para>As most people will probably never use a debugger on their system
software, a lot of disk space can be regained by removing these symbols .</para>
<para>To remove debugging symbols from a binary (which must be an a.out
or ELF binary), run <command>strip --strip-debug filename</command>.
Wildcards can be used to treat multiple files (use something like
<userinput>strip --strip-debug $LFS/tools/bin/*</userinput>).</para>
<para>For your convenience, <xref linkend="chapter-finalizing"/> includes one simple
command to strip all debugging symbols from all programs and libraries on your
system. Additional information on optimization can be found in the hint at
<ulink url="&hints-root;optimization.txt"/>.</para>
</sect1>

View File

@ -590,21 +590,39 @@ destroyed.</para>
<sect1 id="ch-system-revisedchroot">
<title>Revised chroot command</title>
<title>Cleaning up</title>
<?dbhtml filename="revisedchroot.html" dir="chapter06"?>
<para>From now on when you exit the chroot environment and wish to reenter
it, you should run the following modified chroot command:</para>
<para>From now on, when you exit the chroot environment and wish to reenter
it, you should use the following modified chroot command:</para>
<screen><userinput>chroot $LFS /usr/bin/env -i \
&nbsp;&nbsp;&nbsp;&nbsp;HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
&nbsp;&nbsp;&nbsp;&nbsp;PATH=/bin:/usr/bin:/sbin:/usr/sbin \
&nbsp;&nbsp;&nbsp;&nbsp;/bin/bash --login</userinput></screen>
<para>The reason being there is no longer any need to use programs from the
<filename class="directory">/tools</filename> directory. However, we don't
want to remove the <filename class="directory">/tools</filename> directory
just yet. There is still some use for it towards the end of the book.</para>
<para>The reason for this is that, since the programs in <filename
class="directory">/tools</filename> are no longer needed, you may want to
delete the whole directory and regain the space. Before actually deleting the
directory, exit from chroot and reenter it with the above command. Also, before
removing <filename class="directory">/tools</filename>, you may want to tar it
up and store it in a safe place, in case you want build another LFS system
soon.</para>
<note><para>Removing <filename class="directory">/tools</filename> will also
remove the temporary copies of Tcl, Expect and DejaGnu, which were used for
running the toolchain tests. If you want to use these programs later on, you
will need to recompile and re-install them. The installation instructions are
the same as in <xref linkend="chapter-temporary-tools"/>, apart from changing
the prefix from <emphasis>/tools</emphasis> to <emphasis>/usr</emphasis>. The
BLFS book discusses a slightly different approach to installing Tcl, see <ulink
url="&blfs-root;"/>.</para></note>
<para>You may also want to move the packages and patches stored in <filename
class="directory">/sources</filename> to a more usual location, such as
<filename class="directory">/usr/src/packages</filename>, and remove the
directory -- or simply delete the whole directory if you've burned its contents
on a CD).</para>
</sect1>

View File

@ -2,30 +2,12 @@
<title>Rebooting the system</title>
<?dbhtml filename="reboot.html" dir="chapter09"?>
<para>Now that all of the software has been installed, it's time to exit the
chroot environment and reboot the computer. Before we exit the chroot
environment, let's unmount any mounted virtual file systems by running:</para>
<para>Now that all of the software has been installed, it is time to reboot
your computer. First exit from the chroot environment:</para>
<screen><userinput>umount /proc
umount /dev/pts</userinput></screen>
<para>Exit the chroot environment:</para>
<screen><userinput>logout</userinput></screen>
<para>Additionally, now that all software has been installed, there is no longer
a need for the <filename class="directory">/tools</filename> directory. You may
delete it. As this will also remove the temporary copies of Tcl, Expect and
DejaGnu, which were used for running the toolchain tests, you will need to
recompile and re-install them on your LFS system if you want to use these
programs later.</para>
<para>Also you may now want to move the contents of
<filename class="directory">/sources</filename> to
<filename class="directory">/usr/src/packages</filename> or something similar
(or simply delete them if you've burned them on a CD) and delete the
directory.</para>
<para>Before we reboot, let's unmount the LFS partition itself:</para>
<para>Then unmount the LFS file system:</para>
<screen><userinput>umount $LFS</userinput></screen>
@ -36,15 +18,14 @@ unmount the other partitions before you unmount $LFS, like this:</para>
umount $LFS/home
umount $LFS</userinput></screen>
<para>And now you can reboot your system by running something like:</para>
<para>Now reboot your system with:</para>
<screen><userinput>/sbin/shutdown -r now</userinput></screen>
<screen><userinput>shutdown -r now</userinput></screen>
<para>Assuming the Grub boot loader was set up as outlined earlier, the
default menu should be set to boot <emphasis>LFS &milestone;</emphasis>
automatically.</para>
<para>Assuming the Grub boot loader was set up as outlined earlier, the menu
is set to boot <emphasis>LFS &milestone;</emphasis> automatically.</para>
<para>After you have rebooted, your LFS system is ready for use and you
<para>When the reboot is complete, your LFS system is ready for use and you
can start adding your own software.</para>
</sect1>

View File

@ -2,8 +2,8 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"/usr/share/docbook/docbookx.dtd" [
<!ENTITY version "CVS-2004-02-22">
<!ENTITY releasedate "February 22nd, 2004">
<!ENTITY version "CVS-2004-02-23">
<!ENTITY releasedate "February 23rd, 2004">
<!ENTITY milestone "5.2">
<!ENTITY nbsp " ">