problems with chroot

Frank _dev_mail at web.de
Sun Jan 19 04:09:49 PST 2003


Am Samstag, 18. Januar 2003 22:51 schrieben Sie:
> On January 18, 2003 05:26 am, Frank wrote:
> > ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
> > statically linked, not stripped
>
> Ok how about the following. You said you ran this:
>
> cd /mnt/lfs &&
> chroot /mnt/lfs /static/usr/bin/env -i \
>        HOME=/root \
>        TERM=$TERM \
>        PS1='\u:\w\$ ' \
>        CFLAGS="-O3 -march=i686 -mcpu=i686" \
>        CXXFLAGS=$CFLAGS \
>        PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \
>        /static/bin/bash --login
>
> If you typed a space after the \ character on the second last line
> (the PATH= line) then you would get that same error you're getting.
>
> Did you copy & paste the commands from the book or did you type
> them out?
>
> If a stray isn't the case, then download the 'strace' program (see
> freshmeat.net) and install it, link it statically too.
>
> Then run this:
>
> cd /mnt/lfs &&
> chroot /mnt/lfs /static/bin/strace -F -f \
> 	/static/usr/bin/env -i \
> 	HOME=root \
> 	TERM=$TERM \
> 	PS1='\u:\w\$ ' \
> 	CFLAGS="-O3 -march=i686 -mcpu=i686" \
> 	CXXFLAGS=$CFLAGS \
> 	PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \
> 	/static/bin/bash --login
>
>
> strace will run env which will try to run bash in turn. Through
> strace's output you might be able to see what env is trying to do
> that causes your error.


Hi 

The problem ist no one any longer. I did a copy & paste, that why the 
risk to make a typo is much less. I was doing that from the html-book 
to kwrite.
Ok, the problem was this:
First I was putting /static/usr/bin to the PATH-variable, because 
there is my env and not in /static/bin. I ran the chroot-script 
again, but it was still not running, same error. Then I was checking 
the script for typos again, this time with more eagle-yes, but 
everything was fine, in kwrite. There it looked like this

cd /mnt/lfs &&
chroot /mnt/lfs /static/usr/bin/env -i \
       HOME=/root \
       TERM=$TERM \
       PS1='\u:\w\$ ' \
       CFLAGS="-O3 -march=i686 -mcpu=i686" \
       CXXFLAGS=$CFLAGS \
       PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \
       /static/bin/bash --login

Finally I was checking it with vim, where it looked like this:

cd /mnt/lfs &&
chroot /mnt/lfs /static/usr/bin/env -i \
       HOME=/root \
       TERM=$TERM \
       PS1='\u:\w\$ ' \
       CFLAGS="-O3 -march=i686 -mcpu=i686" \
       CXXFLAGS=$CFLAGS \
||||    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \
||||    /static/bin/bash --login

I had this in several scripts after copy & paste. I thought I was 
checking all the new scripts, but it seems, that I was not really 
awake, because I forgot this one. 
Removing the pipe-characters, rerunning the script, and my smile began 
to grow :-)

Voila my new chroot, the gate to the new LFS


Thank you very much


Frank
-- 
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