Some of you may know that I am an advocate of Free Software. Linux has been my primary OS for over 10 years now, which means that I still remember kernel 2.2, KDE 1 and a time where getting your sound working required recompiling the kernel. And I can honestly say that Free Software offers everything I need for my job and my hobbies, which includes tasks like programming, testing systems in virtual machines, some graphics and sound editing and also a couple of games.

I have started using Linux with Suse Linux 6.2, and have pretty much right from the start compiled all additional software from source. As time went by my base system became a bit dated, which caused me to reduce the installation to the bare minimum to get a running system, and compiled the rest.
I’m possibly the only person who has used KDE 3 and a 2.6 kernel on Suse 6.2.

At a certain point even the most basic parts of my system just didn’t cut it anymore and I tried to replace GLibC, which resulted in an unbootable system. So I decided to take this opportunity to learn more about what makes up a Linux system and started building my first Linux From Scratch.
Of course I couldn’t just stick to the versions used in the book, but downloaded the latest versions of the used packages. And of course it caused a few problems here and there, but I ended up with a really nice system which I then used for quite some time before switching again, to Slackware.

Also on Slackware I kept the habit of compiling all that I wanted to add or replace.
At a certain point I felt like doing another LFS install, so I got the latest book, all the latest versions of the packages used and got going. Again I ended up with a nice system that I used for quite some time.

During that time I also started playing around with virtualization. At first I tried Bochs, which didn’t deliver usable emulation speed, so I went on to QEmu, later together with the KQEmu module for better performance. Later on, as you will see, these first steps with virtual machines proved to have been quite useful for the evolution of EasyLFS.

I also felt my system bloating up from all the stuff I had installed, so I was considering a reinstall. But as I had done LFS a couple of times by now, I usually didn’t get it quite right on the first try, because of the newer packages and typos when hammering in the, sometimes lengthy, commands, I wanted to do it automated, which would save the time needed to type in and double check all the commands, and would help avoid possible typos that may still have been overlooked after checking twice.
Of course my first step on this quest led me to Google, where I found out about ALFS, the “official” way to automatically install LFS. The problem I had with it is that it’s designed to do things the way they’re done in the book, and also use the versions used therein. Also I wanted to add some more stuff that I would need to install anyway to my basic installation, like OpenSSH.

That point marked the birth of EasyLFS, as I decided to automate the installation of LFS myself using a couple of shell scripts to do the actual work and extend the basic installation with a couple of additional packages.

I started out with one massive script per stage. One to compile the temporary system, one to compile the final system and a few small helper scripts. A configuration script held variables like the target partition and options to enable the installation of additional features, like the aforementioned OpenSSH.

After a lot of typing and compiling I finally had a usable system which required only little interaction with the user to install.
Some more work went into using the Linux Live Scripts to turn my system into a LiveCD, so that I could easily boot it off a CD and kick off installation from there.

In the end I was quite proud of my achievement and decided to buy an old laptop to test my creation on. So I got myself a 586 with 133MHz, 96MB of RAM and a 4GB harddisk. Compiling EasyLFS 0.1, as I had dubbed my first working version, took 3 days. Keep in mind that at this point my system didn’t offer much beyond the scope of the original LFS. No X, let alone stuff like KDE, which even on my PC took a couple of hours to compile.

About that time I discovered that during my work on EasyLFS some packages had been installed in my base system. Also I felt that I had done my share of manual compilation and therefore decided to change distribution again. I wanted something easy to install and update and packages that were as new as possible.
As I also had developed an interest for SELinux I decided to give Fedora‘s just released version 7 a try. To this day I am still using Fedora, both on my PC and my notebook. Just for the sake of it it shall be mentioned that for servers I prefer CentOS, because it has longer support and relies on well tested packages, rather than cutting edge like Fedora.

I quickly realized that the massive scripts I had written would be hard to maintain, as it would become increasingly hard to find where a certain package is dealt with. The logical conclusion was to split the scripts into smaller scripts, one per task, which could either be the installation of a certain package or something like creating the directory tree.
Also I wanted to eliminate the necessity for the user to manually start the script that compiles the final system after being chrooted into the temporary build system.
This resulted in a big rewrite, followed up by more additions. I think it was also at this point where I decided that I wanted to have an option to install the system with support for SELinux.

In order to proceed without risking to mess up my desktop system, Fedora, I turned to virtualization. I had a LiveCD, and the possibility to emulate a PC to install it on. Even though speed wasn’t quite on native level, it was fast enough to not be frustratingly slow.
From then on all installations of EasyLFS were done in virtual machines. And that’s how I still do it. The only difference is that instead of QEmu and KQEmu I now use KVM, for performance reasons.
Choosing virtualization over booting into a separate, expendable system had the advantage that I did not need to mess around with my partition layout, and saved me the hustle of having to switch between systems for different tasks.

Now I wouldn’t be a very good Free Software advocate if I wouldn’t give back to the community that has given me so much. And in fact I already had one project on SourceForge where I share some PHP classes I have written. So the logical step was to set up another project where I could share my work with everybody who may be interested in it.
Sadly this project was rejected, as SourceForge likes to keep all released online, not just the latest. And as distributions can become quite big quite quickly it would put quite a bit of weight on their freely available infrastructure. A reason I can fully understand, as “sad” as it was, not being able to use their services for EasyLFS.

Instead of desperately giving up I continued my work, and it was rewarded. A user of the German forum tutorials.de, where I was pretty active at the time, offered me to host my releases, and a Wiki for information about my project. At the time there was only a 32 Bit version of EasyLFS, so only one CD image needed to be hosted to make all my work available to the world.
Around the same time another user from the same forum offered his help on implementing SELinux. Through his work I learned that my first attempt wasn’t quite complete, and he finally was able to point out the right way on how to integrate SELinux into EasyLFS.

While he did the work on SELinux I concentrated on creating a 64 Bit version of EasyLFS, as I strongly believe that 64 Bit hardware should run a 64 Bit system.
I have read a lot about people saying otherwise, but I never had any problems with any program which could be blamed on me running the 64 Bit version of Fedora.
And virtualization is so much more fun with a lot of memory, something where a 64 Bit OS has a clear advantage.

Time passed, lots of work was being done to get all packages to compile on both 32 and 64 Bits, to integrate SELinux and to adjust the reference policy to enable users to actually work with the hardened system, and one day EasyLFS reached version 0.4, which as of this writing still is the latest release.

For some reason I don’t remember I switched hosting, taking up the offer of the “mastermind” behind nuxified.org.
For the new site I developed a system to manage all the information about EasyLFS from scratch and dubbed it EasyPMS, the Easy Project Management System.
In case you’re interested you can get the code from the Subversion repository you can find by following the link above.

Between then and now quite some time passed, and my work on EasyLFS has slowed down considerably, as now I also am a proud father of a little geek. But development hasn’t stopped.
In fact, I am writing this post because just recently I have picked up development again, and I felt like this was a good topic to blog about.
Sometimes it feels rather insane to be working on this all by myself, because it can easily consume a lot of time, keep me up at night and sometimes frustrate me when packages just dont want to compile.
But then again it also feels good to know that I am not just wasting my time playing stupid, little games on Facebook, but actually challenge myself and learn something from it.
Also it is somehow rewarding to find EasyLFS being mentioned by others on the net, for example on this compatibility list.
It’s nice to know people know about it, although I guess the majority of those who once knew probably has forgotten about it due to my inactivity.
Anyway, EasyLFS was never intended to become mainstream, and I want to keep it a distribution for those who like tinkering with their system.
My personal recommendation is to try both Linux From Scratch and EasyLFS, in either order. LFS can teach you a lot more than EasyLFS can and it’s absolutely worth the work and time.

My plans for EasyLFS now are getting 0.5 ready, which will be a great improvement over 0.4, in many ways. Of course I want to get EasyLFS back into the minds of people, as an alternative to LFS, except on the educational aspect of it, and therefore maybe increase my own reputation in the Free Software Community.
Finally I want to open up development, to give others the opportunity to help improve EasyLFS.

As EasyLFS evolves so does the framework around it. There is stiill work to be done to improve the scripts, right now at least the pcmciautils do not compile, some obsolete features like HAL need to be phased out and new features, like BtrFS and LXC need testing in order to be ready for release.
So I better get back to my code.

For those of you who may have missed the link to EasyLFS, here it is again: http://easylfs.nuxified.com/

Thank you!
Dennis Wronka

Advertisements