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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-12-2012, 12:34 AM
|
#1
|
|
LQ Newbie
Registered: Aug 2012
Posts: 4
Rep: 
|
LFS 7.1-Coreutils 8.15-After installation, exit and re-enter chroot env-utils inop
Hi all,
System: WaryPuppy Linux running from usb stick on eeepc.
Page 140 of LFS. Completed install of Coreutils 8.15 and all steps
associated with this install. All tests pass. When I leave the chroot
environment and return, most coreutil programs don't work (ie. ls, ln,
cp, mv, etc). Error given is: bash: /bin/ls: No such file or directory. A few utils do work (echo, pwd, true). Files are there when checked outside chroot. Have tried using other/no configuration options and using 8.17. Same problem occurs.
Possibly related to chroot workaround issue: in order to successfully chroot, I have to mv lib _lib, then mv _lib lib when I get into chroot. Otherwise get segmentation fault. No other problems unresolved until now and sanity tests are all ok.
Any tips/suggestions on where to look?
Thanks,
mech
|
|
|
|
08-12-2012, 03:18 AM
|
#2
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,703
|
Quote:
Originally Posted by mech0001
Page 140 of LFS. Completed install of Coreutils 8.15 and all steps associated with this install. All tests pass. When I leave the chroot environment and return, most coreutil programs don't work (ie. ls, ln, cp, mv, etc). Error given is: bash: /bin/ls: No such file or directory. A few utils do work (echo, pwd, true). Files are there when checked outside chroot. Have tried using other/no configuration options and using 8.17. Same problem occurs.
|
First question that pops up: Why leave the chrooted environment? And if you do need to, make sure you use the correct chroot command.
Quote:
|
Possibly related to chroot workaround issue: in order to successfully chroot, I have to mv lib _lib, then mv _lib lib when I get into chroot. Otherwise get segmentation fault.
|
This needs to be resolved first. No extra steps are needed/wanted to make the LFS book work. Something is definitely wrong if you have to move/remove/copy any extra stuff to make it work.
You did not post enough information to help you any further: Error message(s) and first occurrence of this chroot error might be handy.
Also: Is you host made fully compliant: http://www.linuxfromscratch.org/lfs/.../hostreqs.html (run script and fix possible problems).
|
|
|
|
08-13-2012, 12:12 AM
|
#3
|
|
LQ Newbie
Registered: Aug 2012
Posts: 4
Original Poster
Rep: 
|
Thanks for the reply.
Answers to your questions:
Leave chroot when computer is shut down as I don't often have lots of consecutive time to work on tnis.
Chroot problem occurs after make install step of glibc. The glibc tests give the expected errors only(posix/bug-regex32, stdio-common/bug22, and posix/annexc). Make install step test/installation.pl returns "Your new glibc installation seems to be ok" message.
Where should I look for further error information?
Thanks
|
|
|
|
08-13-2012, 04:22 AM
|
#4
|
|
LQ Newbie
Registered: Aug 2012
Posts: 4
Original Poster
Rep: 
|
There appears to be an error in my tools directory as invoking /tools/bin/env causes a segfault. Soooo, it's back to the beginning. I will let you know if this fixes the problem in
a couple of days or so.
mech
|
|
|
|
08-18-2012, 10:18 PM
|
#5
|
|
LQ Newbie
Registered: Aug 2012
Posts: 4
Original Poster
Rep: 
|
It looks like I have to stay in the chroot environment throughout that section of package installation steps. After completing them, I am able to reenter this environment with the chroot command on page 191 (PDF 210). I would suggest not exiting the chrooted environment during this step if you encounter a similar problem. You could also try using the later command with the addition of +h at the end if your are only partway through the section.
Perhaps the chrooted environment creates memory allocations that are not legally accessible to root causing the segfault when /tools/bin/env -i is called.
I have not yet booted my installation so I will not call this solved yet.
mech
|
|
|
|
08-19-2012, 05:05 AM
|
#6
|
|
LQ Veteran
Registered: Sep 2003
Location: the Netherlands
Distribution: lfs, debian, rhel
Posts: 8,703
|
From chapter 6.64 up to and including chapter 9.3 you need to use the chroot command as shown in chapter 6.64.
If, for whatever reason, you leave the chrooted environment you need this command to re-enter:
Code:
chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login
If you rebooted, you also need to restore the virtual kernel file systems (6.2.2 and 6.2.3) _before_ you enter the chrooted environment:
Code:
mount -v --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
No need to change the chroot command.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:31 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.
|
Latest Threads
LQ News
|
|