LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   In praise of Linux From Scratch (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/in-praise-of-linux-from-scratch-504279/)

vasudevadas 11-23-2006 01:26 PM

In praise of Linux From Scratch
 
LFS is not a distro - it is a cookbook recipe for installing Linux yourself, from the individual source packages.

Sounds like a lot of work? It surely is - it took me three days just to get my computer into a state where it could boot itself? But is it fun? Heck YEAH!!

Okay, but it sounds difficult, right? Actually you'd be surprised. I had more trouble once trying to install Gentoo. The instructions are very clear, and if you follow them exactly you shouldn't have many problems. The couple of problems I did encounter I quickly found solutions to by searching the LFS mailing lists. No need to ask myself.

The hardest part is the size of the job; there are so many steps to be followed. And it is a lot of compiling - you have to compile gcc and binutils three times, and glibc twice, before you can even make your first boot. But it is very satisfying. Better still, it teaches you so much about your Linux system. You really get an appreciation for the different contributions that go into a working Linux system. Best of all, at the end of it you really feel as if you own your computer. You only get the software installed that you really want. My laptop boots to a console login in a fraction of the time it did before with ANY distro!

There is a live CD you can download which includes a set of tools that are known to work that enable you to build your initial toolset. It also includes copies of all the source packages needed for the basic system, so you don't have to go and collect them all yourself.

Going on from there, there is also "Beyond Linux From Scratch" which gives you instructions on how to add a great variety of applications to your system.

I just did it, and it totally rocks! If you're interested, check it out: http://www.linuxfromscratch.org

Edit: LFS is the only thing better than Slackware! :D

johngreenwood 11-24-2006 01:53 AM

I know exactly what you mean, when I started messing with Linux From Scratch, I found it to be a very educational process, and a lot of fun too. Also, when I tried to install Gentoo, I just couldn't do it, there were times when my CD drive 'forgot' what it was doing and sat idle for hours, I went to sleep, woke up, and it was on the exact same part as when I left it. I installed Slackware 11 instead, and my computer and I are very happy indeed.

vasudevadas 11-24-2006 02:41 AM

When I tried to install Gentoo once, we managed to get the system to boot eventually, but when I tried to do "emerge kde" it failed on a compilation error. I thought, that isn't supposed to happen, and gave up.

By contrast, I got KDE working on LFS without a hitch. Go figure.

duryodhan 11-24-2006 03:40 AM

I have heard abt LFS a lot. I had some basic questions about how it works and as you seem to have just done it could you pls tell me the answers

> What are the prerequisites for LFS? My main concern is how much I have to download? Cos I am behind this stupid university firewall with 10MB download limit. I can ofcourse download from other places which I will for LFS. But is it like everytime in between setting up LFS I have to download something new. Or is there a list of softwares that is there on LFS site that I can download before even starting with LFS and then won't need to download anything else until I go to the "Beyond LFS" part?

> I am really "petrified" by you saying "i wasn't able to boot for 3 days". I run Slack 11 on my comp. Can LFS, coexist with Slack 11, during the time I am compiling everything, the "LFS won't boot" time. If during the time I try to compile and make LFS work, I need to check my mail urgent , can I restart then Check Mail in Slack and then get back to LFs by restarting again?

> Are the LFS forums as good as the LQ forums?

I know the questions aren't that clear but it was the best I could do, as I am very dense regarding LFS.

Daws 11-24-2006 04:21 AM

Quote:

Originally Posted by duryodhan
What are the prerequisites for LFS?

The prerequisites and host requirements are all listed in the preface of the book.

Quote:

Originally Posted by duryodhan
My main concern is how much I have to download? Cos I am behind this stupid university firewall with 10MB download limit. I can ofcourse download from other places which I will for LFS. But is it like everytime in between setting up LFS I have to download something new. Or is there a list of softwares that is there on LFS site that I can download before even starting with LFS and then won't need to download anything else until I go to the "Beyond LFS" part?

Again all in the book. For current stable the total size of packages is about 180MB, development is 191MB, and yes you are expected to download all packages and patches before cracking on with the building.

Quote:

Originally Posted by duryodhan
I am really "petrified" by you saying "i wasn't able to boot for 3 days". I run Slack 11 on my comp. Can LFS, coexist with Slack 11, during the time I am compiling everything, the "LFS won't boot" time. If during the time I try to compile and make LFS work, I need to check my mail urgent , can I restart then Check Mail in Slack and then get back to LFs by restarting again?

It should be fine until chapter 8, right at the very end where you put grub on the mbr. If you were really worried it might be sensible to ignore all grub steps in the book and use your existing bootloader to boot lfs. This way you can be sure that Slack will always boot.

Quote:

Originally Posted by duryodhan
Are the LFS forums as good as the LQ forums?

I have never been to the LFS forums but the mailing lists are worth a look, they really know what they are doing there.

XavierP 11-24-2006 05:10 AM

Moved: This thread is more suitable in Success Stories and has been moved accordingly to help your thread/question get the exposure it deserves.

vasudevadas 11-24-2006 08:31 AM

Quote:

I am really "petrified" by you saying "i wasn't able to boot for 3 days". I run Slack 11 on my comp. Can LFS, coexist with Slack 11, during the time I am compiling everything, the "LFS won't boot" time. If during the time I try to compile and make LFS work, I need to check my mail urgent , can I restart then Check Mail in Slack and then get back to LFs by restarting again?
The reason I couldn't boot was because I completely cleaned my machine before I started, beginning from a wiped hard disc. Therefore I used the live cd to boot from in order to build the initial tools, which I used then to build the system after chroot-ing into the mounted partition.

A less hairy approach would be to build LFS into a new partition in a machine with an existing Linux installation. The only prerequisite is that your existing Linux installation should have tools (gcc, etc) that are up to the job. If you are using a sensible distro like Slackware I expect you would have no difficulty.

This way you can happily compile away without ever screwing up your system - the only time when you have to take a leap of faith is when you come to install the bootloader. However, as the previous poster said, you could always skip this step and instead configure your existing Lilo/Grub to boot your new partition as well. This way there would be no danger - even if you totally fsck up the LFS installation, your existing installation will be unaffected.

And yes, you can reboot into Slack to check your mail. In fact you don't even have to leave Slack - a chroot-ed session in a Konsole window is all you need, leaving your existing system up and running.

vasudevadas 11-24-2006 08:36 AM

Quote:

Are the LFS forums as good as the LQ forums?
Dunno, I never posted to them. I never had to - a quick Google search on my problems took me to the posts in the lists that solved my problems.

That of itself is a good sign, of course. :)

f76 12-23-2006 11:16 AM

Quote:

Originally Posted by vasudevadas
And yes, you can reboot into Slack to check your mail. In fact you don't even have to leave Slack - a chroot-ed session in a Konsole window is all you need, leaving your existing system up and running.

I dont get this! U mean if i run the lfs on another cpu/pc right?

f76 12-23-2006 01:24 PM

Forget that. I just read about chroot.


All times are GMT -5. The time now is 03:52 AM.