chroot,ch 6

Jeremy Utley jeremy at
Sat Nov 15 00:04:53 PST 2003

In article <200311150417.25884.michael8110 at>, michael wrote:
> bash-2.05b$ LFS=$LFS/mnt/lfs
> bash-2.05b$ echo $LFS
> /mnt/lfs
> bash-2.05b$ su
> Password:
> bash-2.05b# 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
> chroot: cannot change root directory to /tools/bin/env: Not a directory
> only if i do this as user lfs will chroot see $LFS,but only to inform it 
> regrettably cannot do anything about it,and as root ,as you can see,chroot 
> goes straight past $LFS and attempts to chroot into binary env..

Because $LFS is unset as the root user, so you either need to replace it with
the proper directly, or set it.


More information about the lfs-support mailing list