LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-22-2011, 06:22 AM   #1
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Rep: Reputation: 0
chroot:cannot change root directory to: No such file directory


hi all
i am building lfs-6.7-using lfs livecd
right now i am @chapter7 starting
first@ 6.62. Stripping Again
root:/sources#logout
it return
root[~]#(in red colour only}
root[ ~ ]#chroot $LFS /tools/bin/env -i \
HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/tools/bin/bash --login

root:/#/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
-exec /tools/bin/strip --strip-debug '{}' ';'
result is below(rolling)

/tools/bin/strip:/usr/lib/pkgconfig/,,,e format not recognised
/tools/bin/strip:/usr/lib/pkgconfig/,,,e format not recognised
/tools/bin/strip:/usr/lib/pkgconfig/,,,e format not recognised
..........................
........................
........................
/tools/bin/strip:/usr/lib/pkgconfig/,,,e format not recognised
/tools/bin/strip:/usr/sbin/grubfile format not recognised
---------------(as per book i can ignore this warnings)- --------------------

i tested as for book
6.2.2. Mounting and Populating /dev
6.2.3. Mounting Virtual Kernel File Systems
result of above commands is 'already mounted'
then i did 6.63. Cleaning Up(pageno-192)
root[~]#chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login
result is
chroot:cannot change root directory to: No such file directory
whats wrong plz help me

Last edited by janakiramulu; 04-22-2011 at 06:37 AM.
 
Old 04-22-2011, 07:38 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I would assume that the variable $LFS is not set, so that the chroot-command tries to chroot to a non existent directory.
Please, please, please, do as you were advised several times before learn your basics on the command-line. If you had done so you would clearly see what is wrong there. As also stated several times before in your various threads, just simply copying the commands out of the book without understanding what they do will teach you exactly nothing.
It is a rather pointless exercise to do a LFS install without understanding what you are doing.
 
Old 04-22-2011, 11:35 PM   #3
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi TobiSGD
k thanks for reply
that may be the mistake ,idodnt know whats wrong i did

after issuing following command
6.4. Entering the Chroot Environment
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
then i check echo $LFS

its not giving any result
why (this may be contuining till whole chapter6)
can you explain why its not giving result,with this i am going to be mad
 
Old 04-22-2011, 11:46 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You chroot into the $LFS directory with also using the the env command. So having a look at at the env manpage it shows that with the -i option you start with an empty environment.
Otherwise it wouldn't make any sense. You chroot into $LFS, what use would this variable have inside the chroot?
As stated above, you don't know what you are doing there. It seems to me that you don't even know how to get the necessary info if you don't understand a command (or you just don't want to get it yourself). This way the whole exercise you do is absolutely pointless.

I think I will do it like druuna and will not reply to any of your posts regarding LFS until you learned your basics.
 
Old 04-23-2011, 12:06 AM   #5
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi TobiSGD
thanks for advise,i am not catching here(ie chroot),let me read basics
thanku so much
 
Old 04-23-2011, 01:00 AM   #6
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Original Poster
Rep: Reputation: 0
hi i TobiSGD
yes this may be solution right, inside chroot env command with no option will print environment variables(which we were previously set $LFS is /mnt/lfs)

Last edited by janakiramulu; 04-23-2011 at 01:03 AM.
 
  


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
[SOLVED] chroot error "cannot change root directory to /jail: Operation not permitted" Soji Antony Linux - Newbie 8 05-23-2011 08:29 PM
chroot: No such file or directory PROBLEM seraph-seph Slackware 11 06-02-2010 07:31 AM
chroot cannot change the root directory alkaff Linux From Scratch 3 05-11-2008 04:31 PM
bind9 failed - bindnamed: chroot(): no such file or directory rly74 Linux - Software 1 05-29-2007 03:16 PM

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

All times are GMT -5. The time now is 06:14 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