On Wed, 28 Dec 2016 02:18:59 +0100
Michele Bucca <[email protected]> wrote:

> Il 28 dic 2016 2:14 AM, "ssmtpmailtesting ssmtpmailtesting" <
> [email protected]> ha scritto:
> >
> > http://www.linuxfromscratch.org/lfs/view/stable/chapter06/chroot.html
> >
> > chroot "$LFS" /tools/bin/env -i \
> >     HOME=/root                  \
> >     TERM="$TERM"                \
> >     PS1='\u:\w\$ '              \
> >     PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
> >     /tools/bin/bash --login +h
> >
> > Why are /usr/bin, /usr/sbin, /sbin, /bin in chroot command? Aren't these  
> directories empty after completing temporary system? Aren't all packages
> installed in /tools/bin not in /bin, /usr/bin, /usr/sbin, /sbin?
> 
> the command sets some variables when inside the chroot. Yes these
> directories are empty but when you will install the final system the sysyem
> will use the programs installed in the final proper location instead of
> those put inside /tools (as you can see /tools/bin is the last put inside
> the PATH variable)

Just compare this path with the one set up for the LFS user in Chapter 5. In 
that path, /tools comes right at the beginning, followed by the host's /bin and 
/sbin directories. Since hashing is turned off (+h), the path will be searched 
afresh for each command and the first occurrence of any command on that path 
will be the one to be used. Thus the new intermediate tools in /tools will 
replace the host's programs as soon as they have been built.

Exactly the same happens here except that this time /tools is put at the end. 
So as each program appears in /bin, /sbin, /usr/bin or /usr/sbin, it will be 
used in preference to the one in /tools.
-- 

H Russman
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to