LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-05-2016, 09:58 PM   #1
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Rep: Reputation: Disabled
chroot: failed to run command ‘/tools/bin/env’: No such file or directory: chapter 6.4


Hello! I am working on creating an lfs system. I have tried starting over many times and I am always getting this error. any help is welcome! thanks
 
Old 09-06-2016, 02:42 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,509
Blog Entries: 1

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
Dose it exsit have you looked?
 
Old 09-06-2016, 08:49 AM   #3
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 2,940

Rep: Reputation: 780Reputation: 780Reputation: 780Reputation: 780Reputation: 780Reputation: 780Reputation: 780
Quote:
Originally Posted by zoelee4 View Post
Hello! I am working on creating an lfs system. I have tried starting over many times and I am always getting this error. any help is welcome! thanks
Loads more info please, post version script o/p, building in vm or not, host distro etc.
 
Old 09-06-2016, 12:29 PM   #4
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
the host machine is not a VM, I am running ubuntu 64bit I have followed this tutorial (http://www.linuxquestions.org/questi...u-12-04-34902/) to start. thanks again! tell me if you need any more info
 
1 members found this post helpful.
Old 09-06-2016, 01:02 PM   #5
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,509
Blog Entries: 1

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
Dose /tools/bin/env exsist? Have you checked.

Last edited by spiky0011; 09-06-2016 at 01:03 PM.
 
Old 09-06-2016, 01:10 PM   #6
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
this is on my LFS system (not host system)

Code:
lfs@zoe:/mnt/lfs/tools/bin$ ls env*
env
lfs@zoe:/mnt/lfs/tools/bin$ pwd
/mnt/lfs/tools/bin
lfs@zoe:/mnt/lfs/tools/bin$
 
Old 09-06-2016, 01:23 PM   #7
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,509
Blog Entries: 1

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
You are entering chroot as user root? and LFS is set for root
 
Old 09-06-2016, 01:24 PM   #8
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
yes, I am running the chroot command as root user.
 
Old 09-06-2016, 02:31 PM   #9
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,509
Blog Entries: 1

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
I think I would reboot, set LFS for root make sure LFS partition is mounted, And providing CH 6.2, 6.2.1, have been done "Check 1st"

then carry on from CH 6.2.2 "mount -v --bind /dev $LFS/dev" then 6.2.3. Then try chroot again
 
Old 09-06-2016, 03:00 PM   #10
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
I tried what you sugested.

I gave LFS (user) root privileges then I rebooted and made sure that I had done steps 6.2.1. then I re-did 6.2.2 and 6.2.3 then ran this: (as it says to do in 6.4)

Code:
lfs@zoe:~/lfs-7.8$ sudo 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 +h
chroot: failed to run command '/tools/bin/env': No such file or directory
thanks!
 
Old 09-06-2016, 03:14 PM   #11
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,509
Blog Entries: 1

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
run this on your host system

Code:
gcc --version | head -n1
what lfs are you building?
 
Old 09-06-2016, 03:21 PM   #12
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
this is the output:

Code:
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609
 
Old 09-06-2016, 03:24 PM   #13
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,509
Blog Entries: 1

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
which book are you following?
Quote:
lfs@zoe:~/lfs-7.8$
 
Old 09-06-2016, 03:34 PM   #14
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
lfs 7.8
 
Old 09-06-2016, 03:34 PM   #15
zoelee4
Member
 
Registered: Aug 2016
Distribution: Debian, Ubuntu, BLFS
Posts: 116

Original Poster
Rep: Reputation: Disabled
...mostly
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
slackware 14.0, chroot: failed to run command ‘/bin/bash’: No such file or directory rameshoty Slackware 6 10-18-2012 06:26 AM
6.4. Entering the Chroot Environment: /tools/bin/env: no such file jpeters Linux From Scratch 1 03-29-2009 09:58 PM
chroot: cannot run command `/bin/bash': No such file or directory hubabuba Slackware 5 03-23-2008 05:37 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 06:42 AM.

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