mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
Tweaked English idiom / clarified directiions in chapters 4.3 and 4.4.
This commit is contained in:
parent
2646c571d7
commit
ec7b046623
@ -14,9 +14,9 @@
|
|||||||
making a single mistake can damage or destroy a system. Therefore,
|
making a single mistake can damage or destroy a system. Therefore,
|
||||||
the packages in the next two chapters are built as an unprivileged user.
|
the packages in the next two chapters are built as an unprivileged user.
|
||||||
You could use your own user name, but to make it easier to set up a clean
|
You could use your own user name, but to make it easier to set up a clean
|
||||||
working environment, create a new user called <systemitem
|
working environment, we will create a new user called <systemitem
|
||||||
class="username">lfs</systemitem> as a member of a new group (also named
|
class="username">lfs</systemitem> as a member of a new group (also named
|
||||||
<systemitem class="groupname">lfs</systemitem>) and use this user during
|
<systemitem class="groupname">lfs</systemitem>) and log in as this user during
|
||||||
the installation process. As <systemitem class="username">root</systemitem>,
|
the installation process. As <systemitem class="username">root</systemitem>,
|
||||||
issue the following commands to add the new user:</para>
|
issue the following commands to add the new user:</para>
|
||||||
|
|
||||||
@ -24,7 +24,7 @@
|
|||||||
useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
|
useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<title>The meaning of the command line options:</title>
|
<title>This is what the command line options mean:</title>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>-s /bin/bash</parameter></term>
|
<term><parameter>-s /bin/bash</parameter></term>
|
||||||
@ -54,7 +54,7 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
|
|||||||
<term><parameter>-k /dev/null</parameter></term>
|
<term><parameter>-k /dev/null</parameter></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>This parameter prevents possible copying of files from a skeleton
|
<para>This parameter prevents possible copying of files from a skeleton
|
||||||
directory (default is <filename class="directory">/etc/skel</filename>)
|
directory (the default is <filename class="directory">/etc/skel</filename>)
|
||||||
by changing the input location to the special null device.</para>
|
by changing the input location to the special null device.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -68,7 +68,7 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
|
|||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>To log in as <systemitem class="username">lfs</systemitem> (as opposed
|
<para>To enable logging in as <systemitem class="username">lfs</systemitem> (as opposed
|
||||||
to switching to user <systemitem class="username">lfs</systemitem> when logged
|
to switching to user <systemitem class="username">lfs</systemitem> when logged
|
||||||
in as <systemitem class="username">root</systemitem>, which does not require
|
in as <systemitem class="username">root</systemitem>, which does not require
|
||||||
the <systemitem class="username">lfs</systemitem> user to have a password),
|
the <systemitem class="username">lfs</systemitem> user to have a password),
|
||||||
@ -77,16 +77,16 @@ useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
|
|||||||
<screen role="nodump"><userinput>passwd lfs</userinput></screen>
|
<screen role="nodump"><userinput>passwd lfs</userinput></screen>
|
||||||
|
|
||||||
<para>Grant <systemitem class="username">lfs</systemitem> full access to
|
<para>Grant <systemitem class="username">lfs</systemitem> full access to
|
||||||
all directories under <filename class="directory">$LFS</filename> by making
|
all the directories under <filename class="directory">$LFS</filename> by making
|
||||||
<systemitem class="username">lfs</systemitem> the directory owner:</para>
|
<systemitem class="username">lfs</systemitem> the owner:</para>
|
||||||
|
|
||||||
<screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}
|
<screen><userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}
|
||||||
case $(uname -m) in
|
case $(uname -m) in
|
||||||
x86_64) chown -v lfs $LFS/lib64 ;;
|
x86_64) chown -v lfs $LFS/lib64 ;;
|
||||||
esac</userinput></screen>
|
esac</userinput></screen>
|
||||||
|
|
||||||
<note><para>In some host systems, the following command does not complete
|
<note><para>In some host systems, the following <command>su</command> command does not complete
|
||||||
properly and suspends the login to the &lfs-user; user to the background.
|
properly and suspends the login for the &lfs-user; user to the background.
|
||||||
If the prompt "lfs:~$" does not appear immediately, entering the
|
If the prompt "lfs:~$" does not appear immediately, entering the
|
||||||
<command>fg</command> command will fix the issue.</para></note>
|
<command>fg</command> command will fix the issue.</para></note>
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ esac</userinput></screen>
|
|||||||
|
|
||||||
<para>The <quote><parameter>-</parameter></quote> instructs
|
<para>The <quote><parameter>-</parameter></quote> instructs
|
||||||
<command>su</command> to start a login shell as opposed to a non-login shell.
|
<command>su</command> to start a login shell as opposed to a non-login shell.
|
||||||
The difference between these two types of shells can be found in detail in
|
The difference between these two types of shells is described in detail in
|
||||||
<filename>bash(1)</filename> and <command>info bash</command>.</para>
|
<filename>bash(1)</filename> and <command>info bash</command>.</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
@ -32,7 +32,7 @@ EOF</userinput></screen>
|
|||||||
ensuring a clean environment.</para>
|
ensuring a clean environment.</para>
|
||||||
|
|
||||||
<para>The new instance of the shell is a <emphasis>non-login</emphasis>
|
<para>The new instance of the shell is a <emphasis>non-login</emphasis>
|
||||||
shell, which does not read, and execute, the contents of <filename>/etc/profile</filename> or
|
shell, which does not read, and execute, the contents of the <filename>/etc/profile</filename> or
|
||||||
<filename>.bash_profile</filename> files, but rather reads, and executes, the
|
<filename>.bash_profile</filename> files, but rather reads, and executes, the
|
||||||
<filename>.bashrc</filename> file instead. Create the
|
<filename>.bashrc</filename> file instead. Create the
|
||||||
<filename>.bashrc</filename> file now:</para>
|
<filename>.bashrc</filename> file now:</para>
|
||||||
@ -59,10 +59,10 @@ EOF</userinput></screen>
|
|||||||
<para>The <command>set +h</command> command turns off
|
<para>The <command>set +h</command> command turns off
|
||||||
<command>bash</command>'s hash function. Hashing is ordinarily a useful
|
<command>bash</command>'s hash function. Hashing is ordinarily a useful
|
||||||
feature—<command>bash</command> uses a hash table to remember the
|
feature—<command>bash</command> uses a hash table to remember the
|
||||||
full path of executable files to avoid searching the <envar>PATH</envar>
|
full path to executable files to avoid searching the <envar>PATH</envar>
|
||||||
time and again to find the same executable. However, the new tools should
|
time and again to find the same executable. However, the new tools should
|
||||||
be used as soon as they are installed. By switching off the hash function,
|
be used as soon as they are installed. Switching off the hash function forces
|
||||||
the shell will always search the <envar>PATH</envar> when a program is to
|
the shell to search the <envar>PATH</envar> whenever a program is to
|
||||||
be run. As such, the shell will find the newly compiled tools in
|
be run. As such, the shell will find the newly compiled tools in
|
||||||
<filename class="directory">$LFS/tools/bin</filename> as soon as they are
|
<filename class="directory">$LFS/tools/bin</filename> as soon as they are
|
||||||
available without remembering a previous version of the same program
|
available without remembering a previous version of the same program
|
||||||
@ -115,10 +115,10 @@ EOF</userinput></screen>
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>PATH=/usr/bin</parameter></term>
|
<term><parameter>PATH=/usr/bin</parameter></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Many modern linux distributions have merged <filename
|
<para>Many modern Linux distributions have merged <filename
|
||||||
class="directory">/bin</filename> and <filename
|
class="directory">/bin</filename> and <filename
|
||||||
class="directory">/usr/bin</filename>. When this is the case, the standard
|
class="directory">/usr/bin</filename>. When this is the case, the standard
|
||||||
<envar>PATH</envar> variable needs just to be set to <filename
|
<envar>PATH</envar> variable should be set to <filename
|
||||||
class="directory">/usr/bin/</filename> for the <xref
|
class="directory">/usr/bin/</filename> for the <xref
|
||||||
linkend="chapter-temporary-tools"/> environment. When this is not the
|
linkend="chapter-temporary-tools"/> environment. When this is not the
|
||||||
case, the following line adds <filename class="directory">/bin</filename>
|
case, the following line adds <filename class="directory">/bin</filename>
|
||||||
@ -141,7 +141,7 @@ EOF</userinput></screen>
|
|||||||
standard <envar>PATH</envar>, the cross-compiler installed at the beginning
|
standard <envar>PATH</envar>, the cross-compiler installed at the beginning
|
||||||
of <xref linkend="chapter-cross-tools"/> is picked up by the shell
|
of <xref linkend="chapter-cross-tools"/> is picked up by the shell
|
||||||
immediately after its installation. This, combined with turning off hashing,
|
immediately after its installation. This, combined with turning off hashing,
|
||||||
limits the risk that the compiler from the host be used instead of the
|
limits the risk that the compiler from the host is used instead of the
|
||||||
cross-compiler.</para>
|
cross-compiler.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -195,7 +195,8 @@ EOF</userinput></screen>
|
|||||||
</important>
|
</important>
|
||||||
|
|
||||||
<para>Finally, to have the environment fully prepared for building the
|
<para>Finally, to have the environment fully prepared for building the
|
||||||
temporary tools, source the just-created user profile:</para>
|
temporary tools, force the <command>bash</command> shell to read
|
||||||
|
the new user profile:</para>
|
||||||
|
|
||||||
<screen><userinput>source ~/.bash_profile</userinput></screen>
|
<screen><userinput>source ~/.bash_profile</userinput></screen>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user