LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-23-2014, 06:35 AM   #1
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
No '/tools/bin/env' before chrooting... now what?


Hi,

I just went through the building of all the temporary tools in chapter 5, and I was about to chroot into my temporary system, when chroot spewed out an error about a nonexistent '/tools/bin/env'.

Here's what my /tools/bin actually contains:

Code:
[root@slackware-live:lfs] # ls /tools/bin/
addr2line     gzexe                          logger            setterm
ar            gzip                           look              sh
as            hexdump                        lsblk             size
awk           i386                           lscpu             sotruss
bash          i686-lfs-linux-gnu-addr2line   lslocks           sprof
bashbug       i686-lfs-linux-gnu-ar          lslogins          strings
bunzip2       i686-lfs-linux-gnu-as          lzcat             strip
bzcat         i686-lfs-linux-gnu-c++         lzcmp             tabs
bzcmp         i686-lfs-linux-gnu-c++filt     lzdiff            tailf
bzdiff        i686-lfs-linux-gnu-cpp         lzegrep           taskset
bzegrep       i686-lfs-linux-gnu-elfedit     lzfgrep           tclsh
bzfgrep       i686-lfs-linux-gnu-g++         lzgrep            tclsh8.6
bzgrep        i686-lfs-linux-gnu-gcc         lzless            texi2any
bzip2         i686-lfs-linux-gnu-gcc-4.9.1   lzma              texi2dvi
bzip2recover  i686-lfs-linux-gnu-gcc-ar      lzmadec           texi2pdf
bzless        i686-lfs-linux-gnu-gcc-nm      lzmainfo          texindex
bzmore        i686-lfs-linux-gnu-gcc-ranlib  lzmore            tic
c++           i686-lfs-linux-gnu-gcov        m4                toe
c++filt       i686-lfs-linux-gnu-gprof       make              tput
cal           i686-lfs-linux-gnu-ld          makedb            tset
captoinfo     i686-lfs-linux-gnu-ld.bfd      makeinfo          tzselect
catchsegv     i686-lfs-linux-gnu-nm          mcookie           ul
cc            i686-lfs-linux-gnu-objcopy     mesg              umount
chrt          i686-lfs-linux-gnu-objdump     more              uname26
clear         i686-lfs-linux-gnu-ranlib      mount             uncompress
cmp           i686-lfs-linux-gnu-readelf     mountpoint        unlzma
col           i686-lfs-linux-gnu-size        msgfmt            unshare
colcrt        i686-lfs-linux-gnu-strings     msgmerge          unxz
colrm         i686-lfs-linux-gnu-strip       mtrace            updatedb
column        i686-pc-linux-gnu-c++          namei             utmpdump
cpp           i686-pc-linux-gnu-g++          ncursesw5-config  uuidgen
diff          i686-pc-linux-gnu-gcc          nm                wall
diff3         i686-pc-linux-gnu-gcc-4.9.1    nsenter           wdctl
dmesg         i686-pc-linux-gnu-gcc-ar       objcopy           whereis
egrep         i686-pc-linux-gnu-gcc-nm       objdump           xargs
eject         i686-pc-linux-gnu-gcc-ranlib   oldfind           xgettext
elfedit       iconv                          patch             xtrace
expect        igawk                          pcprofiledump     xz
fallocate     infocmp                        pdftexi2dvi       xzcat
fgrep         infotocap                      perl              xzcmp
file          install-info                   pg                xzdec
find          ionice                         pldd              xzdiff
findmnt       ipcmk                          pod2man           xzegrep
flock         ipcrm                          pod2texi          xzfgrep
g++           ipcs                           prlimit           xzgrep
gawk          isosize                        ranlib            xzless
gawk-4.1.1    kill                           readelf           xzmore
gcc           last                           rename            zcat
gcc-ar        lastb                          renice            zcmp
gcc-nm        ld                             reset             zdiff
gcc-ranlib    ld-new                         rev               zegrep
gcov          ld.bfd                         rpcgen            zfgrep
gencat        ldd                            runtest           zforce
getconf       lddlibc4                       script            zgrep
getent        linux32                        scriptreplay      zless
getopt        linux64                        sdiff             zmore
gprof         locale                         sed               znew
grep          localedef                      setarch
gunzip        locate                         setsid
Unfortunately, 'env' is nowhere to be found.

Any suggestions?
 
Old 11-23-2014, 06:55 AM   #2
turtleli
Member
 
Registered: Aug 2012
Location: UK
Posts: 206

Rep: Reputation: Disabled
Did you accidentally forget to install coreutils?
 
Old 11-23-2014, 07:20 AM   #3
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by turtleli View Post
Did you accidentally forget to install coreutils?
Yes and no. I just investigated a little bit and found the culprit. I'm scripting as much as possible, and everything went right on the first pass. On my second try I did two one thing differently. I decided not to build everything as a dedicated 'lfs' user, but as root. Unfortunately, I forgot to 'set -e' in my master script. And 'coreutils' can't be configured as root in its default configuration. You need to pass this parameter:

Code:
FORCE_UNSAFE_CONFIGURE=1 \
.configure ...
So without the 'set -e' parameter, the master build script just went chugging along even after coreutils failed.

https://github.com/kikinovak/lfs

All's well that ends well.

Cheers,

Niki
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot: cannot run command `/tools/bin/env': No such file or directory Basel Linux From Scratch 10 06-09-2018 02:15 PM
[SOLVED] /tools/bin/env points to wrong lib supern0va Linux From Scratch 3 05-25-2010 06:38 PM
6.4. Entering the Chroot Environment: /tools/bin/env: no such file jpeters Linux From Scratch 1 03-29-2009 09:58 PM
/tools/bin/env ...does not exist! mediolanum Linux From Scratch 12 11-05-2006 01:44 PM
/tools/bin/env: /tools/bin/bash: No such file or directory DaZjorz Linux From Scratch 21 07-27-2005 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 11:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration