LinuxQuestions.org
Review your favorite Linux distribution.
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 05-02-2003, 11:03 AM   #1
undershepherd
Member
 
Registered: Feb 2003
Location: Iowa
Distribution: SUSE 9.2
Posts: 69

Rep: Reputation: 15
beginner trying LFS


I have decided to try to build my own Linux from scratch. I have two hard drives, the main (40G) has MDK 9.1 on it. The slave (8G) has three partitions. I followed the instructions to set up the partitions and the mount points and directories as it said in the 4.1 book on LFS' s website. . I can see /mnt/lfs/static on hdb1, as well as two more files "lost+found" and "usr" on hdb6
Now, I downloaded all the packages into the /home/ray/Downloads directory of my main HD. I tar xvfz the Bash 2.0.5a file, cd into it, and did ./configure, with all the tags that the book said. But, when I look into the /mnt/lfs/static directory, there is nothing there. Do I need to copy all the downloaded files over to the second hd, in order to install the LFS on that drive?
The configure worked okay, but I'm a bit nervous about what I really did. My present bash on the main drive is still 2.0.5b.

Thanks for all your help. I am really excited about doing this, and I know it there are going to be headaches and hairpulling, but that's how you learn. I searched their mailing list and this one, and couldn't find any help on this.
 
Old 05-02-2003, 10:16 PM   #2
PTBmilo
Member
 
Registered: Jan 2003
Posts: 167

Rep: Reputation: 30
make sure that your $LFS environment variable is set up:

echo $LFS
/mnt/lfs

if '/mnt/lfs' is the output, then using '--prefix=$LFS/static' will cause all of the packages to be installed in /mnt/lfs/static when you do 'make install'

You are going to need the packages to be within the $LFS branch of your filesystem when you get to chapter 6... you can move them now or later.

good luck
 
Old 05-03-2003, 08:10 AM   #3
undershepherd
Member
 
Registered: Feb 2003
Location: Iowa
Distribution: SUSE 9.2
Posts: 69

Original Poster
Rep: Reputation: 15
Thank you so much for replying. I discovered that everytime I open a bash shell, I must type "LFS=/mnt/lfs" in order for the output of "echo $LFS" to be that. Not knowing this, I worked on installing bash and binutils last night, and lo and behold, they were in /static on my main HD. So, I moved it to /mnt/lfs, and moved all the downloaded files to /mnt/lfs. now, things are kosher, I think.
Thanks again.
 
Old 05-03-2003, 07:29 PM   #4
undershepherd
Member
 
Registered: Feb 2003
Location: Iowa
Distribution: SUSE 9.2
Posts: 69

Original Poster
Rep: Reputation: 15
Well, I got stuck trying to do grep. I don't remember the error. I went back, and redid everything according to the pure LFS hints. Got to configuring gcc, and got this error:

"Configuring for a i686-pc-linux-gnu host.
Created "Makefile" in /mnt/lfs/Donwloads/gcc-build using "mt-frag"
../gcc-3.2.1/configure: line 7: gcc-s command not found
*** The command 'gcc-s -o conftest -O (that's letter "O" ?)2 -pipi -s conftest.c' failed
*** you must set the environment variable CC to a working compiler"

I have had no problems before this latest run, except while doing the binutils, I kept getting this statement, "-02 unrecognizable command"

Thanks for your help, whenever you get to it.
 
Old 05-04-2003, 06:05 PM   #5
PTBmilo
Member
 
Registered: Jan 2003
Posts: 167

Rep: Reputation: 30
aah yes.. the pleasures of lfs

That looks to me like something might have went screwey when you installed the gcc compiler. try this:

ldd $LFS/static/bin/gcc

That will list the shared libraries that your gcc binary is using. There shouldnt 't be anything there
(you go through all of ch.5 just so you can build all those utilities statically... that is... they don't use anything else)

if it looks something like this:
Code:
root@temple:/mnt/cdrom1# ldd /usr/bin/gcc
        libc.so.6 => /lib/libc.so.6 (0x4001f000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
then you gotta go back and do ch.5 again... sorry
(make sure that you do all of the appropriate '--enable-static' type stuff )

If that isn't the problem, the only other thing I can think of is that maybe you didn't delete your old source directory and start over with fesh sources (unpack a fresh <package>.tar.bz2 every time you compile)

.... All I could think of

good luck!

EDIT:
ps- put this line in your ~/.bash_profile so that the $LFS environment variable is always on:

export LFS=/mnt/lfs/


Last edited by PTBmilo; 05-04-2003 at 06:09 PM.
 
Old 05-04-2003, 08:57 PM   #6
undershepherd
Member
 
Registered: Feb 2003
Location: Iowa
Distribution: SUSE 9.2
Posts: 69

Original Poster
Rep: Reputation: 15
It didn't show anything. I may have not deleted all the directories. So, I guess it's back to the beginning. I was thinking of downloading the latest and greatest of all the files, instead of the ones suggested. I guess that might bring other problems. I'm not sure I'm ready for this, having been using Linux for 5 months. There is a lot I still don't understand. Me thinks me in over me head. All this enable and disable and nls and other stuff I have no idea of, and that means I am not ready for this.I read through BLFS, and it looks at the least daunting installing a GUI.
I'll keep learning, and come back to it. I want to thank you very much for your help.
Maybe I will take on recompiling a kernel.
 
Old 05-05-2003, 04:15 PM   #7
PTBmilo
Member
 
Registered: Jan 2003
Posts: 167

Rep: Reputation: 30
don't let the 'make error' get you down brotha'

With my experience in all this stuff, that's pretty much what it takes to figure it all out....

1) try to install
2) if install fails, learn from mistakes and go to #1
3) MONEY

you'll learn something new every time the GOD DAMM THING WON'T WORK... ooh sorry .. I mean...... you'll see

Last suggestion:

Download the tar file that has all of the packages in it (I think its lfs-packages<version>.tar). Get the same version that your book is. unpack the tar somewhere in $LFS (I use $LFS/usr/src/sources). unpack each package one-by-one as you build it, and delete (rm -r) the directory when you finish that package (keep the tar.bz2 file).

LFS is like boot camp... dirty, unforgiving hard work. when you graduate to BLFS, you'll be ready for whatever gets thrown at you (that's when the fun starts
 
Old 05-05-2003, 08:08 PM   #8
undershepherd
Member
 
Registered: Feb 2003
Location: Iowa
Distribution: SUSE 9.2
Posts: 69

Original Poster
Rep: Reputation: 15
OK you convinced me. along with the feeling that I had somehow failed. So, I downloaded the big tar ball and off we go.
STand by for advice asking
 
Old 05-10-2003, 09:00 AM   #9
undershepherd
Member
 
Registered: Feb 2003
Location: Iowa
Distribution: SUSE 9.2
Posts: 69

Original Poster
Rep: Reputation: 15
I have pretty much finished chapter 5, following it and trying to do the pure lfs alongside, that is, doing 4.1 as instructed, except where pure LFS has other instructions.
Now, pure LFS has instructions about installing kernel headers, glibc, tld and others. Which file is teh kernel headers?
Thanks
 
  


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
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM
QUERY: is LFS LFS? kevingpo Linux From Scratch 7 09-23-2005 12:15 PM
LFS-7.0-cross-lfs-20050902-x86_64-Multilib Basel Linux From Scratch 0 09-03-2005 05:03 AM
cannot login as user 'lfs' [su - lfs] mayasedai Linux From Scratch 2 07-26-2005 06:10 AM
LFS 3.2 book, but LFS packages 3.0 CragStar Linux From Scratch 2 04-07-2002 03:15 PM

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

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