HowTo Build NST 2.15.0

From NST Wiki
Jump to navigationJump to search

General

This document describes the steps involved in building the NST distribution from the source. This document is written against the state of the NST v2.15.0 source code repository as of 2011-05-24. Things will undoubtedly change in the future - but the basic principles should still hold.

Building a NST system from the source is not a trivial process (expect to invest time and resources). However, building your own NST system allows you to produce you own ISO images and yum repository.

Requirements

In order to build the NST v2.15.0 release, you will need:

  • A 32 bit or 64 bit Fedora 15 based OS installation.
  • At least 1GB of RAM.
  • At least 32GB of disk space for the OS installation and NST build.
  • Broadband Internet access as the initial build process will pull several gigabytes of information down from the Internet.

Recommendations

The general recommendations for a NST build system are as follows:

  • Dedicate a machine or virtual machine for the single purpose of building the NST ISO. Since the NST build runs as root and modifies the OS installation, you should NOT use a production machine as your NST build machine.
  • We recommend allocating at least 32GB of storage and 1GB of RAM when creating a NST build machine.
  • We have used both VMware and VirtualBox to create NST build machines. Using the virtual machine approach increases the build time, but makes life much more convenient in the long run (you can use one physical machine to setup multiple development machines).

Initial Fedora 15 Installation

The following outlines the steps for bringing up a NST development system starting from a Fedora 15 Live ISO image.

Download Fedora 15 Live ISO Image

Download the Fedora 15 Live ISO image from Fedora's web site (http://fedoraproject.org/).

  • Download the Fedora-15-i686-Live.iso ISO image if you want to build the 32 bit version of the NST distribution.
  • Download the Fedora-15-x86_64-Live.iso ISO image if you want to build the 64 bit version of the NST distribution.

Install Fedora 15 To System

  • Boot the Fedora 15 ISO image.
  • After the GNOME 3 desktop appears, open the Applications menu and look under the System Tools sub-menu for the hard disk installation tool. Select this tool.
  • Follow the installation instructions (it will walk you through the installation).
  • After the installation completes, Shutdown the system and remove the DVD (in a virtual environment, you will disconnect the ISO image).
  • Boot the system and follow the instructions to complete the installation.

NOTE: You will not be able to log into the GNOME desktop as the root user. If you would like to be able to do this (you will need to be root when building the NST), you will need to edit the file: /etc/pam.d/gdm-password.

Find the line:

auth        required    pam_succeed_if.so user != root quiet

Comment out the line by inserting a '#' character:

#auth        required    pam_succeed_if.so user != root quiet

You will need to restart the gdm process (or reboot your system) for the change to take affect.

Update Your Packages

When building the active (trunk) version of the NST (2.15.0 is the active version at the time of this writing), you will want to keep your system up to date with the latest packages. This can be done with the following command:

yum update

Reboot The System

You should reboot the system after the initial update as it is likely that your kernel was updated. This can be done using the GNOME Desktop tools (click on the login ID in the right corner). Or by running the following as root:

reboot

Install Virtual Machine Guest Additions

If your NST development machine is running under a virtual environment such as VMware or VirtualBox, you will want to install the appropriate guest additions for your virtual environment. Depending on your virtual environment, you may need to install the following Fedora packages before installing your guest additions:

yum install gcc kernel-devel kernel-headers

You will likely need to reboot after installing the guest additions for your virtual environment.

Initial NST 2.15.0 Build

The initial build of the NST system takes a long time. You don't do much, as most of the process is automated, it just takes awhile to install the necessary packages onto your development system, to build the NST yum repository and to download a copy of all of the Fedora packages required to build the initial ISO image. Once you complete your initial NST build, subsequent builds should be quicker (in the range of 30-90 minutes based on the speed of your machine).

Install Subversion

In order to check out the NST source code, you will need to install the Subversion package using the following command:

yum install subversion

Checkout The Source Code

Use the following command to check out the source code for the NST distribution into the trunk sub-directory and then change to the trunk directory:

svn co https://nst.svn.sourceforge.net/svnroot/nst/trunk trunk
cd trunk

Run the ./configure Script

Now that you have a copy of the source code used to build the NST yum repository and ISO image, you will need to configure your system by running the following command:

./configure

The first time your run this, it will seem to take forever as it will download, build and install hundreds of packages onto your development system necessary to build the NST. Subsequent invocations will go much quicker. If you are impatient, you can open another terminal window and use the less command to monitor progress in the yum.log file.

Build the NST Yum Repository and Live ISO Image

To build the NST yum repository (yum/repo) and NST Live ISO image (livecd/nst-2.15.0.i686.iso or livecd/nst-2.15.0.x86_64.iso) you simply type make as show below:

make

If things go well, files will be downloaded, packages will be built, the NST yum repository will be created, and finally the NST Live ISO image will be created.

Sometimes things don't work out so well. This typically occurs when a server on the which contains a source file or package to be downloaded is unreachable. You typically just need to wait until the server comes back on-line before continuing your build.