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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-08-2006, 09:38 PM
|
#1
|
Member
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160
Rep:
|
Why toolchain and chroot??
why do i have to build a toolchain and chroot into it??
why not just compile everything and dump it into a partition and then boot into it??
if i typed something noob... please bear with me... i am new to lfs although i use ubuntu linux in my pc....
Thank you...

|
|
|
04-08-2006, 10:06 PM
|
#2
|
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577
Rep:
|
LFS is a time tested distro, everything is done in a specific order for a reason.....the best thing to do is read the LFS book completely first before starting to build it........
the toolchain is needed to create a "clean" environment in order to compile the needed programs so that the host system and its files don't become........"hosed" IF you don't build LFS as set in the book.....your host system can/will become un-usable!!!
chroot comes in to play later in the process because only "root" can create and set the permissions of the new filesystem that will become LFS.......
|
|
|
04-08-2006, 10:49 PM
|
#3
|
Member
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160
Original Poster
Rep:
|
what is "clean" environment??
and why "clean" environment??
cant i just.... compile everything into a partition then the kernel... then boot it??
why can't i??
sorry... been asking kinda weird questions... because i just don't want to follow EXACTLY the book... i want to work things MY way...
just like the author of LFS....
Thank you.... again....
|
|
|
04-09-2006, 01:22 PM
|
#4
|
Senior Member
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
|
You can. But LFS has its reasons to advise the chroot-way. Some are ideological, some - techical (if you succeed up to some step you are guranteed to have clean - e.g. predictable and sometimes reliable - environment)
|
|
|
04-09-2006, 02:49 PM
|
#5
|
Member
Registered: Mar 2003
Distribution: FreeBSD 6.1, NetBSD 3.0.1
Posts: 170
Rep:
|
Quote:
Originally Posted by ghostdev85
cant i just.... compile everything into a partition then the kernel... then boot it??
|
That would be a very interesting approach, and less painful. I myself have been wondering about how to do that. The way LFS is built; build some minimum temporary tools, chroot in, use those tools to build the system- is a zig zagged approach. I don't know why someone hasn't yet figured how to work out the excuse that if your approach is used, they system becomes "tainted" with ownership issues. I think if your approach is worked out, it would be straightforward and take less effort and time.
I remember a while ago, I tried a distro named RubyX. There were different ways to install it. One way I managed to install it was; download a *.bz2 file of the distro, untar it into the intended partition, configure some files (/etc/fstab, menu.lst), and it worked successfully.
Hopefully, someone will come up with a new way to build LFS.
|
|
|
04-09-2006, 09:03 PM
|
#6
|
Member
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160
Original Poster
Rep:
|
Yea
Totally agree....
By the way, based on the tldp howto, the /bin /sbin /lib directory...
i should just compile and dump everything into those directory is it??
I will try that out when i have my holiday...
and IF it works... i will make a post containing my work....

Last edited by thloh85; 04-09-2006 at 09:04 PM.
|
|
|
04-11-2006, 02:13 AM
|
#7
|
Member
Registered: Oct 2005
Location: Rezekne, Latvia
Distribution: LFS
Posts: 38
Rep:
|
As far as I understand this toolchain is kinda like building a house in a strange way:
at first you have the fundament (the host OS or LiveCD). You do not know what is this fundament made of, maybe it is made out of pizza (  ), but you need a stable rock. So you use this "pizza fundament" to replace it bit by bit with your own rocks (the toolchain). And when you are sure that you have a rock stable fundament, you start building the house (the final LFS build) on it. The comparison sounds silly but I have nothing better on my mind, sorry 
Your approach to build everything at once is good only if you have the rock stable fundament at the very beginning. Than of course it is a bit strange to replace it again with the same rocks.
So if you have built LFS once you do not need the toolchain anymore - you have the rock fundament, you can build everything from this first LFS (but I am pretty sure that you'll just make a copy of it and tweak it to match your new desires, not build again from scratch).
Good luck!
P.S. Yesterday I finished my first LFS 6.1.1. What a relief! Booted OK. Who said that LFS is not for newbies? I had only a month reading (not using) Linux experience before I started building it. And I built it on VMWare Workstation.
|
|
|
04-11-2006, 02:26 AM
|
#8
|
Member
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160
Original Poster
Rep:
|
...
Thank you for your post...
But my vague toward why LFS have to be built that way is still there...
I will try my approach within the next two months(hope i have the time)...
I disagree with you... LFS is NOT for newbiews... 
Last edited by thloh85; 04-11-2006 at 02:34 AM.
|
|
|
04-11-2006, 02:46 AM
|
#9
|
Member
Registered: Oct 2005
Location: Rezekne, Latvia
Distribution: LFS
Posts: 38
Rep:
|
Here is a different approach:
How To Build a Minimal Linux System from Source Code
OK, LFS is not for a TOTAL newbie. At least some basic knowledge about how to startx, enter commands in console and untar packages is needed. But that can be learned while building. Of couse there will be more mistakes than for someone who has a great esperience.
|
|
|
04-11-2006, 04:56 AM
|
#10
|
Member
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160
Original Poster
Rep:
|
Thank you very much...
I am not newbie... I built LFS...
BUT...
I don't like the way it works... EVERYTHING is from the book...
I want to learn linux... NOT to learn how to follow instruction from a book...

Thanks ... and peace
|
|
|
04-11-2006, 02:10 PM
|
#11
|
Senior Member
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
|
I use Automated SVN version. Automated enough not to bore me much,
and buggy enough to be challenging and provide learning opportunities.
And of course, everything past that - by hand, not by Beyond.
|
|
|
04-11-2006, 03:04 PM
|
#12
|
LQ Newbie
Registered: Apr 2006
Distribution: Ubuntu, LFS
Posts: 11
Rep:
|
Midiox, how long did it take before you finished LFS?
I wonder if you had as much trouble as I'm having(just from what's going on in the other thread). Lol. So far though, I have learned QUITE a bit from doing this project....(even if I still have ways to go).
|
|
|
04-11-2006, 08:41 PM
|
#13
|
Member
Registered: Mar 2003
Distribution: FreeBSD 6.1, NetBSD 3.0.1
Posts: 170
Rep:
|
Quote:
Originally Posted by midiox
|
I have tried that approach a number of times some years ago; I didn't succeed.
|
|
|
04-11-2006, 09:17 PM
|
#14
|
Member
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160
Original Poster
Rep:
|
Oh yes?
Um.... Nevermind...
I will try it out...

|
|
|
All times are GMT -5. The time now is 09:00 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|