cvs commit: LFS/BOOK/chapter06 strippingagain.xml aboutdebug.xml automake.xml bash.xml binutils.xml bison.xml bzip2.xml changingowner.xml chapter06.xml chroot.xml coreutils.xml devices.xml

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Jun 13 05:58:23 PDT 2004


manuel      04/06/13 06:58:23

  Modified:    BOOK/chapter06 aboutdebug.xml automake.xml bash.xml
                        binutils.xml bison.xml bzip2.xml changingowner.xml
                        chapter06.xml chroot.xml coreutils.xml devices.xml
  Added:       BOOK/chapter06 strippingagain.xml
  Log:
  Added a separate file for the strippingagain section.
  Tags correcitions.
  
  Revision  Changes    Path
  1.30      +3 -2      LFS/BOOK/chapter06/aboutdebug.xml
  
  Index: aboutdebug.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/aboutdebug.xml,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- aboutdebug.xml	3 May 2004 10:59:41 -0000	1.29
  +++ aboutdebug.xml	13 Jun 2004 12:58:23 -0000	1.30
  @@ -8,7 +8,7 @@
   <?dbhtml filename="aboutdebug.html"?>
   
   <para>Most programs and libraries are, by default, compiled with debugging
  -symbols included (with <command>gcc</command>'s <emphasis>-g</emphasis>
  +symbols included (with <command>gcc</command>'s <parameter>-g</parameter>
   option). This means that, 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>
  @@ -25,7 +25,8 @@
   <listitem><para>a bash binary
   without debugging symbols: 480 KB</para></listitem>
   
  -<listitem><para>Glibc and GCC files (/lib and /usr/lib)
  +<listitem><para>Glibc and GCC files (<filename class="directory">/lib</filename>
  +and <filename class="directory">/usr/lib</filename>)
   with debugging symbols: 87 MB</para></listitem>
   
   <listitem><para>Glibc and GCC files
  
  
  
  1.24      +1 -1      LFS/BOOK/chapter06/automake.xml
  
  Index: automake.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/automake.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- automake.xml	24 May 2004 21:37:21 -0000	1.23
  +++ automake.xml	13 Jun 2004 12:58:23 -0000	1.24
  @@ -184,7 +184,7 @@
   <term><command>ylwrap</command></term>
   <listitem>
   <indexterm zone="ch-system-automake ylwrap"><primary sortas="b-ylwrap">ylwrap</primary></indexterm>
  -<para>is a wrapper for lex and yacc.</para>
  +<para>is a wrapper for <command>lex</command> and <command>yacc</command>.</para>
   </listitem>
   </varlistentry>
   </variablelist>
  
  
  
  1.28      +8 -6      LFS/BOOK/chapter06/bash.xml
  
  Index: bash.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/bash.xml,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- bash.xml	7 Jun 2004 18:52:47 -0000	1.27
  +++ bash.xml	13 Jun 2004 12:58:23 -0000	1.28
  @@ -54,11 +54,12 @@
   
   <screen><userinput>exec /bin/bash --login +h</userinput></screen>
   
  -<para>Note that the parameters used make it an interactive login instance
  -(so /etc/profile is read, if it exists, and the first found
  -~/.bash_profile, ~/.bash_login or and ~/.profile) and continue to
  +<note><para>The parameters used make it an interactive login instance
  +(so <filename>/etc/profile</filename> is read, if it exists, and the first found
  +<filename>~/.bash_profile</filename>, <filename>~/.bash_login</filename> or 
  +and <filename>~/.profile</filename>) and continue to
   disable hashing so that new programs are found as they become
  -available.</para>
  +available.</para></note>
   
   </sect2>
   
  @@ -87,7 +88,7 @@
   <listitem>
   <indexterm zone="ch-system-bash bashbug"><primary sortas="b-bashbug">bashbug</primary></indexterm>
   <para>is a shell script to help the user
  -compose and mail bug reports concerning bash in a standard format.</para>
  +compose and mail bug reports concerning <command>bash</command> in a standard format.</para>
   </listitem>
   </varlistentry>
   
  @@ -96,7 +97,8 @@
   <listitem>
   <indexterm zone="ch-system-bash sh"><primary sortas="b-sh">sh</primary></indexterm>
   <para>is a symlink to the bash program. When invoked
  -as sh, bash tries to mimic the startup behavior of historical versions of sh as
  +as <command>sh</command>, <command>bash</command> tries to mimic the 
  +startup behavior of historical versions of <command>sh</command> as
   closely as possible, while conforming to the POSIX standard as well.</para>
   </listitem>
   </varlistentry>
  
  
  
  1.27      +6 -6      LFS/BOOK/chapter06/binutils.xml
  
  Index: binutils.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/binutils.xml,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- binutils.xml	24 May 2004 21:37:21 -0000	1.26
  +++ binutils.xml	13 Jun 2004 12:58:23 -0000	1.27
  @@ -37,14 +37,14 @@
   
   <para>If you receive the message:</para>
   
  -<blockquote><screen>The system has no more ptys.  Ask your system administrator to create more.</screen></blockquote>
  +<screen><computeroutput>The system has no more ptys.  Ask your system administrator to create more.</computeroutput></screen>
   
   <para>Your chroot environment is not set up for proper PTY operation. In this
   case there is no point in running the test suites for Binutils and GCC until you
   are able to resolve the issue.</para>
   
   <para>This package is known to behave badly when you have changed its
  -default optimization flags (including the -march and -mcpu options).
  +default optimization flags (including the <parameter>-march</parameter> and <parameter>-mcpu</parameter> options).
   Therefore, if you have defined any environment variables that override
   default optimizations, such as CFLAGS and CXXFLAGS, we recommend un-setting
   or modifying them when building Binutils.</para>
  @@ -65,9 +65,9 @@
   
   <para>Normally, the <emphasis>tooldir</emphasis> (the directory where the
   executables end up) is set to $(exec_prefix)/$(target_alias), which expands
  -into, for example, <filename>/usr/i686-pc-linux-gnu</filename>. Since we only
  +into, for example, <filename class="directory">/usr/i686-pc-linux-gnu</filename>. Since we only
   build for our own system, we don't need this target specific directory in
  -<filename>/usr</filename>. That setup would be used if the system was used to
  +<filename class="directory">/usr</filename>. That setup would be used if the system was used to
   cross-compile (for example compiling a package on an Intel machine that
   generates code that can be executed on PowerPC machines).</para>
   
  @@ -87,7 +87,7 @@
   
   <screen><userinput>make tooldir=/usr install</userinput></screen>
   
  -<para>Install the <emphasis>libiberty</emphasis> header file that is needed by
  +<para>Install the <filename class="headerfile">libiberty</filename> header file that is needed by
   some packages:</para>
   
   <screen><userinput>cp ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
  @@ -133,7 +133,7 @@
   <term><command>as</command></term>
   <listitem>
   <indexterm zone="ch-system-binutils as"><primary sortas="b-as">as</primary></indexterm>
  -<para>is an assembler. It assembles the output of gcc into object files.</para>
  +<para>is an assembler. It assembles the output of <command>gcc</command> into object files.</para>
   </listitem>
   </varlistentry>
   
  
  
  
  1.24      +4 -3      LFS/BOOK/chapter06/bison.xml
  
  Index: bison.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/bison.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- bison.xml	24 May 2004 21:37:21 -0000	1.23
  +++ bison.xml	13 Jun 2004 12:58:23 -0000	1.24
  @@ -61,7 +61,7 @@
   <listitem>
   <indexterm zone="ch-system-bison bison"><primary sortas="b-bison">bison</primary></indexterm>
   <para>generates, from a series of rules, a program
  -for analyzing the structure of text files. Bison is a replacement for yacc
  +for analyzing the structure of text files. <command>bison</command> is a replacement for <command>yacc</command>
   (Yet Another Compiler Compiler).</para>
   </listitem>
   </varlistentry>
  @@ -70,8 +70,9 @@
   <term><command>yacc</command></term>
   <listitem>
   <indexterm zone="ch-system-bison yacc"><primary sortas="b-yacc">yacc</primary></indexterm>
  -<para>is a wrapper for bison, meant for programs
  -that still call yacc instead of bison. It calls bison with the -y option.</para>
  +<para>is a wrapper for <command>bison</command>, meant for programs
  +that still call <command>yacc</command> instead of <command>bison</command>.
  +It calls <command>bison</command> with the <parameter>-y</parameter> option.</para>
   </listitem>
   </varlistentry>
   
  
  
  
  1.24      +8 -8      LFS/BOOK/chapter06/bzip2.xml
  
  Index: bzip2.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/bzip2.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- bzip2.xml	24 May 2004 21:37:21 -0000	1.23
  +++ bzip2.xml	13 Jun 2004 12:58:23 -0000	1.24
  @@ -35,10 +35,10 @@
   <screen><userinput>make -f Makefile-libbz2_so
   make clean</userinput></screen>
   
  -<para>The <emphasis>-f</emphasis> flag will cause Bzip2 to be built
  +<para>The <parameter>-f</parameter> flag will cause Bzip2 to be built
   using a different <filename>Makefile</filename> file, in this case the
   <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
  -<filename>libbz2.so</filename> library and links the Bzip2 utilities
  +<filename class="libraryfile">libbz2.so</filename> library and links the Bzip2 utilities
   against it.</para>
   
   <para>Compile the package:</para>
  @@ -100,7 +100,7 @@
   <term><command>bzcmp</command></term>
   <listitem>
   <indexterm zone="ch-system-bzip2 bzcmp"><primary sortas="b-bzcmp">bzcmp</primary></indexterm>
  -<para>runs cmp on bzipped files.</para>
  +<para>runs <command>cmp</command> on bzipped files.</para>
   </listitem>
   </varlistentry>
   
  @@ -108,7 +108,7 @@
   <term><command>bzdiff</command></term>
   <listitem>
   <indexterm zone="ch-system-bzip2 bzdiff"><primary sortas="b-bzdiff">bzdiff</primary></indexterm>
  -<para>runs diff on bzipped files.</para>
  +<para>runs <command>diff</command> on bzipped files.</para>
   </listitem>
   </varlistentry>
   
  @@ -116,7 +116,7 @@
   <term><command>bzgrep</command></term>
   <listitem>
   <indexterm zone="ch-system-bzip2 bzgrep"><primary sortas="b-bzgrep">bzgrep</primary></indexterm>
  -<para>and friends run grep on bzipped files.</para>
  +<para>and friends run <command>grep</command> on bzipped files.</para>
   </listitem>
   </varlistentry>
   
  @@ -135,7 +135,7 @@
   <term><command>bzip2recover</command></term>
   <listitem>
   <indexterm zone="ch-system-bzip2 bzip2recover"><primary sortas="b-bzip2recover">bzip2recover</primary></indexterm>
  -<para>tries to recover data from damaged bzip2 files.</para>
  +<para>tries to recover data from damaged bzipped files.</para>
   </listitem>
   </varlistentry>
   
  @@ -143,7 +143,7 @@
   <term><command>bzless</command></term>
   <listitem>
   <indexterm zone="ch-system-bzip2 bzless"><primary sortas="b-bzless">bzless</primary></indexterm>
  -<para>runs less on bzipped files.</para>
  +<para>runs <command>less</command> on bzipped files.</para>
   </listitem>
   </varlistentry>
   
  @@ -151,7 +151,7 @@
   <term><command>bzmore</command></term>
   <listitem>
   <indexterm zone="ch-system-bzip2 bzmore"><primary sortas="b-bzmore">bzmore</primary></indexterm>
  -<para>runs more on bzipped files.</para>
  +<para>runs <command>more</command> on bzipped files.</para>
   </listitem>
   </varlistentry>
   
  
  
  
  1.20      +1 -1      LFS/BOOK/chapter06/changingowner.xml
  
  Index: changingowner.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/changingowner.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- changingowner.xml	3 May 2004 10:59:41 -0000	1.19
  +++ changingowner.xml	13 Jun 2004 12:58:23 -0000	1.20
  @@ -29,7 +29,7 @@
   
   <screen><userinput>chown -R 0:0 /tools</userinput></screen>
   
  -<para>The command uses <quote>0:0</quote> instead of <quote>root:root</quote>,
  +<para>The command uses <parameter>0:0</parameter> instead of <parameter>root:root</parameter>,
   because <userinput>chown</userinput> is unable to resolve the name
   <quote>root</quote> until the password file has been created.</para>
   
  
  
  
  1.85      +1 -46     LFS/BOOK/chapter06/chapter06.xml
  
  Index: chapter06.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/chapter06.xml,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- chapter06.xml	10 Jun 2004 11:10:55 -0000	1.84
  +++ chapter06.xml	13 Jun 2004 12:58:23 -0000	1.85
  @@ -68,52 +68,7 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="udev.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutdebug.xml"/>
  -
  -<sect1 id="ch-system-strippingagain">
  -<title>Stripping again</title>
  -<?dbhtml filename="strippingagain.html"?>
  -
  -<para>If you are not a programmer and don't plan to do any debugging on your
  -system software, you can shrink your system by about 200 MB by removing the
  -debugging symbols from binaries and libraries. This causes no inconvenience
  -other than not being able to debug the software fully any more.</para>
  -
  -<para>Most people who use the command mentioned below don't experience any
  -problems. But it is easy to make a typo and render your new system unusable, so
  -before running the strip command it is probably a good idea to make a backup of
  -the current situation.</para>
  -
  -<para>If you are going to perform the stripping, special care is needed to
  -ensure you're not running any of the binaries that are about to be stripped.
  -If you're not sure whether you entered chroot with the command given in
  -<xref linkend="ch-system-chroot"/>, then first exit from chroot:</para>
  -
  -<screen><userinput>logout</userinput></screen>
  -
  -<para>Then reenter it with:</para>
  -
  -<screen><userinput>chroot $LFS /tools/bin/env -i \
  -    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
  -    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
  -    /tools/bin/bash --login</userinput></screen>
  -
  -<para>Now you can safely strip the binaries and libraries:</para>
  -
  -<screen><userinput>/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
  -   -exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen>
  -
  -<para>A large number of files will be reported as having their file format not
  -recognized. These warnings can be safely ignored, they just mean that those
  -files are scripts instead of binaries, no harm is done.</para>
  -
  -<para>If you are really tight on disk space, you may want to use
  -<emphasis>--strip-all</emphasis> on the binaries in
  -<filename>/{,usr/}{bin,sbin}</filename> to gain several more megabytes. But do
  -<emphasis>not</emphasis> use this option on libraries: they would be
  -destroyed.</para>
  -
  -</sect1>
  -
  +<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="strippingagain.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="revisedchroot.xml"/>
   
   </chapter>
  
  
  
  1.47      +7 -5      LFS/BOOK/chapter06/chroot.xml
  
  Index: chroot.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/chroot.xml,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- chroot.xml	3 May 2004 10:59:41 -0000	1.46
  +++ chroot.xml	13 Jun 2004 12:58:23 -0000	1.47
  @@ -17,10 +17,10 @@
       PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
       /tools/bin/bash --login +h</userinput></screen>
   
  -<para>The <emphasis>-i</emphasis> option given to the
  +<para>The <parameter>-i</parameter> option given to the
   <command>env</command> command will clear all variables of the chroot
   environment. After that, only the HOME, TERM, PS1 and PATH variables are
  -set again. The TERM=$TERM construct will set the TERM variable inside chroot
  +set again. The <parameter>TERM=$TERM</parameter> construct will set the TERM variable inside chroot
   to the same value as outside chroot; this variable is needed for programs
   like <command>vim</command> and <command>less</command> to operate
   properly. If you need other variables present, such as CFLAGS or CXXFLAGS,
  @@ -36,17 +36,19 @@
   last in the PATH. This means that a temporary tool will not be used any more
   as soon as its final version is installed. Well, at least when the shell
   doesn't remember the locations of executed binaries -- for this reason hashing
  -is switched off by passing the <emphasis>+h</emphasis> option to
  +is switched off by passing the <parameter>+h</parameter> option to
   <command>bash</command>.</para>
   
   <para>You have to make sure all the commands in the rest of this chapter and
   in the following chapters are run from within the chroot environment.
   If you ever leave this environment for any reason (rebooting for example),
  -you must remember to first mount the proc and devpts file systems (discussed
  +you must remember to first mount the <systemitem class="filesystem">proc</systemitem>
  +and <systemitem class="filesystem">devpts</systemitem> file systems (discussed
   in the previous section) <emphasis>and</emphasis> enter chroot again before
   continuing with the installations.</para>
   
  -<para>Note that the bash prompt will say <quote>I have no name!</quote> This is
  +<para>Note that the <command>bash</command> prompt will say 
  +<computeroutput>I have no name!</computeroutput> This is
   normal, as the <filename>/etc/passwd</filename> file has not been created yet.
   </para>
   
  
  
  
  1.28      +8 -8      LFS/BOOK/chapter06/coreutils.xml
  
  Index: coreutils.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/coreutils.xml,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- coreutils.xml	7 Jun 2004 18:52:47 -0000	1.27
  +++ coreutils.xml	13 Jun 2004 12:58:23 -0000	1.28
  @@ -30,8 +30,8 @@
   <title>Installation of Coreutils</title>
   
   <para>Normally the functionality of <command>uname</command> is somewhat
  -broken, in that the <emphasis>-p</emphasis> switch always returns
  -<quote>unknown</quote>.  The following patch fixes this behavior for Intel
  +broken, in that the <parameter>-p</parameter> switch always returns
  +<computeroutput>unknown</computeroutput>.  The following patch fixes this behavior for Intel
   architectures:</para>
   
   <screen><userinput>patch -Np1 -i ../coreutils-&coreutils-version;-uname-2.patch</userinput></screen>
  @@ -160,7 +160,7 @@
   <listitem>
   <indexterm zone="ch-system-coreutils chroot"><primary sortas="b-chroot">chroot</primary></indexterm>
   <para>runs a given command with the specified directory as the 
  -<filename>/</filename> directory. The given command can be an interactive shell. 
  +<filename class="directory">/</filename> directory. The given command can be an interactive shell.
   On most systems only <emphasis>root</emphasis> can do this.</para>
   </listitem>
   </varlistentry>
  @@ -241,7 +241,7 @@
   <term><command>dir</command></term>
   <listitem>
   <indexterm zone="ch-system-coreutils dir"><primary sortas="b-dir">dir</primary></indexterm>
  -<para>is the same as ls.</para>
  +<para>is the same as <command>ls</command>.</para>
   </listitem>
   </varlistentry>
   
  @@ -250,7 +250,7 @@
   <listitem>
   <indexterm zone="ch-system-coreutils dircolors"><primary sortas="b-dircolors">dircolors</primary></indexterm>
   <para>outputs commands to set the LS_COLOR
  -environment variable, to change the color scheme used by ls.</para>
  +environment variable, to change the color scheme used by <command>ls</command>.</para>
   </listitem>
   </varlistentry>
   
  @@ -448,7 +448,7 @@
   <term><command>mkfifo</command></term>
   <listitem>
   <indexterm zone="ch-system-coreutils mkfifo"><primary sortas="b-mkfifo">mkfifo</primary></indexterm>
  -<para>creates FIFOs (First-In, First-Out, a "named pipe" in UNIX parlance) with 
  +<para>creates FIFOs (First-In, First-Out, a <quote>named pipe</quote> in UNIX parlance) with
   the given names.</para>
   </listitem>
   </varlistentry>
  @@ -808,7 +808,7 @@
   <term><command>vdir</command></term>
   <listitem>
   <indexterm zone="ch-system-coreutils vdir"><primary sortas="b-vdir">vdir</primary></indexterm>
  -<para>is the same as ls -l.</para>
  +<para>is the same as <command>ls -l</command>.</para>
   </listitem>
   </varlistentry>
   
  @@ -841,7 +841,7 @@
   <term><command>yes</command></term>
   <listitem>
   <indexterm zone="ch-system-coreutils yes"><primary sortas="b-yes">yes</primary></indexterm>
  -<para>outputs 'y' or a given string repeatedly, until killed.</para>
  +<para>outputs <quote>y</quote> or a given string repeatedly, until killed.</para>
   </listitem>
   </varlistentry>
   </variablelist>
  
  
  
  1.2       +8 -5      LFS/BOOK/chapter06/devices.xml
  
  Index: devices.xml
  ===================================================================
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/devices.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- devices.xml	3 May 2004 21:28:57 -0000	1.1
  +++ devices.xml	13 Jun 2004 12:58:23 -0000	1.2
  @@ -7,13 +7,14 @@
   <title>Populating /dev with device nodes</title>
   <?dbhtml filename="devices.html"?>
   
  -<indexterm zone="ch-system-devices"><primary sortas="a-Devices">Devices</primary></indexterm>
  +<indexterm zone="ch-system-devices"><primary sortas="e-Devices">Devices</primary></indexterm>
   
   <sect2>
   <title>Creating initial device nodes</title>
   
   <para>When the kernel boots the system, it requires the presence of a few device
  -nodes, in particular the console and null devices:</para>
  +nodes, in particular the <filename class="devicefile">console</filename> and
  +<filename class="devicefile">null</filename> devices:</para>
   
   <screen><userinput>mknod -m 600 /dev/console c 5 1
   mknod -m 666 /dev/null c 1 3</userinput></screen>
  @@ -22,15 +23,17 @@
   <sect2>
   <title>Mounting ramfs and populating /dev</title>
   
  -<para>The ideal way to populate /dev is to mount a ramfs onto /dev (like tmpfs, but it
  +<para>The ideal way to populate <filename class="directory">/dev</filename> is
  +to mount a <systemitem class="filesystem">ramfs</systemitem> onto <filename class="directory">/dev </filename>
  +like <systemitem class="filesystem">tmpfs</systemitem>, but it
   cannot be swapped) and create the devices on there during each bootup.  Since we haven't
   booted the system, we have to do what the bootscripts would otherwise do for us, and
  -populate /dev ourselves.  Begin by mounting /dev:</para>
  +populate <filename class="directory">/dev</filename> ourselves.  Begin by mounting <filename class="directory">/dev</filename>:</para>
   
   <screen><userinput>mount -n -t ramfs none /dev</userinput></screen>
   
   <para>Now use the provided udevstart utility to create the initial devices based on
  -all the information in /sys:</para>
  +all the information in <filename class="directory">/sys</filename>:</para>
   
   <screen><userinput>/tools/sbin/udevstart</userinput></screen>
   
  
  
  
  1.1                  LFS/BOOK/chapter06/strippingagain.xml
  
  Index: strippingagain.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
  <sect1 id="ch-system-strippingagain">
  <title>Stripping again</title>
  <?dbhtml filename="strippingagain.html"?>
  
  <para>If you are not a programmer and don't plan to do any debugging on your
  system software, you can shrink your system by about 200 MB by removing the
  debugging symbols from binaries and libraries. This causes no inconvenience
  other than not being able to debug the software fully any more.</para>
  
  <para>Most people who use the command mentioned below don't experience any
  problems. But it is easy to make a typo and render your new system unusable, so
  before running the strip command it is probably a good idea to make a backup of
  the current situation.</para>
  
  <para>If you are going to perform the stripping, special care is needed to
  ensure you're not running any of the binaries that are about to be stripped.
  If you're not sure whether you entered chroot with the command given in
  <xref linkend="ch-system-chroot"/>, then first exit from chroot:</para>
  
  <screen><userinput>logout</userinput></screen>
  
  <para>Then reenter it with:</para>
  
  <screen><userinput>chroot $LFS /tools/bin/env -i \
      HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
      PATH=/bin:/usr/bin:/sbin:/usr/sbin \
      /tools/bin/bash --login</userinput></screen>
  
  <para>Now you can safely strip the binaries and libraries:</para>
  
  <screen><userinput>/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
     -exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen>
  
  <para>A large number of files will be reported as having their file format not
  recognized. These warnings can be safely ignored, they just mean that those
  files are scripts instead of binaries, no harm is done.</para>
  
  <para>If you are really tight on disk space, you may want to use
  <parameter>--strip-all</parameter> on the binaries in
  <filename class="directory">/{,usr/}{bin,sbin}</filename> to gain several more megabytes. But do
  <emphasis>not</emphasis> use this option on libraries: they would be
  destroyed.</para>
  
  </sect1>
  
  
  
  



More information about the lfs-book mailing list