I’ve mentioned Linux From Scratch in previous articles. I’ve discovered another tool related to this project that rocks called ALFS, or Automatic Linux From Scratch. ALFS puts all of the specifications for compiling a linux system into an XML document and generates most of a Linux From Scratch system automatically. There are a couple of different versions of this. One uses a client and server, and is intended for automated deployment of remote systems. Another is used locally. I used the local version that you can find here. Since it is sometimes a slow or broken site, I mirrored the utility on NetAdminTools here.
For my particular deployment, I have a drive that I want to load as the root file system for a new Linux From Scratch system. I mounted it as /oldroot. This was actually my original Red Hat 7.1 system root. I installed LFS on another partition, which I’m composing this article on, but I want to start over again with what I’ve learned. I’ve backed up my old root filesystem, have nuked it, and will install a fresh LFS system using ALFS.
I had to hack the XML doc that comes with ALFS to make sure it didn’t try and create the directories /usr or /src. I also changed references to kernel 2.4.8 and replaced them with 2.4.10. I then put all of the LFS packages into /oldroot/usr/src/packages-3.0 and ran ALFS. The documentation and operation is quite easy. In addition to the LFS site, there are quite a few people out there publishing their LFS profiles. Browse around the LFS ALFS/profiles CVS system. The implication of this project coupled with LFS is pretty fabulous for systems administrators automating and controlling server builds. Servers are recoverable and self documenting. The XML format of the spec file, of course, could easily be viewed with a web application.