|
@@ -19,12 +19,12 @@
|
|
|
<para>
|
|
|
The following steps are performed from outside the chroot
|
|
|
environment. That means, you have to leave the chroot environment
|
|
|
- first before continuing. The reason for that is to
|
|
|
+ first before continuing. The reason for that is to:
|
|
|
<itemizedlist>
|
|
|
<listitem>
|
|
|
<para>
|
|
|
- make sure that objects are not in use while they gets
|
|
|
- manipulated.
|
|
|
+ make sure that objects are not in use while they are
|
|
|
+ manipulated.
|
|
|
</para>
|
|
|
</listitem>
|
|
|
<listitem>
|
|
@@ -44,10 +44,6 @@
|
|
|
systems:
|
|
|
</para>
|
|
|
|
|
|
-<screen role="nodump"><userinput>exit
|
|
|
-umount $LFS/dev{/pts,}
|
|
|
-umount $LFS/{sys,proc,run}</userinput></screen>
|
|
|
-
|
|
|
<note>
|
|
|
<para>All of the following instructions are executed by
|
|
|
<systemitem class="username">root</systemitem>. Take extra
|
|
@@ -63,12 +59,16 @@ umount $LFS/{sys,proc,run}</userinput></screen>
|
|
|
</para>
|
|
|
</note>
|
|
|
|
|
|
+<screen role="nodump"><userinput>exit
|
|
|
+umount $LFS/dev{/pts,}
|
|
|
+umount $LFS/{sys,proc,run}</userinput></screen>
|
|
|
+
|
|
|
<sect2>
|
|
|
<title>Stripping</title>
|
|
|
|
|
|
- <para>If the LFS partition is rather small, it is beneficial to
|
|
|
- learn that unnecessary items can be removed. The executables and
|
|
|
- libraries built so far contain about 94 MB of unneeded debugging
|
|
|
+ <para>If the LFS partition is rather small, it is good to
|
|
|
+ know that unnecessary items can be removed. The executables and
|
|
|
+ libraries built so far contain a little over 90 MB of unneeded debugging
|
|
|
symbols.</para>
|
|
|
|
|
|
<para>Strip off debugging symbols from binaries:</para>
|
|
@@ -87,7 +87,7 @@ strip --strip-unneeded $LFS/tools/bin/*</userinput></screen>
|
|
|
ones would be destroyed and the toolchain packages would need to be
|
|
|
built all over again.</para>
|
|
|
|
|
|
- <para>To save more space (about 37 MB), remove the documentation:</para>
|
|
|
+ <para>To save more space (slightly more than 35 MB), remove the documentation:</para>
|
|
|
|
|
|
<screen role="nodump"><userinput>rm -rf $LFS/usr/share/{info,man,doc}</userinput></screen>
|
|
|
|
|
@@ -99,10 +99,10 @@ strip --strip-unneeded $LFS/tools/bin/*</userinput></screen>
|
|
|
<screen role="nodump"><userinput>find $LFS/usr/{lib,libexec} -name \*.la -delete</userinput></screen>
|
|
|
|
|
|
<para>At this point, you should have at least 5 GB of free space on the
|
|
|
- chroot partition that can be used to build and install Glibc and Gcc in
|
|
|
+ chroot partition that can be used to build and install Glibc and GCC in
|
|
|
the next phase. If you can build and install Glibc, you can build and install
|
|
|
the rest too. You can check the free disk space with the command
|
|
|
- <command>df -h $LFS/</command>.</para>
|
|
|
+ <command>df -h $LFS</command>.</para>
|
|
|
|
|
|
</sect2>
|
|
|
|
|
@@ -129,13 +129,19 @@ strip --strip-unneeded $LFS/tools/bin/*</userinput></screen>
|
|
|
<para>
|
|
|
Create the backup archive by running the following command:
|
|
|
</para>
|
|
|
-<screen role="nodump"><userinput>cd $LFS &&
|
|
|
-tar -cJpf $HOME/temp-tools.tar.xz .
|
|
|
+
|
|
|
+<screen role="nodump" revision="sysv"><userinput>cd $LFS &&
|
|
|
+tar -cJpf $HOME/lfs-temp-tools-&version;.tar.xz .
|
|
|
+</userinput></screen>
|
|
|
+
|
|
|
+<screen role="nodump" revision="systemd"><userinput>cd $LFS &&
|
|
|
+tar -cJpf $HOME/lfs-temp-tools-&versiond;.tar.xz .
|
|
|
</userinput></screen>
|
|
|
+
|
|
|
<para>
|
|
|
Replace <envar>$HOME</envar> by a directory of your choice if you
|
|
|
- do not want to have the backup stored in <systemitem class="username">root</systemitem>'s
|
|
|
- home directory.
|
|
|
+ do not want to have the backup stored in <systemitem
|
|
|
+ class="username">root</systemitem>'s home directory.
|
|
|
</para>
|
|
|
|
|
|
<para>
|
|
@@ -143,14 +149,19 @@ tar -cJpf $HOME/temp-tools.tar.xz .
|
|
|
use this backup to restore the temporary tools and save some recovery time.
|
|
|
Since the sources are located under
|
|
|
<filename class="directory">$LFS</filename>, they are included in the
|
|
|
- backup archive as well, so you need not to download them again. After
|
|
|
+ backup archive as well, so they do not need to be downloaded again. After
|
|
|
checking that <filename class="directory">$LFS</filename> is set properly,
|
|
|
restore the backup by executing the following commands:
|
|
|
</para>
|
|
|
|
|
|
-<screen role="nodump"><userinput>cd $LFS &&
|
|
|
+<screen role="nodump" revision="sysv"><userinput>cd $LFS &&
|
|
|
+rm -rf ./* &&
|
|
|
+tar -xpf $HOME/lfs-temp-tools-&version;.tar.xz
|
|
|
+</userinput></screen>
|
|
|
+
|
|
|
+<screen role="nodump" revision="systemd"><userinput>cd $LFS &&
|
|
|
rm -rf ./* &&
|
|
|
-tar -xpf $HOME/temp-tools.tar.xz
|
|
|
+tar -xpf $HOME/lfs-temp-tools-&versiond;.tar.xz
|
|
|
</userinput></screen>
|
|
|
|
|
|
<para>
|