6.61. Cleaning Up

From now on, when reentering the chroot environment after exiting, use the following modified chroot command:

chroot "$LFS" /usr/bin/env -i \
    HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    /bin/bash --login

The reason for this is that, since the programs in /tools are no longer needed, the directory can be deleted to regain space. Before actually deleting the directory, exit from chroot and reenter it with the above command. Also, before removing /tools, tar it up and store it in a safe place in case another LFS system will be built.

[Note]

Note

Removing /tools will also remove the temporary copies of Tcl, Expect, and DejaGNU which were used for running the toolchain tests. To use these programs later on, they will need to be recompiled and re-installed. The installation instructions are the same as in Chapter 5, apart from changing the prefix from /tools to /usr. The BLFS book discusses a slightly different approach to installing Tcl (see http://www.linuxfromscratch.org/blfs/).

The packages and patches stored in /sources can also be moved to a more usual location, such as /usr/src/packages. The entire directory can also be deleted if its contents have been burned to a CD.