[lfs-support] Point 6.4. Unable to chroot

Bruce Dubbs bruce.dubbs at gmail.com
Mon Apr 2 12:34:46 PDT 2018


On 04/02/2018 02:07 PM, miguel caldas wrote:
> Hi,
> I'm building LFS 8.2, in a Debian 9 host, on a external hard drive.
> The output of my host system requirements are the following:
> 
> bash, version 4.4.12(1)-release
> /bin/sh -> /bin/bash
> Binutils: (GNU Binutils for Debian) 2.28
> bison (GNU Bison) 3.0.4
> /usr/bin/yacc -> /usr/bin/bison.yacc
> bzip2,  Version 1.0.6, 6-Sept-2010.
> Coreutils:  8.26
> diff (GNU diffutils) 3.5
> find (GNU findutils) 4.7.0-git
> GNU Awk 4.1.4, API: 1.1 (GNU MPFR 3.1.5, GNU MP 6.1.2)
> /usr/bin/awk -> /usr/bin/gawk
> gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
> g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
> (Debian GLIBC 2.24-11+deb9u3) 2.24
> grep (GNU grep) 2.27
> gzip 1.6
> Linux version 4.9.0-6-amd64 (debian-kernel at lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02)
> m4 (GNU M4) 1.4.18
> GNU Make 4.1
> GNU patch 2.7.5
> Perl version='5.24.1';
> sed (GNU sed) 4.4
> tar (GNU tar) 1.29
> version-check.sh: line 47: makeinfo: command not found

First fix this:  apt-get install texinfo

Required packages are there for a reason.

> xz (XZ Utils) 5.2.2
> g++ compilation OK
> 
> When I tried to input this command:
> 
> chroot "$LFS" /tools/bin/env -i \
>      HOME=/root                  \
>      TERM="$TERM"                \
>      PS1='(lfs chroot) \u:\w\$ ' \
>      PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
>      /tools/bin/bash --login +h
> 
> I get the following error message:
> 
> chroot: failed to run command ‘/tools/bin/env’: No such file or directory
> 
> I checked and /tools/bin/env, exists. "env" being a executable.
> 
> One thing that bothers me, but it might have nothing to do with this, is that my LFS is /media/miguel/Root, "Root" being the partition where I'm installing lfs.
> Can this command "HOME=/root " be negatively influenced by my "LFS=/media/miguel/Root"?
> 
> Any help would be greatly appreciated.

Try following the book before making customizations.  Use /mnt/lfs 
instead of /media/miguel/Root

Start Chapter 5 over.  Possibly all the way back to Section 2.6.

    -- Bruce


More information about the lfs-support mailing list