chroot:cannot change root directory to: No such file directory
Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.