-   Linux From Scratch (
-   -   chroot:cannot change root directory to: No such file directory (

janakiramulu 04-22-2011 06:22 AM

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
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

TobiSGD 04-22-2011 07:38 AM

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.

janakiramulu 04-22-2011 11:35 PM

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

TobiSGD 04-22-2011 11:46 PM

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.

janakiramulu 04-23-2011 12:06 AM

hi TobiSGD
thanks for advise,i am not catching here(ie chroot),let me read basics
thanku so much

janakiramulu 04-23-2011 01:00 AM

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)

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