Installing Linux From Scratch – Part I
My LFS History: you are entitled to skip 🙂
This is my long time wish to install a Linux system from scratch. One year before I had downloaded Linux From Scratch (LFS) – Live CD 6.1. I prepared a hard-copy of installation manual. With a lot of enthusiasm I sat in front of my computer. I booted the system with this live-cd and start installing by reading the manual. After 2 hours, I found that LFS installation is not like most other distros, to start installation and finish in a few minutes or hours. Looking at the volume of pages on manual and packages to install, I decided to give up my attempt to install it. But I took it as ego.. keep on thinking of it. I my last two years experience, I have matured to an extent of liking and using Gentoo 2005 and Slackware 10.1 (It does not mean that other distros are bad, I **mean** I am comfortable with this kind of not much user-friendly systems. At the same time I have a nice easier Ubuntu Dapper 6.06, especially for my wife, and me too).
Recently I bought a PIII/192MB used system. I was browsing my CD collection, and decided to install Gentoo 2005. I was comfortable in installation and usage. Then I installed Slackware 10.1 also (nice distro to tweak, not bloated – simply superb distro.) Both these I installed many times in a week and able to get some more knowledge on linux.
Day 1: 30th July 2006 (Sun):
On this good day evening, LFS flashed in my mind. Suddenly I took printed manual and browsed a few pages and came to know that having a stable, good, no-gui system as development system for LFS is a better idea than using Live CD. So, I reinstalled my Slackware 10.1 as complete development system. I planned to spend 2 to 3 hours of everyday evening on LFS installation. This first day I installed Slackware 10.1 as pure development system with mpg123 as add-on. I though of playing songs while long compilation running (it worked out well too).
I created a partition as per LFS manual. Mounted on my slackware /mnt directory. The installation was started peacefully and with more enthusiasm. When I come to gcc-build stage, compilation failed. It said there is no blah-blah-blah header files not found…. I know very well that I have followed the steps at most care. But I know somewhere I have done mistake. How to find it out? There is no internet at home to seek help. It was midnight then. What to do? Just slept with happier heart of doing some thing useful instead of just looking at GNOME/KDE kind of stuffs and GUI applications.
Day 2: 31st July 2006 (Mon):
I checked with LFS forum from my workstation at office. I came to know my foolishness. The document did not ask me to apply any patch. But I thought I was very clever, so applied patch files also during Pass-1 of gcc-build. That is the cause for the compilation error. Moral: Follow the LFS manual without any add-ons as I did, if you are an average linux user. Please consider errata document also while reading LFS manual. That will do. That day evening, returned home and immediately, built the gcc again without any patch applied. It was through. Then I continued installation. To my surprise, I finished “Preparing for the Build” phase of installation at next day morning (while the build was going on, I slept). I was very happy and felt that I am doing/learning something useful/interesting. But I should agree that I can’t understand all the technical explanations in the manual. But I was able to manage the things whenever I got diverted from the way LFS manual said. That is enough, hope I have good start.
Day 3: 1st Aug 2006 (Tue):
Morning I spent a hour in creating chroot-ed environment. Created all directory layour as per Linux File System Hiererchy. Then created /etc/passwd, /etc/groups files.
What a nice experience, creating those system files by our own hand and going to use! Just heart is flying and sizzling like anything! I know that still I have a long way to go to get my linux system from scratch. But I am 100% confident of it. The most happiest moment in life comes with most important/complicated task is get completed.
Coming up with Part-II soon…