LinuxQuestions.org
Register a domain and help support LQ
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 09-06-2005, 10:02 AM   #16
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,401

Rep: Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119Reputation: 1119

/mnt/lfs/tools is where the various executable and library components will be installed, this being the directory that is listed first in your $PATH (for this very reason).

A typical directory structure looks like this:
Code:
   /mnt/lfs --+
              +-- sources
              +-- patches
              +-- gcc-3.4.4   {built by tar when unpacking that archive}
              +-- gcc-build   {created by you}
              +-- tools
                   +-- bin
                   +-- lib
                   +-- (and so on...)
Let's say for example that I am about to build gcc-3.4.4. (Or whatever-version of whatever-product...)
  1. Starting in /mnt/lfs... (that is to say, "$LFS") Every new build starts there.
  2. I'll tar ... sources/gcc-3.4.4... to unpack the archive and make the /mnt/lfs/gcc-3.4.4 directory.
  3. If there are patches, I will now cd gcc-3.4.4 and apply patches from ../patches/gcc-whatever, then cd .. so that I return to /mnt/lfs again. Now that I have fully-patched source in the gcc-3.4.4 directory, I don't have to touch it again. (In fact, I usually write-protect the directory and its contents, just to make sure it remains "pristine.")
  4. Now I'll mkdir gcc-build ; cd gcc-build, and I'll start with ../gcc-3.4.4/configure --prefix=/tools whatever. I'll do all the work within the gcc-build directory, and aim the final output into /tools.
  5. If I decide that my installation of gcc is totally-hosed, I can rm -rf gcc-build, remake that directory and start-over with just that step. (Hint: if you're just noodling around, make a bunch of backup-copies of /tools, one for each step as you go.)
The major difference between the stage-5 and the stage-6 builds is that stage-5 executables are built to assume the existence of /tools and to assume that this directory is first in the $PATH. Stage-6 now builds the objects to be targeted for /usr, using only the copies found in /tools (nothing from the host-system), and all dependencies upon /tools are systematically removed. The chroot facility is what insulates the host system from being modified as we do this. When stage-6 is finished, nothing should refer to /tools.

Last edited by sundialsvcs; 09-06-2005 at 10:05 AM.
 
Old 09-06-2005, 10:16 AM   #17
jimbo-62
Member
 
Registered: May 2005
Location: Utah
Posts: 102

Original Poster
Rep: Reputation: 15
Yes, I understand those points and my Chapter 5 builds have installed to the /mnt/lfs/tools directory. The problem I was having is that on reboot the LFS variable definition, the lfs user and lfs group, and the two scripts were gone. What I found was that this information was in /home/lfs on the host system, the Live CD in my case. Maybe I missed a step where the lfs home directory was created on the lfs partition. Anyway, I found a "Hint" that adds/changes the LFS book when the Live CD is the host system.

Thanks for the continued help, jimbo
 
  


Reply

Tags
binutils


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
linux newbie question :confused: trey85stang General 18 08-24-2005 06:01 AM
iptables - firewalls - confused newbie mymojo Linux - Newbie 7 12-16-2003 04:50 PM
Help for A Very Confused Newbie.. flamesrock Mandriva 15 08-30-2003 09:20 PM
Confused Newbie - No mouse (sort of!) keebz Linux - Newbie 7 12-03-2002 10:46 PM
newbie soo confused edman Linux - General 3 12-18-2000 07:02 PM


All times are GMT -5. The time now is 10:45 AM.

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