problems with chroot

Gerard Beekmans gerard at linuxfromscratch.org
Sat Jan 18 14:51:17 PST 2003


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.

-- 
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-
-- 
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