LinuxQuestions.org
Visit Jeremy's Blog.
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-08-2006, 09:38 PM   #1
thloh85
Member
 
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160

Rep: Reputation: 31
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...
 
Old 04-08-2006, 10:06 PM   #2
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
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.......
 
Old 04-08-2006, 10:49 PM   #3
thloh85
Member
 
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160

Original Poster
Rep: Reputation: 31
Unhappy

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....
 
Old 04-09-2006, 01:22 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
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)
 
Old 04-09-2006, 02:49 PM   #5
Tuvok
Member
 
Registered: Mar 2003
Distribution: FreeBSD 6.1, NetBSD 3.0.1
Posts: 170

Rep: Reputation: 30
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.
 
Old 04-09-2006, 09:03 PM   #6
thloh85
Member
 
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160

Original Poster
Rep: Reputation: 31
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.
 
Old 04-11-2006, 02:13 AM   #7
midiox
Member
 
Registered: Oct 2005
Location: Rezekne, Latvia
Distribution: LFS
Posts: 38

Rep: Reputation: 15
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.
 
Old 04-11-2006, 02:26 AM   #8
thloh85
Member
 
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160

Original Poster
Rep: Reputation: 31
...
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.
 
Old 04-11-2006, 02:46 AM   #9
midiox
Member
 
Registered: Oct 2005
Location: Rezekne, Latvia
Distribution: LFS
Posts: 38

Rep: Reputation: 15
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.
 
Old 04-11-2006, 04:56 AM   #10
thloh85
Member
 
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160

Original Poster
Rep: Reputation: 31
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
 
Old 04-11-2006, 02:10 PM   #11
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
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.
 
Old 04-11-2006, 03:04 PM   #12
Chereb
LQ Newbie
 
Registered: Apr 2006
Distribution: Ubuntu, LFS
Posts: 11

Rep: Reputation: 0
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).
 
Old 04-11-2006, 08:41 PM   #13
Tuvok
Member
 
Registered: Mar 2003
Distribution: FreeBSD 6.1, NetBSD 3.0.1
Posts: 170

Rep: Reputation: 30
Quote:
Originally Posted by midiox

I have tried that approach a number of times some years ago; I didn't succeed.
 
Old 04-11-2006, 09:17 PM   #14
thloh85
Member
 
Registered: Apr 2006
Location: Earth
Distribution: BLFS customized
Posts: 160

Original Poster
Rep: Reputation: 31
Oh yes?
Um.... Nevermind...
I will try it out...
 
  


Reply

Tags
chroot, toolchain


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
Broken toolchain Camino Slackware 9 11-22-2005 09:38 AM
ARM Toolchain Problem richardji Linux - General 2 08-08-2005 10:24 PM
Held on 5.9. Adjusting the Toolchain satimis Linux From Scratch 2 06-30-2005 06:36 AM
toolchain-funcs.eclass doralsoral Linux - Software 2 05-17-2005 06:54 AM
6.12. Re-adjusting the Toolchain jobesd Linux From Scratch 2 01-16-2005 01:50 PM

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

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