Linux From ScratchThis 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.
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.
I have some problems when trying to build LFS 6.2.
I have read the book to Chapter 5, I have add the user (lfs), and also the sources and tools dirs. But I'm stuck on the "installation of binutils" section.
As a note: On the typography section, I remembered that a bold fixed-width text should be considered as an instruction to the reader to types the text exactly as it seen. Right?
And back to the problem, the 5.3.1 section told me to type:
mkdir -v ../binutils-build
cd ../binutils-build
My questions is..
1. Where should I do that? (it says that the Binutils documentation recommends the building process to be done outside the source directory) Is it on the $LFS/tools ? And using which user? Is it lfs (as previously recommended in the book)? or as a root?
2. And, please excuse me for being dumb, do I have to change "binutils-build" to "binutils-2.16.1"?
3. As I use VectorLinux as a host (and a KDE in it), can I just use Ark to unpack the package so I'm be able to configure it afterwards?
I'm very very confused here.. The book didn't show me how to unpack the packages and where to unpacked it.
1. The LFS book presumes that you have unpacked the tarball and cd'd into the source directory. Just like the book says
Quote:
Before issuing the build instructions for a package, the package should be unpacked as user lfs, and a cd into the created directory should be performed.
In this case, you should be in the /mnt/lfs/sources/binutils-2.16.1 directory as referenced from your host system. If the book tells you to do something as root, do it as root. If the book tells you to do somethings as lfs, do it as lfs.
2. Why would you change "binutils-build" to "binutils-2.16.1"? The book tells you to mkdir -v binutils-build. The directory binutils-2.16.1 is the source directory and that's not where you're supposed to be building binutils.
3. If you need to use GUI tools to install LFS, you probably shouldn't be installing LFS. I suppose you could use ARK, but why would you. To unpack a tarball ending with .tar.gz
Code:
tar xzf <tarball_name>.tar.gz
To unpack a tarball ending with .tar.bz2
Code:
tar xjf <tarball_name>.tar.bz2
Last edited by weibullguy; 10-04-2006 at 01:40 PM.
Hello,
Iam fairly new to lfs but I know what you are talking about because I had the same problem.
The book could have been a little more specific at the begining insted of presuming you know everything.
"Before issuing the build instructions for a package, the package should be unpacked as user lfs," (into /mnt/lfs/sources )I added the part in ()that I
think should have been in the book
So I belive that statement is incorrect
"In this case, you should be in the /mnt/lfs/tools/binutils-2.16.1"
It should be /mnt/lfs/sources/binutils-2.16.1
So after you are in that directory you can resume from the book with the mkdir command
As to question 3 I don't know but I would'nt sugest deviating from the book
unless you know exactly what you are doing
1. The Booksays (implies) you build all your packages in /mnt/lfs/sources. However, you can build it wherever you like to. Just watch the disk size and make sure everithing gets into /mnt/lfs/tools. That's it.
2. The Book says
Quote:
The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build directory
So just create that /mnt/lfs/sources/binutils-build directory and "cd" into it. No need to rename. However, you can name the build directory the way you like to.
3. The Book says "tar -xvf". You can use you preferred archiving utility, but you will have to change the permissions "chown -rv lfs:lfs /mnt/lfs/sources/binutils-version-number". That's what I did. If I were to repeat that stage, I'd follow the book (and I'd build it in console mode).
Good luck!!!
Last edited by Vitalie Ciubotaru; 10-04-2006 at 12:15 PM.
The book could have been a little more specific at the begining insted of presuming you know everything.
That's not the point. It's really not intended for a newcomer. An excerpt from the prerequisites section of the CLFS book (says the same thing in the LFS book).
Quote:
Building a CLFS system is not a simple task. It requires a certain level of existing knowledge of Unix system administration in order to resolve problems, and correctly execute the commands listed. In particular, as an absolute minimum, the reader should already have the ability to use the command line (shell) to copy or move files and directories, list directory and file contents, and change the current directory. It is also expected that the reader has a reasonable knowledge of using and installing Linux software.
Hello,
"you can build it wherever you like to. Just watch the disk size "
I would not advise that, especially to a newcomer.
I learned that the hard way when I was getting out of memory errors because
I did just that.
"It's really not intended for a newcomer."
Maybe not but it doesn't mean you can't even give it a try.
I look at it as an oportunity to learn something new.
"In particular, as an absolute minimum, the reader should already have the ability to use the command line (shell) to copy or move files and directories, list directory and file contents, and change the current directory."
That is true.
"It is also expected that the reader has a reasonable knowledge of using and installing Linux software."
I am not so sure about that.
Installing linux and using it especially with th gui does not give you any
special knowledge in building linux from scratch
Maybe not but it doesn't mean you can't even give it a try.
I look at it as an oportunity to learn something new.
Sure, have at it, but the book shouldn't be written for newcomers because it's not intended for newcomers. It's pretty clear if you read it where you're supposed to be.
Quote:
Originally Posted by status1
Installing linux and using it especially with th gui does not give you any special knowledge in building linux from scratch
Your comment is in reference to a quote from the book. The authors of the book have every right to expect whatever they want of the reader. They expect the reader to have some experience building and installing *nix software from a CLI.
Hello,
No arguments there.
It's just my opinion that with a just few hints and tips even a newcomer with a reasonable small experience should be able to follow the book.
No matter. We newcomers just have to learn the hard way.
Come on, guys, is this the way you're helping bitrux?
If a newbie [like me or bitrux] wants to build a LFS system, why not say "Good, keep on moving! If you have questions we arehere to help you." What you are saying is "The book is not for newbies. It requires a certain level of ... etc."
It is for newbies! Probably the best way of learning is to learn by doing!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.