mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-06 06:14:47 +00:00
Moving Mounting proc to before Chroot, dropping Util-linux, adding an arch script to Perl.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3220 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
4248b0ec14
commit
fe5b13b40b
@ -62,6 +62,10 @@
|
|||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
<listitem><para>February 4th, 2004 [alex]: Chapters 5 + 6 - Moved the Mounting
|
||||||
|
of proc and devpts to before Chrooting, dropped Util-linux from the tools, and
|
||||||
|
added a little arch script for Perl.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>February 1st, 2004 [gerard]: LFS-5.1-PRE1
|
<listitem><para>February 1st, 2004 [gerard]: LFS-5.1-PRE1
|
||||||
release.</para></listitem>
|
release.</para></listitem>
|
||||||
|
|
||||||
|
@ -568,7 +568,6 @@ can now be used to build the rest of the temporary tools.</para>
|
|||||||
&c5-tar;
|
&c5-tar;
|
||||||
&c5-texinfo;
|
&c5-texinfo;
|
||||||
&c5-bash;
|
&c5-bash;
|
||||||
&c5-utillinux;
|
|
||||||
&c5-perl;
|
&c5-perl;
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ through to completion and not stop at the first failure. The GCC test suite is
|
|||||||
very comprehensive and is almost guaranteed to generate a few failures. To get
|
very comprehensive and is almost guaranteed to generate a few failures. To get
|
||||||
a summary of the test suite results, run this:</para>
|
a summary of the test suite results, run this:</para>
|
||||||
|
|
||||||
<screen><userinput>../&gcc-dir;/contrib/test_summary | more</userinput></screen>
|
<screen><userinput>../&gcc-dir;/contrib/test_summary | grep -A7 Summ</userinput></screen>
|
||||||
|
|
||||||
<para>You can compare your results to those posted to the gcc-testresults
|
<para>You can compare your results to those posted to the gcc-testresults
|
||||||
mailing list for similar configurations to your own. For an example of how
|
mailing list for similar configurations to your own. For an example of how
|
||||||
|
@ -17,7 +17,13 @@
|
|||||||
|
|
||||||
<screen><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen>
|
<screen><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen>
|
||||||
|
|
||||||
<para>Now prepare Perl for compilation (make sure to get the 'IO Fcntl'
|
<para>Perl insists on using the <command>arch</command> program to find out
|
||||||
|
the machine type. Create a little script to mimick this command:</para>
|
||||||
|
|
||||||
|
<screen><userinput>echo "uname -m" > /tools/bin/arch
|
||||||
|
chmod 755 /tools/bin/arch</userinput></screen>
|
||||||
|
|
||||||
|
<para>Now prepare Perl for compilation (make sure you get the 'IO Fcntl'
|
||||||
right, they are all letters):</para>
|
right, they are all letters):</para>
|
||||||
|
|
||||||
<screen><userinput>./configure.gnu --prefix=/tools -Dstatic_ext='IO Fcntl'</userinput></screen>
|
<screen><userinput>./configure.gnu --prefix=/tools -Dstatic_ext='IO Fcntl'</userinput></screen>
|
||||||
|
@ -60,23 +60,22 @@ with a series of short descriptions of these.</para>
|
|||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
&c6-mountproc;
|
||||||
|
|
||||||
<sect1 id="ch-system-chroot">
|
<sect1 id="ch-system-chroot">
|
||||||
<title>Entering the chroot environment</title>
|
<title>Entering the chroot environment</title>
|
||||||
<?dbhtml filename="chroot.html" dir="chapter06"?>
|
<?dbhtml filename="chroot.html" dir="chapter06"?>
|
||||||
|
|
||||||
<para>It is time to enter the chroot environment in order to begin installing
|
<para>It is time to enter the chroot environment in order to begin building
|
||||||
the packages we need. Before you can chroot, however, you need to become
|
and installing your final LFS system.</para>
|
||||||
<emphasis>root</emphasis>, since only <emphasis>root</emphasis>
|
|
||||||
can execute the <command>chroot</command> command.</para>
|
|
||||||
|
|
||||||
<para>Just like earlier, ensure the LFS environment variable is set up properly
|
<para>First check, just like earlier, that the LFS environment variable is set
|
||||||
by running <userinput>echo $LFS</userinput> and ensuring it shows the path to
|
up properly by running <userinput>echo $LFS</userinput> and making sure it
|
||||||
your LFS partition's mount point, which is
|
shows the path to your LFS partition's mount point, which is
|
||||||
<filename class="directory">/mnt/lfs</filename> if you followed our example.</para>
|
<filename class="directory">/mnt/lfs</filename> if you followed our example.</para>
|
||||||
|
|
||||||
<para>Become <emphasis>root</emphasis> and run the following command
|
<para>As <emphasis>root</emphasis>, run the following command to enter the
|
||||||
to enter the chroot environment:</para>
|
chroot environment:</para>
|
||||||
|
|
||||||
<screen><userinput>chroot $LFS /tools/bin/env -i \
|
<screen><userinput>chroot $LFS /tools/bin/env -i \
|
||||||
HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
||||||
@ -108,12 +107,12 @@ is switched off by passing the <emphasis>+h</emphasis> option to
|
|||||||
<para>You have to make sure all the commands in the rest of this chapter and
|
<para>You have to make sure all the commands in the rest of this chapter and
|
||||||
in the following chapters are run from within the chroot environment.
|
in the following chapters are run from within the chroot environment.
|
||||||
If you ever leave this environment for any reason (rebooting for example),
|
If you ever leave this environment for any reason (rebooting for example),
|
||||||
you must remember to again enter chroot and mount the proc and devpts
|
you must remember to first mount the proc and devpts file systems (discussed
|
||||||
file systems (discussed later) before continuing with the installations.</para>
|
in the previous section) <emphasis>and</emphasis> enter chroot again before
|
||||||
|
continuing with the installations.</para>
|
||||||
|
|
||||||
<para>Note that the bash prompt will say "I have no name!" This is
|
<para>Note that the bash prompt will say "I have no name!" This is normal, as
|
||||||
normal, as the <filename>/etc/passwd</filename> file has not been
|
the <filename>/etc/passwd</filename> file has not been created yet.</para>
|
||||||
created yet.</para>
|
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
@ -209,9 +208,6 @@ isn't precise, so we created here the directories that we think are needed.</par
|
|||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
|
||||||
&c6-mountproc;
|
|
||||||
|
|
||||||
|
|
||||||
<sect1 id="ch-system-createfiles">
|
<sect1 id="ch-system-createfiles">
|
||||||
<title>Creating essential symlinks</title>
|
<title>Creating essential symlinks</title>
|
||||||
<?dbhtml filename="createfiles.html" dir="chapter06"?>
|
<?dbhtml filename="createfiles.html" dir="chapter06"?>
|
||||||
|
@ -6,29 +6,19 @@
|
|||||||
<emphasis>proc</emphasis> and <emphasis>devpts</emphasis> file systems must be
|
<emphasis>proc</emphasis> and <emphasis>devpts</emphasis> file systems must be
|
||||||
available within the chroot environment. Since kernel version 2.4 a file system
|
available within the chroot environment. Since kernel version 2.4 a file system
|
||||||
can be mounted as many times and in as many places as you like, thus it's not a
|
can be mounted as many times and in as many places as you like, thus it's not a
|
||||||
problem that these file systems are already mounted on your host system --
|
problem that these file systems are already mounted on your host system,
|
||||||
especially so because they are virtual file systems.</para>
|
especially so because they are virtual file systems.</para>
|
||||||
|
|
||||||
|
<para>First you need to become <emphasis>root</emphasis>, since probably only
|
||||||
|
<emphasis>root</emphasis> can mount these file systems.</para>
|
||||||
|
|
||||||
<para>The <emphasis>proc</emphasis> file system is the process information
|
<para>The <emphasis>proc</emphasis> file system is the process information
|
||||||
pseudo file system through which the kernel provides information about the
|
pseudo file system through which the kernel provides information about the
|
||||||
status of the system.</para>
|
status of the system. Mount it on <filename class="directory">/proc</filename>
|
||||||
|
with:</para>
|
||||||
<para>The proc file system is mounted on
|
|
||||||
<filename class="directory">/proc</filename> by running the following
|
|
||||||
command:</para>
|
|
||||||
|
|
||||||
<screen><userinput>mount proc /proc -t proc</userinput></screen>
|
<screen><userinput>mount proc /proc -t proc</userinput></screen>
|
||||||
|
|
||||||
<para>You might get warning messages from the mount command, such as
|
|
||||||
these:</para>
|
|
||||||
|
|
||||||
<blockquote><screen>warning: can't open /etc/fstab: No such file or directory
|
|
||||||
not enough memory</screen></blockquote>
|
|
||||||
|
|
||||||
<para>Ignore these, they're just due to the fact that the system
|
|
||||||
isn't installed completely yet and some files are missing. The mount itself
|
|
||||||
will be successful and that's all we care about at this point.</para>
|
|
||||||
|
|
||||||
<para>The <emphasis>devpts</emphasis> file system was mentioned earlier and is
|
<para>The <emphasis>devpts</emphasis> file system was mentioned earlier and is
|
||||||
now the most common way for pseudo terminals (PTYs) to be implemented.</para>
|
now the most common way for pseudo terminals (PTYs) to be implemented.</para>
|
||||||
|
|
||||||
@ -54,8 +44,8 @@ environment. We'll cover this shortly in the aforementioned
|
|||||||
<xref linkend="ch-system-MAKEDEV"/> section.</para>
|
<xref linkend="ch-system-MAKEDEV"/> section.</para>
|
||||||
|
|
||||||
<para>Remember, if for any reason you stop working on your LFS, and start again
|
<para>Remember, if for any reason you stop working on your LFS, and start again
|
||||||
later, it's important to check that these file systems are still mounted inside
|
later, it's important to check that these file systems are mounted again before
|
||||||
the chroot environment, otherwise problems are likely to occur.</para>
|
entering the chroot environment, otherwise some problems could occur.</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user