Files
master/chapter06/revisedchroot.html
2015-05-23 18:50:06 +08:00

132 lines
4.7 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content=
"application/xhtml+xml; charset=utf-8" />
<title>
6.72.&nbsp;Cleaning Up
</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
<link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css"
media="print" />
</head>
<body class="lfs" id="lfs-7.7-systemd">
<div class="navheader">
<h4>
Linux From Scratch - Version 7.7-systemd
</h4>
<h3>
Chapter&nbsp;6.&nbsp;Installing Basic System Software
</h3>
<ul>
<li class="prev">
<a accesskey="p" href="strippingagain.html" title=
"Stripping Again">Prev</a>
<p>
Stripping Again
</p>
</li>
<li class="next">
<a accesskey="n" href="../chapter07/chapter07.html" title=
"Basic System Configuration">Next</a>
<p>
Basic System Configuration
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter06.html" title=
"Chapter&nbsp;6.&nbsp;Installing Basic System Software">Up</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 7.7-systemd">Home</a>
</li>
</ul>
</div>
<div class="sect1" lang="en" xml:lang="en">
<h1 class="sect1">
<a id="ch-system-revisedchroot" name=
"ch-system-revisedchroot"></a>6.72. Cleaning Up
</h1>
<p>
Finally, clean up some extra files left around from running tests:
</p>
<pre class="userinput">
<kbd class="command">rm -rf /tmp/*</kbd>
</pre>
<p>
From now on, when reentering the chroot environment after exiting,
use the following modified chroot command:
</p>
<pre class="userinput">
<kbd class="command">chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login</kbd>
</pre>
<p>
The reason for this is that the programs in <code class=
"filename">/tools</code> are no longer needed. Since they are no
longer needed you can delete the <code class="filename">/tools</code>
directory if so desired.
</p>
<div class="admon note">
<img alt="[Note]" src="../images/note.png" />
<h3>
Note
</h3>
<p>
Removing <code class="filename">/tools</code> will also remove the
temporary copies of Tcl, Expect, and DejaGNU which were used for
running the toolchain tests. If you need these programs later on,
they will need to be recompiled and re-installed. The BLFS book has
instructions for this (see <a class="ulink" href=
"http://www.linuxfromscratch.org/blfs/">http://www.linuxfromscratch.org/blfs/</a>).
</p>
</div>
<pre class="userinput">
<kbd class="command">rm -rf /tools</kbd>
</pre>
<p>
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 <a class="xref" href="kernfs.html#ch-system-bindmount"
title="6.2.2.&nbsp;Mounting and Populating /dev">Section&nbsp;6.2.2,
&ldquo;Mounting and Populating /dev&rdquo;</a> and <a class="xref"
href="kernfs.html#ch-system-kernfsmount" title=
"6.2.3.&nbsp;Mounting Virtual Kernel File Systems">Section&nbsp;6.2.3,
&ldquo;Mounting Virtual Kernel File Systems&rdquo;</a>.
</p>
</div>
<div class="navfooter">
<ul>
<li class="prev">
<a accesskey="p" href="strippingagain.html" title=
"Stripping Again">Prev</a>
<p>
Stripping Again
</p>
</li>
<li class="next">
<a accesskey="n" href="../chapter07/chapter07.html" title=
"Basic System Configuration">Next</a>
<p>
Basic System Configuration
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter06.html" title=
"Chapter&nbsp;6.&nbsp;Installing Basic System Software">Up</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 7.7-systemd">Home</a>
</li>
</ul>
</div>
</body>
</html>