nALFS User's Guide

Version 1.2-0.1 -- June 23rd, 2004

nALFS Development Team

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions in any form must retain the above copyright notice, this list of conditions and the following disclaimer.

  • The names "Linux From Scratch", "Automated Linux From Scratch", or the names of its contributors may not be used to endorse or promote products derived from this material without specific prior written permission.

  • Any material derived from "Linux From Scratch" must contain a reference to the "Linux From Scratch" project.

  • Any material derived from "Automated Linux From Scratch" must contain a reference to the "Automated Linux From Scratch" project.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Abstract

This book explains in detail how to install and use nALFS v1.2.


Dedication

This book is dedicated to the LFS and ALFS communities.

Warning

This version of the nALFS Users Guide is under heavy development and is not ready for prime-time use. Please direct your attention to the README in the root of the nALFS tarball.

Table of Contents

Preface
Foreword
Organization
Who Would Want To Read This Book
Prerequisites
Ncurses
libXML2
Curl
OpenSSL
Other
I. Introduction
1. Welcome to the nALFS Users Guide
Acknowledgements
Conventions Used In This Book
Contact Information
ChangeLog
2. nALFS Installation and Configuration
Quick Start

Preface

Foreword

From the Editor

Being a Systems Engineer by trade and having used Linux From Scratch (LFS) for about a year, I was looking for a way to automate tasks on my Linux servers at work. One day, while surfing the LFS website, I found the ALFS project and then the nALFS implementation. After trying it out, I fell in love with the tool. I have been able to completely automate server builds, software package installation and administrative tasks across my data center. Since I like the product so much, I wanted to give back to the project and decided to take on the task of documentation. I hope you like the product as much as I do and it provides the same utility to your environment as it has mine.


--
James Robertson
jwrober@linuxfromscratch.org

Organization

PAGE TO BE WRITTEN

Who Would Want To Read This Book

This is the user's guide for nALFS v1.2. If you have nALFS installed on your computer and want to know how to use it, then you have found the right place. nALFS is a tool to automate the build procedure for the LFS book. It can also be used to automate software package installation steps or any other administrative task you can think of. The ALFS DTD has many features available for use inside the tool.

Prerequisites

nALFS v1.2 requires a functioning Linux system with the following libraries and programs already installed and configured.

Ncurses

Any recent version should work. If for some reason your system does not have ncurses installed, the LFS book provides an excellent installation procedure at http://www.linuxfromscratch.org/lfs/view/cvs/chapter06/ncurses.html.

libXML2

Any version greater than or equal to v2.6.0 should work. One primary feature you are looking for is support for XInclude. If for some reason your system does not have libXML2 installed or XInclude compiled in, the BLFS book provides an excellent installation procedure at http://www.linuxfromscratch.org/blfs/view/cvs/general/libxml2.html.

Curl

Note

This package is optional.

Any version greater than v7.10 should work. If for some reason your system does not have Curl installed, the BLFS book provides an excellent installation procedure at http://www.linuxfromscratch.org/blfs/view/cvs/basicnet/curl.html.

OpenSSL

Note

This package is optional.

Any version greater than v0.9.7 should work. If for some reason your system does not have OpenSSL installed, the BLFS book provides an excellent installation procedure at http://www.linuxfromscratch.org/blfs/view/cvs/general/openssl.html.

Introduction

Chapter 1. Welcome to the nALFS Users Guide

LFS stands for Linux From Scratch and it's a project, led by Gerard Beekmans --<gerard@linuxfromscratch.org>, which helps you build your own Linux system.

What this means is that you will use nothing but the source code of various software packages needed for a fully functional Linux system. You will compile the packages one-by-one on your own computer. During this process, you will be able to tweak every single corner of your system, by editing a bunch of configuration files, creating your own boot scripts etc.

All this might sound a bit complicated and require too much work. But even if it is, it's well worth it. One of the LFS project's secondary goals is education. Great care is taken in each step to explain what is occuring at each phase of the build procedure.

Best of all it that it does not have to be that complicated or time consuming. With only a few keystrokes and the right software, you can just sit back and relax, while your system is being built -- from scratch. This is where the ALFS project comes into play.

ALFS stands for Automated Linux From Scratch, and its aim is to provide a much simpler method for building a Linux system.

ALFS uses profiles (simple XML files) which describe what actions are to be taken and what commands executed. Feeding the program (like nALFS) with those profiles, will make the program act upon them.

For example, if you want to create a directory, all you have to do is to put:

<mkdir>
        <name>/some/directory</name>
</mkdir>

in the profile and leave the rest to the program. Of course, you are not limited to just compiling packages for LFS. You can do just about anything. All it takes is a little time to write a profile for it.

This might seem very similar to ordinary shell scripting, but it has also a lot of advantages. With this approach nALFS (after reading any properly formatted profile) can be instructed to pause execution, start execution from a selected element (by browsing a profile in a tree-like mode), enter special environments like chroot, and much much more.

Acknowledgements

For an in depth look at "who did what", you can grep through the source code files containing the program's changes. Below is just a list of people, in alphabetical order, that had some involvement in the nALFS code and/or documentation.

  • Marcus R. Brown <mrbrown@0xd6.org> -- Project developer.

  • Christophe Devine <devine@cr0.net> -- Project developer.

  • Vassili Dzuba <vassili@linuxfromscratch.org> -- Project developer.

  • Kevin P. Fleming <kpfleming@linuxfromscratch.org> -- Project developer.

  • Charless Fowlkes <fowlkes@cs.berkeley.edu> -- Project developer.

  • Neven Has <neven@linuxfromscratch.org> -- nALFS Creator, Project developer.

  • Peter van Kampen <pterk@datatailors.com> -- Project developer.

  • James Robertson <jwrober@linuxfromscratch.org> -- Documentation editor.

  • Maik Schreiber <bZ@iq-computing.de> -- Project developer.

  • Fabien Steinmetz <fabien.st@netcourrier.com> -- Project developer.

  • Countless other people on the ALFS mailing lists who are making this project happen by giving their suggestions, testing the tool and submitting bug reports.

Conventions Used In This Book

To make things easy to follow, there are a number of conventions used throughout the book. Following are some examples:

./configure --prefix=/usr

This form of text is designed to be typed in exactly as seen unless otherwise noted in the surrounding text.

install-info: unknown option `--dir-file=/mnt/lfs/usr/info/dir'

This form of text (fixed width text) is showing screen output, probably as the result of commands issued and is also used to show filenames such as ~/.nALFSrc

Emphasis

This form of text is used for several purposes in the book but mainly to emphasize important points or to give examples as to what to type.

http://www.linuxfromscratch.org/alfs

This form of text is used for hyperlinks, both within the book and to external pages such as HowTo's, download locations, websites, etc.

cat > $LFS/etc/group << "EOF">
        root:x:0:
        bin:x:1:
        ......
EOF

This type of section is used mainly when creating configuration files. The first command (in bold) tells the system to create the file $LFS/etc/group from whatever is typed on the following lines until the sequence EOF is encountered. Therefore, this whole section is generally typed as seen.

Contact Information

Mailing Lists

The nALFS uses two mailing list hosted from the Linux From Scratch servers.

Please direct the majority of your emails to the ALFS mailing list at alfs-discuss@linuxfromscratch.org. This is an excellent place to post questions and bug reports. For complete mailing list information, refer to http://www.linuxfromscratch.org/mailman/listinfo/alfs-discuss.

The second list is really for the development team's use and is available at alfs-log@linuxfromscratch.org. This is an excellent place to see the daily activity of the project. For complete mailing list information, refer to http://www.linuxfromscratch.org/mailman/listinfo/alfs-log.

News Server

All the mailing lists hosted at linuxfromscratch.org are also accessible via the NNTP server. All messages posted to a mailing list will be copied to its correspondent newsgroup, and vice versa.

The news server can be reached at news.linuxfromscratch.org.

WWW Links

Some other links that might interest you:

Linux From Scratch:

Automated Linux From Scratch:

Other

The current nALFS documentation maintainer is James Robertson. If you need to reach James, send an email to jwrober@linuxfromscratch.org.

The current nALFS source code owner is Kevin Fleming. If you need to reach Kevin, send an email to kpfleming@linuxfromscratch.org.

ChangeLog

1.2-0.1 -- June 23rd, 2004

  • June 20th, 2004 [jwrober]: Modified version number standard to follow the nALFS's version number with a "side" version number.

  • June 8th, 2004 [jwrober]: Changed the required version of libxml2 to 2.6.0 or greater.

  • May 31st, 2004 [jwrober]: Moved files and directories around to match the Hackers Guide better.

  • May 31st, 2004 [jwrober]: Removed Unused XML Tags from the source.

  • May 31st, 2004 [jwrober]: Updated to DocBook v4.3 and applied formatting similar to the ALFS Syntax Doc and nALFS Hackers Guide.

  • October 9th, 2003 [jwrober]: Filled in the prerequisites page.

  • October 7th, 2003 [jwrober]: Added a quick start page from the README and basic prerequisites.

  • October 6th, 2003 [jwrober]: Updated the introduction and contact info pages.

  • October 6th, 2003 [jwrober]: Preface -- Added a foreward from the editor.

  • October 3rd, 2003 [jwrober]: Preface -- Added an introduction, updated the acknowledgements, audience and prerequisites.

  • September 29th, 2003 [jwrober]: Added the preface. Most of it is empty.

  • September 26th, 2003 [jwrober]: Base document created.

Chapter 2. nALFS Installation and Configuration

Quick Start

Just in case you want to dive right in, this is the quickest way to go.

To configure, compile, install and run nALFS, just type:

./configure
make
make install
nALFS profiles/LFS/latest.xml

When you enter the program, type "?" for a list of all available commands.