LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Sun Nov 10 12:18:56 PST 2002


On Sunday 10 November 2002 19:45, you wrote:
 > from my LFS box. Maybe I'll try to paraphrase:
 > >pwd
 > /mnt/lfs
 > >echo $LFS
 > /mnt/lfs
 > >/usr/sbin/chroot $LFS /static/bin/env -i
 > >pwd
 > /mnt/lfs

I think I've got your problem. You didn't type the whole command! You should
have typed (LFS v4.0):
chroot $LFS /static/bin/env -i \
    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \
    /static/bin/bash --login

Because the line is 'quite' long, it has been split into 4 lines. That's what
the back-slashes are there for: it tells the shell the command does not end
with the line, but continues on the next one.

It is equivalent to (2 lines):
chroot $LFS /static/bin/env -i HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
 PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin /static/bin/bash --login

My mailer would wrap the 1-line version... But you get the idea!

In fact 'env' will terminate right away, giving back hand to the calling shell
in your pre-LFS system. You did enter correctly the chroot environnement, but
solely for executing 'env'.

 > What is going wrong is outside the bounds of my perception or knowledge
 > .... help me someone.

I first did not know either. ;-) Hope it helps!

Cheers,
Yann.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< °_° >==-- °---.----------------:  X  AGAINST      |  \e/  There is no  |
| web: ymorin.free.fr | SETI at home  515 | / \ HTML MAIL    |   v   conspiracy.  |
°---------------------°----------------°------------------°--------------------°
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list