LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 04-02-2003, 11:26 PM   #1
umd
LQ Newbie
 
Registered: Mar 2003
Posts: 24

Rep: Reputation: 15
Initial setup ..


A breif background , ... I've only been using linux for a few monthes but as stated many times this seems like the perfect thing to get to learn linux well and thurough ... anyways ... I've dnlded the 4.0 tar package with all .tar.bz2 files and ive already formatted a 5 gig partition, along side vector linux and set it up under /mnt/lds ...

I have started to compile items and most seem to be goin ok but I'm not sure I'm doing it correctly and would like to make sure, incase i should start over before i get to far along ...

1) Where exactly should I put the files that i dnlded?
Right now i have them in a dir under /root/lfspackages and have been doing it from there ....
I think i remember seeing somewhere to put those files in a directory somewhere in the /mnt dir but cant seem to find it in the 4.0 book and i've re-read the first 50 pages a few times already ...

2) when I get ready to install a package i cd into the dir and then start doing the specified commands ... is the basically right ?

3) prety much my final question is when i see something like
patch -Np1 -i ../findutils-4.1.patch

should i be in the /root/lfspackages directory ... (or the dir the packages are suppost to be in, or in the findutils dir?)
then the next line i have do doing in the packages respective dir ...
CPPFLAGS="-Dre_max_failures=re_max (exetera) ...ive been doing these in the /root/lfspackages/findutils-4.1 dir ...
is this correct ...?

4) I guess part of my last question is what does the ../ mean .. ? does it stand for the directory under current dir ...?

5) one of the main reason i ask this is i have looked in the /mnt/lfs/static dir and see nothing there ... I wasnt sure if th5is is suppost to be this way until chapter 6 or if everything is ok ....

any help would be appreciated ...




Thanx ... umd
 
Old 04-03-2003, 01:52 AM   #2
qulnxsh
Member
 
Registered: Mar 2003
Distribution: Debian Sid
Posts: 50

Rep: Reputation: 15
Hello,
I'll attempt to answer most of your questions:
1. If you have the sources under /root/lfspackages I assume you do most of the installation under a root account. This is not good at all. The ideal place to put those downloaded files is under /home or /usr/src, if you give normal users write premissions for the latter dir.
2. ./configure ; make ; su -c 'make install' does the trick most of the time. Try ./configure --help for options.
4. ../ means the immediate upper dir relative to the one you're currently in, say if you're in /home and issue cd ../, you'll move to /.
5. Maybe you didn't mount that partition??
Well, I guess that's all I can answer, hope it helped.
Bye
 
Old 04-03-2003, 02:09 AM   #3
umd
LQ Newbie
 
Registered: Mar 2003
Posts: 24

Original Poster
Rep: Reputation: 15
i think that probably answers it except for one thing ... dealing with the ../
say i moved the packages to the /home dir and start doing this again ...
for example the find-utilities

these are the 4 command lines for that package listed in the book...

patch -Np1 -i ../findutilis-4.1.patch

CPPFLAGS="-Dre_max_failures=re_max_faliures2" \
LDFLAGS="-static" ./configure --prefix=$LFS/static

make

make install

....... should these comands be executed in the /home/find-utils-4.1 directoryor in the /home dir ... or are certain ones in the /home and other commands in /home/find-utils ? Do i have to move the find.utils.patch .. into the find-utils dir or just from he /home ... i've been doing it from outside the find-utils .. for patch that is and it seems to work .... i think thats bascially it and thanx for the other post ...

Last edited by umd; 04-03-2003 at 02:10 AM.
 
Old 04-03-2003, 07:20 PM   #4
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 45
It lookes like you need some information about the file structure used by Linux.

The highest most possible directory you can have in Linux is / (called root) on its own. From / you have all your main sub directories (e.g. home usr root bin dev boot etc). The correct naming for these are /home /usr /root and so on.

If you were to use the ls -a command in a terminal (shell) this lists ALL the contents of the directory you are in, even hidden ones.

For example, when in your home directory you might see this:
Code:
.                              .gconf            .xinitrc
..                             .gconfd           .xinitrc.asc
.AbiSuite                      .gentoo-history   .xmms
.RealNetworks_RealMediaSDK_60  .gentoorc         Mail
.RealNetworks_RealPlayer_60    .gkrellm          bin
.RealNetworks_RealShared_00    .gnome            code
.Xauthority                    .gnome_private    doc
.acrobat                       .gnupg            downloads
Notice the . and .. on their own.

These are two special files created in EVERY directory.

The . refers to the current directory and the .. refers to the directory above, when in your home directory of /home/umd .. refers to /home.

So, when executing the 'patch' command in your last post, yes you should be in the directory of the source you are compiling (e.g. /home/umd/findutils-4.1) and the patch should be above it (e.g. /home/umd/findutilis-4.1.patch)

For all the packages in the book, as long as you are in the directory of the source you will be okay.

One question, you did create a separate partition, and mounted it correctly for a particular drive before compiling?

The reason why /mnt is used is because you create a folder in there called /mnt/lfs and mount a partition to it, thus installing LFS to drive space on the hard drive independant of the current distro.

qulnxsh is right about installing LFS in /root - it is a bad idea.

Last edited by CragStar; 04-03-2003 at 07:22 PM.
 
Old 04-03-2003, 07:38 PM   #5
umd
LQ Newbie
 
Registered: Mar 2003
Posts: 24

Original Poster
Rep: Reputation: 15
yes i created a 5 gig part hda4 and mounted it to /mnt/lfs
i thinkt thanx to you post i am doing it correctly, I just wanted to make sure before i spent 2 days compiling everything ... especially to find out i would be doing it in the wrong dir ... i started over though and just put everything in myy home dir and doing it as user not root, so i hope ill be ok ...

thanx for the reply ...
 
Old 04-04-2003, 07:48 AM   #6
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 45
No probs.

I'm still confused a little - are you compiling your sources in /mnt/lfs/static (I believe that is the directory used) or in /home/username?

If you mounted the partition to /mnt/lfs then you have to compile the sources in there - as that will become / when you chroot into the lfs environment and eventually boot into it when you finish compiling.

Also, the book (the last time I looked) recommended that you create a user called lfs and compile chapter 5 as that rather than your normal user account.
 
Old 04-04-2003, 04:18 PM   #7
iceman47
Senior Member
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
Quote:
Overwriting some files from your host system will most likely cause all kinds of problems, so it's a good idea to be logged in as an unprivileged user during Chapter 5.
 
Old 04-05-2003, 11:44 AM   #8
umd
LQ Newbie
 
Registered: Mar 2003
Posts: 24

Original Poster
Rep: Reputation: 15
yeah i screwed up big time in that one ... i was compiling everythin im my user dir as user lfs ... i got al the way to making a new file system ect ... and realized i had no files to then install...
i tried mounting my old sys under mount but i guess that command or the actuall devices werent in the new sys yet so it wouldnt let me do so ... HA ..anyways neadless to say im taking a break from compiling my new LFS system ... I think with what you pionted out this last time and the first time, that the next time i try installing it it should go much further ....
being as im mostly doing this to learn linux and its structure and commands better i really dont mind ... it just takes forever to type everything ....

1st is get networking to get dhcp ..

2nd thing i do when i get it set up is XF86Config and a window manager ...

thanx for your reply's ...helped me out bunches
 
Old 04-05-2003, 11:59 AM   #9
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 45
If your doing the compiling in X and have a browser window open at the same time as the console you can simply cut and paste the commands across. If you have a three button mouse (or one with a scroll wheel) then highlight the text you want to copy and press the middle button where you want to paste to.

But it looks as though you aren't.
 
Old 04-05-2003, 12:36 PM   #10
umd
LQ Newbie
 
Registered: Mar 2003
Posts: 24

Original Poster
Rep: Reputation: 15
Ive actually been doing it in both X and plain old term, but I see what you say about cut and pasting it. That prob would save alot of time.
I have 2 hard drives but only one computer, I think i need to by a spare celeron or k6 or something just to play with this distro and get it fully set up to include dhcp, X, java and all the rest.
My only radio is on this computer and i tell ya it gets anoying listening to myself singing because i have no tunes for a few days at a time ...
I think i saw somewhere that you caould 'ghost' or .iso a finished LFS system.. ganna look into that so i can build it on a crap computer then transfer it to this one ..

Other than that how cool it to say what distro you use and be able to say .. oh um my own ... he ,
by way of LFS of course ...
 
  


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
Suse 9.1 initial setup - video problem Drewmon Linux - Newbie 1 04-21-2005 06:18 AM
Mandrake 10 Official initial setup ..... help please linuxblues Mandriva 14 08-29-2004 02:59 AM
Installing Source after initial setup rustyz82 Linux - Software 3 05-14-2004 09:28 AM
Initial Linux setup TogaAssasin Linux - Newbie 6 04-09-2004 03:02 AM
Ximian initial setup problems ddrumguy Linux - Software 1 02-19-2003 03:38 AM


All times are GMT -5. The time now is 10:53 PM.

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