LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-20-2013, 12:05 PM   #1
stoa
Member
 
Registered: Dec 2013
Posts: 54

Rep: Reputation: Disabled
Chroot Issue LFS 7.4 Stable No Such File or Directory


Hi everyone:

I'm missing something obvious here, I think.

I'm building LFS v. 7.4 on a Slackware host. All seemingly goes well until I hit section 6.7, Installation of Linux Headers. When trying to access /mnt/lfs/sources to access and tar the file, I can only access as far as /mnt - there is no /lfs/sources showing available in the chroot environment.

I thought it may have been a problem with $LFS not being defined for user root prior to chrooting, but after exiting chroot, confirming the variable, and re-chrooting, the problem persists.

Any clues as to what I am missing here? Here's my chroot environment:

Code:
root:~# env
TERM=xterm
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
PWD=/root
PS1=\u:\w\$ 
SHLVL=1
HOME=/root
_=/tools/bin/env
OLDPWD=/etc
Any hints are appreciated, and please let me know if you need further information. Thanks.
 
Old 12-20-2013, 12:39 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Once you have entered the chrooted environment you cannot use $LFS any more. It isn't part of the environment (and shouldn't be).

This quote is from chapter 6.4 Entering the Chroot Environment:
Quote:
From this point on, there is no need to use the LFS variable anymore, because all work will be restricted to the LFS file system. This is because the Bash shell is told that $LFS is now the root (/) directory.
What used to be /mnt/lfs/sources ($LFS/sources) is now /sources.
 
Old 12-20-2013, 05:39 PM   #3
stoa
Member
 
Registered: Dec 2013
Posts: 54

Original Poster
Rep: Reputation: Disabled
[Solved] Chroot Issue LFS 7.4 Stable No Such File or Directory Reply to Thread

Thanks, Druuna - I missed the (obvious) significance of the statement "This is because the Bash shell is told that $LFS is now the root (/) directory." Although, I still can't pull out of the chroot command exactly how that transfer occurred.

Thanks again.
 
Old 12-21-2013, 02:44 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
In chapter 5 you build a temporary, self contained, working environment needed to build LFS and in chapter 6 you build the actual LFS environment (as explained in chapter 1.1. How to Build an LFS System).

Simplified the chroot command starts a contained ("jailed") environment, which can be found at $LFS (/mnt/lfs for most people). This is the chroot "$LFS" part. The rest of the command is needed to set some initial environment settings.

BTW: Can you put up the [SOLVED] tag.
- above the first post -> Please Mark this thread as solved if you feel a solution has been provided.
- -or- -
- first post -> Thread Tools -> Mark this thread as solved
 
Old 12-21-2013, 10:45 AM   #5
stoa
Member
 
Registered: Dec 2013
Posts: 54

Original Poster
Rep: Reputation: Disabled
Solved

Thanks for your helpful explanation, Druuna (as usual!)

PS - I've tried marking as solved twice. I can't seem to find the "solved tag" nor the "thread tools." Sorry.
 
Old 12-21-2013, 10:57 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by stoa View Post
Thanks for your helpful explanation, Druuna (as usual!)
You're welcome.

Quote:
PS - I've tried marking as solved twice. I can't seem to find the "solved tag" nor the "thread tools." Sorry.
I recently posted this: see attachment
 
Old 12-21-2013, 11:31 AM   #7
stoa
Member
 
Registered: Dec 2013
Posts: 54

Original Poster
Rep: Reputation: Disabled
Thanks, Druuna - got it. Interesting that link is not available after entering the "reply to thread" section - which is where I was, and I would think, where most folks are when actually commenting on the solution!
 
  


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
chroot:cannot change root directory to: No such file directory janakiramulu Linux From Scratch 5 04-23-2011 01:00 AM
chroot: No such file or directory PROBLEM seraph-seph Slackware 11 06-02-2010 07:31 AM
LFS 6.4 (Stable LFS) - error: "No such file or directory", linuxiso Linux - Newbie 1 08-03-2009 10:55 PM
bind9 failed - bindnamed: chroot(): no such file or directory rly74 Linux - Software 1 05-29-2007 03:16 PM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM

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

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