mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-06 06:14:47 +00:00
Text update
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@354 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
32489b55b0
commit
97f1db3961
@ -3,50 +3,53 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Please read the following carefully: throughout this book
|
Please read the following carefully: throughout this book
|
||||||
the variable name $LFS will frequently be used. $LFS must at all times be
|
the variable $LFS will be used frequently. $LFS must at all times be
|
||||||
replaced by the directory where the partition that contains the LFS system
|
replaced by the directory where the partition that contains the LFS system
|
||||||
is mounted. How to create and where to mount the partition will be
|
is mounted. How to create and where to mount the partition will be
|
||||||
explaind in full detail later on in chapter 4. In my case, the LFS
|
explaind in full detail in chapter 4. In my case, the LFS
|
||||||
partition is mounted on /mnt/lfs. If I read this book myself and I see
|
partition is mounted on /mnt/lfs.
|
||||||
$LFS somewhere, I will pretend that I read /mnt/lfs. If I read that
|
</para>
|
||||||
I have to run this command: cp inittab $LFS/etc, I actually will run this:
|
|
||||||
cp inittab /mnt/lfs/etc.
|
<para>
|
||||||
|
For example when you are told to run a command like
|
||||||
|
<userinput>./configure --prefix=$LFS</userinput> you will actually run
|
||||||
|
<userinput>./configure --prefix=/mnt/lfs</userinput>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
It's important that this is done no matter where it is read; be it in
|
It's important that this is done no matter where it is read; be it in
|
||||||
commands entered on the prompt, or in a file edited or created.
|
commands entered in a shell, or in a file edited or created.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Another possible solution is to set the environment variable LFS.
|
Another possible solution is to set the environment variable LFS.
|
||||||
This way the $LFS can be entered literally instead of replacing it by
|
This way $LFS can be entered literally instead of replacing it by
|
||||||
something like
|
/mnt/lfs. This is accomplished by running <userinput>export
|
||||||
/mnt/lfs. This is accomplished by running: export LFS=/mnt/lfs.
|
LFS=/mnt/lfs</userinput>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If I read cp inittab $LFS/etc, I literally can type cp inittab $LFS/etc
|
Now, if you read to run a command like <userinput>./configure
|
||||||
and the shell will replace this command by cp inittab /mnt/lfs/etc
|
--prefix=$LFS</userinput> you can type that literally. Your shell will
|
||||||
automatically.
|
replace $LFS with /mnt/lfs when it processes the command line (meaning
|
||||||
|
when you hit enter).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Do not forget to set the $LFS variable at all times. If
|
If you plan to use $LFS, do not forget to set the $LFS variable at all
|
||||||
the variable is not set and is used it in a command, $LFS will be ignored
|
times. If the variable is not set and is used it in a command, $LFS will
|
||||||
and whatever
|
be ignored and whatever is left will be executed. A command like
|
||||||
is left will be executed. The command cp inittab $LFS/etc without the $LFS
|
<userinput>echo "root:x:0:0:root:/root:/bin/bash" >
|
||||||
variable set will result in copying the inittab file to the /etc
|
$LFS/etc/passwd</userinput> without the $LFS variable set will
|
||||||
directory, which will overwrite the host-system's inittab. A file like inittab
|
re-create your host system's /etc/passwd file. Simply put: it will
|
||||||
isn't that big a problem as it can easily be restored, but if
|
destroy your current password database file.
|
||||||
this mistake is made during the installation of the C Library, things might
|
|
||||||
be damaged
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
One way to make sure that $LFS is set at all times is adding it to
|
One way to make sure that $LFS is set at all times is adding it to
|
||||||
the /root/.bash_profile and/or /root/.bashrc file(s) so that every time a
|
the /root/.bash_profile and/or /root/.bashrc file(s) so that every time
|
||||||
'su' to root is done to install LFS, the $LFS variable is set.
|
you login as user root, or you 'su' to user root, the $LFS variable is
|
||||||
|
set.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
Loading…
Reference in New Issue
Block a user