LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 08-12-2012, 01:34 AM   #1
mech0001
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Rep: Reputation: Disabled
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
 
Old 08-12-2012, 04:18 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Quote:
Originally Posted by mech0001 View Post
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).
 
Old 08-13-2012, 01:12 AM   #3
mech0001
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 08-13-2012, 05:22 AM   #4
mech0001
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 08-18-2012, 11:18 PM   #5
mech0001
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 08-19-2012, 06:05 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
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.
 
  


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
Help with chapter 6.22 Coreutils - 8.10 in LFS 6.8 adi_30stm Linux From Scratch 7 08-05-2011 03:06 AM
lfs:/mnt/lfs/sources/util-linux-2.12r$ cp -v mount/{,u}mount text-utils/more /tools/b arougen02 Linux From Scratch 5 03-19-2008 02:15 PM
lfs:/mnt/lfs/sources/util-linux-2.12r$ cp -v mount/{,u}mount text-utils/more /tools/b arougen02 Linux - Newbie 2 03-16-2008 12:16 PM
Coreutils-5.2.1 error LFS 5.1 michaelbhahn Linux From Scratch 8 09-01-2007 02:36 PM
Cannot Enter chroot /usr/bin/env directory not found Zero-0-Effect Linux From Scratch 2 03-13-2004 01:41 PM


All times are GMT -5. The time now is 08:59 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration