Fermilab CD logo

UPS product page | UPS/UPD v4 Manual intro page
Contents | Index | Quick Reference Card
Linux at Fermilab | Distribution Server Configuration Chapter, CDROM


Distribution CD-ROM for Linux and UPS/UPD

Available Product Distribution CD-ROM Images

The OSS group makes CD-ROMs of the Fermi Red Hat Linux operating system (plus various programs/utilities) available to users of off-site systems. The CD-ROM images contain UPS/UPD which can optionally be installed at the same time as Linux. For information on how to obtain and install Linux and UPS/UPD this way, go to http://www-oss.fnal.gov/fss/documentation/linux/ and click on the link Installation via CDROM.

Burn your own CD-ROM from a Provided Image

The images used for the CD-ROMs are stored in separate areas, each corresponding to a Linux release, under ftp://linux.fnal.gov/linux/. The i386 directory in each area contains an image that can be burned onto a product distribution CD-ROM. These images work when the CD-ROM is mounted under the /tmp/rhimage area that is used by our Fermi Red Hat Linux install CD-ROM. Everything under the i386 directory gets mounted as /tmp/rhimage. The UPS products area is /tmp/rhimage/Fermi/products/db.

Create your Own UPS/UPD Image

Determine Contents

First you need to decide upon the contents, and in what format you want the products to be maintained on the CD-ROM. Products can be in any format:

It is possible to mix gzipped, tarred and unwound products on a CD-ROM. You need to make a regular, local directory tree and put the necessary files and your chosen products in it. The files and directories you'll need to include in this tree are:

Configure the Image

The available distribution CD-ROM images are currently built with the template dbconfig file (found at $UPS_DIR/ups/dbconfig.template ) and the updconfig file and the associated fix_archive script shown here:

The UPD Configuration File

This updconfig file is fairly vanilla, except for the predeclare and postdeclare actions:

For each product that you want to make directly accessible without installation on a local disk, you need to leave it unwound and add a stanza to the updconfig file. The stanza should be similar to the one shown below, but it should not include the predeclare and postdeclare actions.

File = updconfig

GROUP:
  product    = ANY
  flavor     = ANY
  qualifiers = ANY

COMMON:
     UPS_THIS_DB  = "${UPD_USERCODE_DB}"

     UPS_PROD_DIR = "${UPS_PROD_NAME}/${UPS_PROD_VERSION}/${UPS_PROD_NAME}_${UPS_PROD_VERSION}_${UPS_PROD_FLAVOR}${UPS_PROD_QUALIFIERS}"
  UNWIND_PROD_DIR = "${PROD_DIR_PREFIX}/${UPS_PROD_DIR}"

      UPS_UPS_DIR = "ups"
   UNWIND_UPS_DIR = "${UNWIND_PROD_DIR}.${UPS_UPS_DIR}"

   UPS_TABLE_FILE = "${UPS_PROD_NAME}_${UPS_PROD_VERSION}_${UPS_PROD_FLAVOR}${UPS_PROD_QUALIFIERS}.table"
 UNWIND_TABLE_DIR = "${PROD_DIR_PREFIX}/${UPS_PROD_NAME}/${UPS_PROD_VERSION}"
    UPS_TABLE_DIR = "${PROD_DIR_PREFIX}/${UPS_PROD_NAME}/${UPS_PROD_VERSION}"
 UPS_ARCHIVE_FILE = "file://localhost/${PROD_DIR_PREFIX}/${UPS_PROD_NAME}/${UPS_PROD_VERSION}/${UPS_PROD_NAME}_${UPS_PROD_VERSION}_${UPS_PROD_FLAVOR}${UPS_PROD_QUALIFIERS}.tar"
UNWIND_ARCHIVE_FILE = "${PROD_DIR_PREFIX}/${UPS_PROD_NAME}/${UPS_PROD_VERSION}/${UPS_PROD_NAME}_${UPS_PROD_VERSION}_${UPS_PROD_FLAVOR}${UPS_PROD_QUALIFIERS}.tar"

Action = predeclare
	Execute("cd ${UNWIND_PROD_DIR}; tar cf ${PROD_DIR_PREFIX}/${UPS_PROD_NAME}/${UPS_PROD_VERSION}/${UPS_PROD_NAME}_${UPS_PROD_VERSION}_${UPS_PROD_FLAVOR}${UPS_PROD_QUALIFIERS}.tar .; gzip -9 ${PROD_DIR_PREFIX}/${UPS_PROD_NAME}/${UPS_PROD_VERSION}/${UPS_PROD_NAME}_${UPS_PROD_VERSION}_${UPS_PROD_FLAVOR}${UPS_PROD_QUALIFIERS}.tar; rm  -rf .[a-zA-Z]* [^R]*",NO_UPS_ENV)

Action = postdeclare
        Execute("${UPD_USERCODE_DB}/.updfiles/fix_archive ${UPS_PROD_DIR} ftp://localhost/${PROD_DIR_PREFIX}/${UPS_PROD_NAME}/${UPS_PROD_VERSION}/${UPS_PROD_NAME}_${UPS_PROD_VERSION}_${UPS_PROD_FLAVOR}${UPS_PROD_QUALIFIERS}.tar.gz ${UPS_THIS_DB}/${UPS_PROD_NAME}/${UPS_PROD_VERSION}.version",NO_UPS_ENV);

END:

The fix_archive Script

#!/bin/sh
perl -pi.bak -e "s{PROD_DIR = \\Q$1\\E}{\$&\\n  ARCHIVE_FILE = $2};" $3
diff -c $3 $3.bak
exit 0

Add Products to the Image Area

Run the upd install command:

% upd install -h <host> -z /path/to/db/for/image <product> <version>

to pull <product> from the server and put it on the CD-ROM products area defined in the given database. This is the products area used when making the image. The available images for Linux use the database /tmp/rhimage/products/db.

Create the Image

You then need to use appropriate tools to make an ISO 9660 format image of the file tree and to put that image onto an actual CD-ROM (these tools and procedures are beyond the scope of this document).

Install a Product from CD-ROM

To install a product from a UPS/UPD distribution database on CD-ROM, first insert the CD-ROM and run the mount command:

% mount -t iso9660 /dev/cdrom /path/to/db/on/cdrom

For the available Linux CD-ROM images, use /tmp/rhimage as the path to the database on the CD-ROM.

Then to install a product, run the upd install command normally, but include the -h option pointing to the database on the CD-ROM as shown:

% upd install -h file://localhost/path/to/db/on/cdrom ...

For the available Linux CD-ROM images, use file://localhost/tmp/rhimage/products/db.

Run a Product Directly from CD-ROM

If you have a CD-ROM image that includes products that are unwound and ready-to-use, you can run them directly off the CD-ROM without downloading them to your system. First insert the CD-ROM and run the mount command:

% mount -t iso9660 /dev/cdrom /path/to/db/on/cdrom

Then run the setup command. UPS needs to look in the right database, so either add it to your $PRODUCTS variable beforehand, or supply it on the command line, e.g.,:

% setup -z /path/to/db/on/cdrom <product> [<version>]

Coming Soon...

Marc Mengel is working on a script that will allow you to make a CD-ROM area more rapidly. In the next version of the bootstrap product, you will run a command something like the following:

% mkbootstrap [-b] [-f flavor1:flavor2:...] /cdrom/dir product1 [product2 ...]

This will build a whole CD-ROM image under /cdrom/dir. The -b flag will set the image up so that it can be bootstrapped.


For assistance contact helpdesk@fnal.gov
Information compiled and maintained by Anne Heavey (aheavey@fnal.gov)
This page last Modified by AH on August 8, 2000.