Files
lfs-notes/ch4.html
2014-03-10 08:16:08 -05:00

69 lines
3.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>LFS Install Notes</title>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<h1>Chapter 4 Final Preparations</h1>
</header>
<article>
<section class="intro">
<p>There are only a few small issues to deal with in this chapter. They
all occur in section 4.3 of the book. Other than the slight change in
one command, you should follow all the directions in the chapter.</p>
</section>
<section>
<h2>Section 4.3</h2>
<p>The book will have you create a special user called <em>lfs</em>
to build all of the stuff in chapter five. We need to store this user's
information onto the virtual hard drive rather than the in the CD's fake
filesystem. This way we will not need to reconfigure this user when we
reboot the system. To store this user onto the hard drive we need to
alter the <code>useradd</code> command a little bit. Use this
command instead:</p>
<pre class="cmd">useradd -s /bin/bash -g lfs -m -b $LFS/home -k /dev/null lfs</pre>
<p>You do not need to create a password of the <em>lfs</em> user. That
step is optional. If you create it be sure you will remember it
for later.</p>
</section>
<section>
<h2>Section 4.5</h2>
<p>At the bottom of the section you will see a yellow box with
information about setting parallel build make flags. If your VM has
Vt-x or AMD-V enabled, then be sure to carefully read this section.</p>
<p>Building in parallel can speed up the build process enormously. But
there is a price. First, you need to make sure that the number of cores
set here will not be used by the host system. Task switching is
expensive time wise, you need to minimize that. Second, some builds
must not be done in parallel! The book will warn you about it, you
will need to remember to reset the environment variable for those
packages. Finally, your SBU's may be way off, but generally the actual
compile time should be considerably smaller than the listed SBU.</p>
<p>If you have decided to use parallel building then copy this little
script into your system. The script works by appending to your
<span class="file">bashrc</span> file the number of processors
assigned to the VM.</p>
<pre class="cmd">
cat >> ~/.bashrc << "EOF"
export MAKEFLAGS="-j $(grep 'processor' /proc/cpuinfo | wc -l)"
EOF</pre>
<p>Now you need to make the setting take effect.</p>
<pre class="cmd">source ~/.bash_profile</pre>
</section>
</article>
<footer>
<a id="html" href="http://validator.w3.org/check?uri=referer"
target="_blank">[HTML 5]</a>
<a id="css" href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3"
target="_blank">[CSS 3]</a>
</footer>
</body>
</html>