LinuxQuestions.org
Help answer threads with 0 replies.
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 08-19-2012, 09:07 PM   #1
bogaardesquat
LQ Newbie
 
Registered: Aug 2012
Posts: 10

Rep: Reputation: Disabled
as which user am i supposed to compile the programs?


Hi i just started reading the LFS book and did everything up until chapter 5 where the actual compiling begins. Im logged in in the terminal with the lfs user but how can i compile when there's nothing there or did i miss something? Do i simply need to compile with the host system username? Because then i can see the sources and tools folders.

sorry if this is a stupid question but i just always had problems reading english books, talking and writing is ok but i always seem to fade off reading in english since it's not my native language. Thats why i always read in small parts, e.g. a chapter now, break, next chapter. sorry for that.

so as what user do i need to comile then? because i thought the whole point of changing to the owner of the LFS filesystem would be to compile the programs in it so it wouldn't mess up the host system.

Thanks for the answers and sorry for the personal story hehe.
 
Old 08-19-2012, 09:08 PM   #2
bogaardesquat
LQ Newbie
 
Registered: Aug 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
patches

as well what do i do with the patches because i thought they would be tarballs as well but it's text? do i need to save it in a file?

Thanks
 
Old 08-19-2012, 10:11 PM   #3
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
Quote:
Originally Posted by bogaardesquat

Im logged in in the terminal with the lfs user but how can i compile when there's nothing there or did i miss something? Do i simply need to compile with the host system username? Because then i can see the sources and tools folders.
At this point, you should proceed while logged in to your terminal as the lfs user. The lfs user has the clean simple environment that you created for it in section 4.4. As the lfs user, the command env should output the environment variables that you established for user lfs in section 4.4.

As the lfs user, the command echo $LFS should output /mnt/lfs.

Your new partition for the system has been mounted at /mnt/lfs, and you have created the directories /mnt/lfs/sources and /mnt/lfs/tools.

As the lfs user, you should be able to list the contents of /mnt/lfs/sources and see your tarballs and patches listed.

Quote:
Originally Posted by bogaardesquat

...what do i do with the patches ...
The patches should be in /mnt/lfs/sources with the tarballs. The commands in the book deal with the patches. You only need to follow the directions.

Last edited by stoat; 08-19-2012 at 10:53 PM.
 
Old 08-19-2012, 10:57 PM   #4
bogaardesquat
LQ Newbie
 
Registered: Aug 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
just re-did the whole thing

Ok so i just repeated every step from making a ext3 filesystem on the drive to creating the user and logging in to this last step source ~/.bash_profile and still when i wanna cd to the sources directory it's not possible, it says the folder doesnt exit.
When i ls there's nothing there as well except for . .. .bash_history .bash_profile .bashrc.
I really don't get what i'm doing wrong, i even copied the commands this time to be sure i didn't make any typos.

Help please.
 
Old 08-19-2012, 11:35 PM   #5
bogaardesquat
LQ Newbie
 
Registered: Aug 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
can someone please help me?

i just did all the steps again for the third time now. The only step i can't do is this one because i don't know where the md5sum file is:

pushd $LFS/sources
md5sum -c md5sums
popd

when i'm in the chroot with the lfs user and do ls -a i only get this

. .. .bash_history .bash_profile .bashrc.

that's it no sources or tools folder so i can't compile with lfs user.

i can get to sources by doing this:

cd /mnt/lfs/sources

but if i would follow the book and do:

mkdir -v ../binutils-build
cd ../binutils-build

doesn't that mean i'm compiling out of the chroot environment?
also i don't have the permissions to do that as well although i followed chmod steps.

i really don't get what im doing wrong, im not an idiot with compiling and such
just never did stuff in a chroot environment.

can someone please help me im a bit desperate cause i really wanna do this cause it seems like a nice project to learn and till now it hasn't been a succes
 
Old 08-20-2012, 01:37 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 bogaardesquat View Post
The only step i can't do is this one because i don't know where the md5sum file is:

pushd $LFS/sources
md5sum -c md5sums
popd
Then you did not follow the instructions in the book. Quote from chapter 3.1
Quote:
Additionally, starting with LFS-7.0, there is a separate file, md5sums, can be used to verify that all the correct packages are available before proceeding. Place that file in $LFS/sources


Quote:
Originally Posted by bogaardesquat View Post
but if i would follow the book and do:

mkdir -v ../binutils-build
cd ../binutils-build
You did not follow the book. Re-read this chapter, especially the second important box: http://www.linuxfromscratch.org/lfs/...tructions.html


I do hope you already made your host compliant to build LFS (http://www.linuxfromscratch.org/lfs/.../hostreqs.html)
 
Old 08-20-2012, 08:55 AM   #7
bogaardesquat
LQ Newbie
 
Registered: Aug 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
i made a wget-list

I made a wget list myself because i couldnt find the md5sum file.
I downloaded every packet manually and found out some links aren't really there anymore,
so i looked for them my self and made a wget-list just to follow the steps. I just don't get where this md5sum is. Is it the wget list you just gave me then?

My host is prepared and everything.
Just that md5sum step i couldn't figure out i even googled it, couldn't find it that's why i came here.

Can i use my own wget-list then as the md5sum file? because i know for sure that that list works.
 
Old 08-20-2012, 09:03 AM   #8
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
The md5sum file and the wget-list file are both in the same place where you got the book pdf file. Here...
http://www.linuxfromscratch.org/lfs/downloads/stable/
bogaardesquat,

I don't mean to pile on here, but IMO nothing is wrong according to what you wrote in post #5.

First, you are not in the chroot environment yet (stop saying that you are). Logging in to the terminal as the lfs user is not the chroot environment. That comes much later on. For now, you will be working simply as the lfs user in your host system. At this point you are compiling in your host system's environment as the lfs user. The things you compile at this time will be written to the /mnt/lfs/tools directory. You will be building merely the temporary system to be used later to build the actual LFS system. Then you will enter the chroot environment and begin the process of distancing yourself from the host system and building the final system.

Next, when you log in to your terminal as the lfs user and run ls, you are not supposed to see /sources and /tools. Those are not in the /home directory of the lfs user. Those are in /mnt/lfs. That is why you can see them when you change directories to /mnt/lfs. The $LFS environment variable insures that those directories are properly accessed and written to during the book's steps. That is why the book repeatedly asks us to confirm the $LFS environment variable.

So when you arrive at 5.4.1, as the lfs user untar the binutils tarball, change directories down into /binutils-2.22 that was created by the untarring, and continue on with the book's steps exactly as written and without doing anything not stated by the book.

Quote:
Originally Posted by bogaardesquat

i really don't get what im doing wrong, im not an idiot with compiling and such
just never did stuff in a chroot environment.
No, you're not an idiot. But here is what you are doing wrong (important)... You are thinking too much, and that is making you not follow the steps in the book faithfully (by that I mean trust it, it's right).

Last edited by stoat; 08-20-2012 at 03:55 PM.
 
Old 08-21-2012, 10:25 AM   #9
bogaardesquat
LQ Newbie
 
Registered: Aug 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
starting over today just some questions

Ok im gonna start with a clean slate today i even reinstalled (Debian Squeeze) to be a 100% clean before starting.
Just one last question when i started before i just installed the needed packages from te repository. some where the same version others where a bit newer. Does that matter because somethimes there is a version given but then it says: Versions greater than ... are not recommended as they have not been tested.

Also should i compile the proposed kernel image cause squeeze come with a version that is a bit later.

sorry for all the questions, i just wanna make this work so it slims down the chance of having errors in the process.

And your right about overthinking everything i guess that's because i really want to understand what im doing.

Thanks for all the great advice people
 
Old 08-21-2012, 10:55 AM   #10
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
From my own experience: Debian Squeeze, when made compliant, is a suitable host for LFS 7.1.

Do compile the kernel, using one from another distro (be it Debian, Ubuntu or other) will not work.
 
Old 08-21-2012, 01:09 PM   #11
bogaardesquat
LQ Newbie
 
Registered: Aug 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
I think im ready to go

Ok thanx i installed all repo packages gonna compile the kernel now, i guess i can mark this as solved.

Thank u very much everyone.
 
  


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
How exactly am I supposed to mount as a normal user? Virchanza Linux - General 5 10-21-2009 08:00 PM
how should i compile c programs?? vbnandu86 Fedora 3 09-01-2006 07:15 AM
Kdevelop saying I can't compile C++ programs tmchardy Programming 6 03-08-2006 08:45 PM
cannot compile c programs umeshpandey007 Linux - Newbie 7 08-29-2005 09:19 PM
compile programs in c and cpp Manjula.S Linux - Software 2 10-15-2003 01:06 AM

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

All times are GMT -5. The time now is 06:17 AM.

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