Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/cleanup.xml

    r9ee05b53 r615f5b8  
    1010
    1111  <title>Cleaning up and Saving the Temporary System</title>
    12 
     12 
    1313  <sect2>
    1414    <title>Cleaning</title>
     
    2121    <para>Second, the libtool .la files are only useful when linking with static
    2222    libraries. They are unneeded and potentially harmful when using dynamic
    23     shared libraries, especially when using non-autotools build systems.
     23    shared libraries, specially when using non-autotools build systems.
    2424    While still in chroot, remove those files now:</para>
    2525
     
    2727
    2828    <para>
    29       The current system size is now about 3 GB, however
     29      The current system size is now about 3 GB, however 
    3030      the /tools directory is no longer needed. It uses about
    3131      1 GB of disk space.  Delete it now:
     
    3838    <title>Backup</title>
    3939
    40     <para>
    41       At this point the essential programs and libraries have been created
    42       and your current LFS system is in a good state. Your system can now be
    43       backed up for later reuse. In case of fatal failures in the subsequent
    44       chapters, it often turns out that removing everything and starting over
    45       (more carefully) is the best option to recover. Unfortunately, all the
    46       temporary files will be removed, too. To avoid spending extra time to
    47       redo something which has been built successfully, creating a backup of
    48       the current LFS system may prove useful.
    49     </para>
    50 
    5140    <note><para>
    5241      All the remaining steps in this section are optional. Nevertheless,
     
    5443      linkend="chapter-building-system"/>, the temporary files will be
    5544      overwritten. So it may be a good idea to do a backup of the current
    56       system as described below.
     45      system as described below. 
    5746    </para></note>
    58 
     47 
    5948    <para>
    6049      The following steps are performed from outside the chroot
     
    6857    </para>
    6958
     59    <important>
     60      <para>All of the following instructions are executed by
     61        <systemitem class="username">root</systemitem>. Take extra
     62        care about the commands you're going to run as mistakes
     63        here can modify your host system. Be aware that the
     64        environment variable <envar>LFS</envar>
     65        is set for user <systemitem class="username">lfs</systemitem> by default
     66        but may <emphasis>not</emphasis> be set for
     67        <systemitem class="username">root</systemitem>. Whenever
     68        commands are to be executed by <systemitem class="username">root</systemitem>,
     69        make sure you have set <envar>LFS</envar>.
     70        This has been discussed in <xref linkend='ch-partitioning-aboutlfs'/>.
     71      </para>
     72    </important>
     73
    7074    <para>
    71        If you have decided to make a backup, leave the chroot environment:
     75       Now, if you are making a backup, leave the chroot environment:
    7276    </para>
    7377
    7478<screen role="nodump"><userinput>exit</userinput></screen>
    7579
    76     <important>
    77       <para>
    78         All of the following instructions are executed by
    79         <systemitem class="username">root</systemitem> on your host system.
    80         Take extra care about the commands you're going to run as mistakes
    81         here can modify your host system. Be aware that the
    82         environment variable <envar>LFS</envar>
    83         is set for user <systemitem class="username">lfs</systemitem> by default
    84         but may <emphasis>not</emphasis> be set for
    85         <systemitem class="username">root</systemitem>.
    86      </para>
    87      <para>
    88         Whenever commands are to be executed by <systemitem class="username">root</systemitem>,
    89         make sure you have set <envar>LFS</envar>.
    90      </para>
    91      <para>
    92         This has been discussed in <xref linkend='ch-partitioning-aboutlfs'/>.
    93       </para>
    94     </important>
    95 
    96     <para>Before making a backup, unmount the virtual file systems:</para>
    97 
    98 <screen role="nodump"><userinput>umount $LFS/dev/pts
    99 umount $LFS/{sys,proc,run,dev}</userinput></screen>
     80    <para>
     81      At this point the essential programs and libraries have been created
     82      and your current system is in a good state. Your system can now be
     83      backed up for later reuse. In case of fatal failures in the subsequent
     84      chapters, it often turns out that removing everything and starting over
     85      (more carefully) is the best option to recover. Unfortunately, all the
     86      temporary files will be removed, too. To avoid spending extra time to
     87      redo something which has been built successfully, prepare a backup.
     88    </para>
    10089
    10190    <para>
    10291      Make sure you have at least 1 GB free disk space (the source tarballs
    103       will be included in the backup archive) on the filesystem containing
    104       directory where you create the backup archive.
     92      will be included in the backup archive) in the home directory of user
     93      <systemitem class="username">root</systemitem>.
    10594    </para>
    10695
    107     <para>
    108       Note that the instructions below specify the home directory of the host
    109       system's <systemitem class="username">root</systemitem> user, which is
    110       typically found on the root filesystem.
    111     </para>
     96    <para>Before we make a backup, unmount the virtual file systems:</para>
    11297
    113     <para>
    114       Replace <envar>$HOME</envar> by a directory of your choice if you
    115       do not want to have the backup stored in <systemitem
    116       class="username">root</systemitem>'s home directory.
    117     </para>
     98<screen role="nodump"><userinput>umount $LFS/dev{/pts,}
     99umount $LFS/{sys,proc,run}</userinput></screen>
    118100
    119101    <para>
     
    126108          long time (over 10 minutes) even on a resonably fast system.
    127109       </para>
     110       
     111       <para>
     112          Also, ensure the <envar>LFS</envar> environment variable is set
     113          for the root user.
     114       </para>
    128115    </note>
    129116
    130 <screen role="nodump" revision="sysv"><userinput>cd $LFS
     117<screen role="nodump"><userinput>cd $LFS
    131118tar -cJpf $HOME/lfs-temp-tools-&version;.tar.xz .</userinput></screen>
    132119
    133 <screen role="nodump" revision="systemd"><userinput>cd $LFS
    134 tar -cJpf $HOME/lfs-temp-tools-&versiond;.tar.xz .</userinput></screen>
    135 
     120    <para>
     121      Replace <envar>$HOME</envar> by a directory of your choice if you
     122      do not want to have the backup stored in <systemitem
     123      class="username">root</systemitem>'s home directory.
     124    </para>
    136125  </sect2>
    137126
     
    142131      In case some mistakes have been made and you need to start over, you can
    143132      use this backup to restore the system and save some recovery time.
    144       Since the sources are located under
     133      Since the sources are located under 
    145134      <filename class="directory">$LFS</filename>, they are included in the
    146135      backup archive as well, so they do not need to be downloaded again. After
     
    153142
    154143    <warning><para>The following commands are extremly dangerous.  If
    155     you run <command>rm -rf ./*</command> as the root user and you
    156     do not change to the $LFS directory or the <envar>LFS</envar>
    157     environment variable is not set for the root user, it will destroy
     144    you run <command>rm -rf ./*</command> as the root user and you 
     145    do not change to the $LFS directory or the <envar>LFS</envar> 
     146    environment variable is not set for the root user, it will destroy 
    158147    your entire host system.  YOU ARE WARNED.</para></warning>
    159148
    160 <screen role="nodump" revision="sysv"><computeroutput>cd $LFS
    161 rm -rf ./*
     149<screen role="nodump"><computeroutput>cd $LFS
     150rm -rf ./* 
    162151tar -xpf $HOME/lfs-temp-tools-&version;.tar.xz</computeroutput></screen>
    163 
    164 <screen role="nodump" revision="systemd"><computeroutput>cd $LFS
    165 rm -rf ./*
    166 tar -xpf $HOME/lfs-temp-tools-&versiond;.tar.xz</computeroutput></screen>
    167152
    168153    <para>
     
    181166       </para>
    182167    </important>
    183 
     168   
    184169  </sect2>
    185170
Note: See TracChangeset for help on using the changeset viewer.