2004-05-03 11:59:46 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-03-21 18:42:58 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-05-03 11:59:46 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2006-02-07 19:39:29 +00:00
|
|
|
|
2004-05-03 11:59:46 +01:00
|
|
|
<sect1 id="ch-system-revisedchroot">
|
2006-02-07 19:39:29 +00:00
|
|
|
<?dbhtml filename="revisedchroot.html"?>
|
|
|
|
|
|
|
|
<title>Cleaning Up</title>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2014-01-14 19:36:32 +00:00
|
|
|
<para>Finally, clean up some extra files left around from running tests:</para>
|
|
|
|
|
2014-01-20 01:18:30 +00:00
|
|
|
<screen><userinput>rm -rf /tmp/*</userinput></screen>
|
2014-01-14 19:36:32 +00:00
|
|
|
|
2018-05-07 16:45:11 +01:00
|
|
|
<para>Now log out and reenter the chroot environment with an updated
|
|
|
|
chroot command. From now on, use this updated chroot command any time
|
|
|
|
you need to reenter the chroot environment after exiting:</para>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2018-05-07 16:45:11 +01:00
|
|
|
<screen role="nodump"><userinput>logout
|
|
|
|
|
|
|
|
chroot "$LFS" /usr/bin/env -i \
|
2017-10-15 02:55:30 +01:00
|
|
|
HOME=/root TERM="$TERM" \
|
|
|
|
PS1='(lfs chroot) \u:\w\$ ' \
|
2021-05-12 05:24:11 +01:00
|
|
|
PATH=/usr/bin:/usr/sbin \
|
2004-05-03 11:59:46 +01:00
|
|
|
/bin/bash --login</userinput></screen>
|
|
|
|
|
2020-05-03 22:02:51 +01:00
|
|
|
<para>Here the <parameter>+h</parameter> option is not used anymore, since
|
|
|
|
all the previous programs have been replaced: hashing is therefore
|
|
|
|
possible.</para>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-07-21 23:15:49 +01:00
|
|
|
<para>If the virtual kernel file systems have been unmounted, either manually
|
|
|
|
or through a reboot, ensure that the virtual kernel file systems are mounted
|
|
|
|
when reentering the chroot. This process was explained in <xref
|
2020-06-22 21:51:45 +01:00
|
|
|
linkend="ch-tools-bindmount"/> and <xref
|
|
|
|
linkend="ch-tools-kernfsmount"/>.</para>
|
2006-07-21 20:34:23 +01:00
|
|
|
|
2018-04-11 22:37:07 +01:00
|
|
|
<para>There are also several files installed in the /usr/lib and /usr/libexec
|
2020-08-19 16:31:33 +01:00
|
|
|
directories with a file name extension of .la. These are "libtool archive"
|
2020-04-19 09:14:10 +01:00
|
|
|
files. As already said, they are only useful when linking with static
|
|
|
|
libraries. They are unneeded, and potentially harmful, when using dynamic
|
|
|
|
shared libraries, specially when using also non-autotools build systems.
|
|
|
|
To remove them, run:</para>
|
2017-12-19 19:59:24 +00:00
|
|
|
|
2018-04-11 22:37:07 +01:00
|
|
|
<screen><userinput>find /usr/lib /usr/libexec -name \*.la -delete</userinput></screen>
|
2017-12-19 19:59:24 +00:00
|
|
|
|
2018-01-10 18:57:37 +00:00
|
|
|
<para>For more information about libtool archive files, see the <ulink
|
2017-12-19 19:59:24 +00:00
|
|
|
url="&blfs-book;/introduction/la-files.html">BLFS section "About Libtool
|
2018-01-10 18:57:37 +00:00
|
|
|
Archive (.la) files"</ulink>.</para>
|
2017-12-19 19:59:24 +00:00
|
|
|
|
2020-07-04 22:14:57 +01:00
|
|
|
<para>The compiler built in <xref linkend="chapter-temporary-tools"/> and
|
|
|
|
<xref linkend="chapter-chroot-temporary-tools"/> is still partially
|
2020-08-20 17:56:35 +01:00
|
|
|
installed and not needed anymore. Remove it with:</para>
|
2020-07-04 22:14:57 +01:00
|
|
|
|
2020-07-05 09:58:46 +01:00
|
|
|
<screen><userinput>find /usr -depth -name $(uname -m)-lfs-linux-gnu\* | xargs rm -rf</userinput></screen>
|
2020-07-04 22:14:57 +01:00
|
|
|
|
|
|
|
<para>The <filename class="directory">/tools</filename> directory can also
|
2021-01-16 07:59:34 +00:00
|
|
|
be removed to further gain some space:</para>
|
2020-07-04 22:14:57 +01:00
|
|
|
|
|
|
|
<screen><userinput>rm -rf /tools</userinput></screen>
|
|
|
|
|
2020-06-11 06:55:06 +01:00
|
|
|
<para>Finally, remove the temporary 'tester' user account created at the
|
|
|
|
beginning of the previous chapter.</para>
|
2020-05-30 19:22:47 +01:00
|
|
|
|
2020-06-11 06:55:06 +01:00
|
|
|
<screen><userinput>userdel -r tester</userinput></screen>
|
2004-05-03 11:59:46 +01:00
|
|
|
</sect1>
|