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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I wanted to know about one thing, its really puzzling me. What if I build my 'own' Linux distro using LFS, then will I be able to install it on oither PCs without going through these hectic steps ??? What I actually want is to build my own Linux distro that I can burn to a CD and install at other places (e.g. RH, Mandrake etc) ?Is it possible vis LFS ? Any help in this area ???????????
I think you misunderstand what LFS is about. Linux From Scratch is for people who want to learn how Linux works. It's about education. Sure, you end up with a system that's superbly tuned to run on your computer in exactly the way you want but that's because you understand how everything works. So "putting in efforts for LFS will go waste", is just nonesense. By doing LFS you learn from the process and education is never a waste.
If you want a system for installing Linux use Gentoo or Debian or Slack or something
I must admit that I tried what decentpakistani wants to do and I must say that i will probably work for machines of the same type, I mean if LFS was builded on a i686 machine, pentium pro, p2, p3, p4 or k7, it should work on other i686 machines but not on a machine that is a i586, pentium, pentium mmx, k5, k6, k6-2, k6-3, etc.
I built my 5.0 on a k7 and when I tried to get it to work on a k6-2, it hanged during bootup.
I searched for the cause of my problem at that time and that was what I was told.
Tat's what I did. I tar-ed my whole filesystem into one file that I burned on CD's. So when disaster happens, I'll be able to untar my LFS system from those files to newly formated ext3 filesystem. I allready tried and this works.
As far as I know, the theory is that you create a bootable system, which you stick in a cramfs compressed, read-only file-system and burn that onto a CD. Among other things, it should mount any directories that need to be writable (var,home...) as ramdisk partitions.
What else you need depends on what assumptions you want to make about hardware. You'll probably want kernel modules for at least the video and probably the sound hardware on your friends' machines. Chances are that their machines are much like yours but some things will need configuring after bootup - most notably networking. This can be done manually or using some form of auto-detection.
If you've done BLFS, you should have more than one CD's worth of data. Non-install-critical stuff can be put on seperate CDs and just cp'd across. Alternatively you could use RPM or DPKG to package each program for easy installation.
I ended up making a tar.bz2 of my LFS and then burned it onto a gentoo basic cd via multisession. There was just enough room to do so. That way, you don't have to have linux on the target machine at all. I also added FIPS as well.... Works really nice. FIPS to resize winblows, cfdisk to make partition, built in mkfs utilities to format, mount partition, tar -xjf, edit fstab and run grub.... Just takes a couple minutes.... I think thats about the closest anyone is going to come to creating an install disk for LFS..... Not unless your really smart and have ALOT of time on your hands....
And I've installed my LFS onto multiple machines before.... It works just fine... I built it on a P4 3ghz... Obviously it's not going to run on and old computer. But within reason, yes, It runs just fine on other computers...
It all depends on how you define distribution and install. Do you consider compiling a kernel as part of an install? Can it be considered a distribution if you have to do this? If a user has to manually partition and format drives, does this count as a distribution or a decent install? If an install prompts you for information on your hardware like "how many partitions do you have on hda?", does that count? Does it have to account for loads of different types of processor? Should the user have to do any configuration? If so, how much is acceptble? etc etc etc.
If you created a bootable CD with the tool chain on it and then built the remaining packages onto a hardrive partition... would you consider that a distro...
All linuxes are just files installed in the right place (you hope) and programs run at the right time (you hope). It is only what files are installed and the scripts/executables that deal with package management, installation and act as a front end to some other software that are really any different between different distributions. The core of it all is the same.
FWIW, I am working on creating my own binary installable distro.
I have written my own package management system which is just a simple-ish shell script, a file format which contains package information and a directory where these files are stored.
I have my own version of LFS using the most recent stable versions of source packages e.g. binutils 2.15, glibc 2.3.2 etc (still using GCC 3.3.3 but I am upgrading that to 3.4.1 in the test build I aim to do this week) etc which I build using ALFS.
I have just finished the AFLS XML for my own BLFS type affair which is based on a xfce4/rox GUI front end rather than the overly flabby gnome & kde.
I am working on automating the whole build so I can kick it off with ALFS, go away on holiday for the weekend (it takes about 12 hours to build LFS and I would guess about 15-20 hours for BLFS on my C2K) and have the packages waiting for me when I get back. The only stubling block on this so far is how to dynamically determine using some sort of 'intelligence' which files belong in in a which type package e.g. bin/progs, dev, libs etc. This should be possible, but I haven't had enough thinking time. If I was to settle for containing everything built from one source package in one binary package or have lists of files to work from during the build process it would be easy - I want 'intelligence' to cut down the work if I upgrade or add a package.
Then all I will have to do is create a bootable cd, a/some shell script/s to install it all and burn it to cd. All of which should be trivial.
Anyway... enough of my rambling... to answer decentpakistani, it is possible and it is not that hard. It is just time consuming. However, I have learned so much so far that the whole process has and will be very useful, so even if I never get around to finishing it, it will all have been worthwhile IMO - if only because I now know sed and awk pretty well.
I'm currently working on my Linux From Scratch build and i was wondering what some of these other people have been. Is there a how-to on making a boot cd that boots into an installer to partition the harddrive and un-tar the build from many cds to make a complete system incase something does happen. I wanted to have the base system on cd 1 ( no gui ) , cd 2 ( x-windows, libs like alsa,etc ),cd 3 (kde, gnome, wine already setup, etc) if so i would like to have the stuff tar-ed before i start the next steps in building my system. I have a friend that would like to try my build after I am done and his hardware is almost the same. AMD XP, VIA mobo. I was going to build a general kernel for all hardware types with the i686 format. I could use any help I could get even if it what you did to make your lfs personal cds for disaster cases. Thank you for the help.
The LiveCD is a pretty impressive example of what can be done, and you can actually copy a lot of things from that, since it's an LFS installation.
I don't know that we need "yet another distro," but the LFS-topic "How to build a distro of LFS in 129.3 easy steps" would certainly be a well-appreciated topic ... just as, say, ALFS was.
In LFS, we've already seen "how a minimal Linux distribution is built." BLFS takes on the task of filling-in the pieces. It would certainly be nice for there to be yet-another layer of knowledge built up along the same lines... "how to build your own distro." (Shall we call it "DLFS?")
The topic is actually pretty darned important, because if you are working in a business setting, as soon as you have built the Linux You Want, the problem remains of how to install that onto X-hundred machines. Commercial distros such as Red Hat provide tools like KickStart for problems similar to these, but they have their limitations. I'm sure that "Distro LFS" would be very, very popular as well as useful.