next up previous

The Professor's Guide to Installing the D0 Environment on Off-site Linux Systems

Heidi Schellman, Xiao-Ling Fan, Alan Jonckheere and Dan Yocum

Release Version 0.1a - March 23, 2000
0.1a fix to d0dist tarfile location - thanks to DooKee Cho
0.3 put in info on binary distributions!
0.4 major update after work by Xiao-Ling Fan
0.4b minor text fixes HMS (Dec 30, 1990)
0.4c remote release method from Arnaud Duperrin
0.5 move to 6.1

This note contains instructions for installing the D0 product environment on Linux machines at off-site institutions. Please inform Heidi Schellman - schellman@fnal.gov if you encounter any problems with these directions. Your comments will make this work better!

'Features' of the alpha install that will change soon (bugs, improvements ...) are marked in italics .

HELP!!

To get help:

For D0 related problems: mailto:d0linux-users@fnal.gov

For general linux: mailto:linux-users@fnal.gov

You can subscribe to these services by sending an email to

mailserv@fnal.gov
with the body:

subscribe d0linux-users@fnal.gov me@wherever
subscribe linux-users@fnal.gov me@wherever

Main Fermilab Linux Documentation Location

FNAL Unix Page

FNAL LINUX Page

The FNAL linux page has extensive documentation on the purchase and installation of Linux compatible systems. Read these pages!

Linux at Fermilab

This document provides instructions for off-site installations, with the hope that they provide the same environment as the D0 experiment itself.

If you are bringing a PC to D0 the instructions are different as system administration is provided by the D0 group and Fermilab Operating System Support Department.

At Fermilab you need to:

  1. Get a machine (see the FNAL LINUX Page and the next section for some hints)
  2. Send an email to Stu Fuess - fuess@fnal.gov informing him of your new machine and requesting an IP address. You need to specify:

    Your name:
    Your institution:
    Your email address:
    The type of machine:
    The Serial number of the machine:
    The type of ethernet card:
    The hardware ID of the ethernet card:
    The operating system: Fermilab Linux Distribution
    A suggested name for the machine:
  3. Then, when Stu says ok and you have your IP address, send a message to helpdesk@fnal.gov.

    with the following content to get your system installed for you.

    Subject: Linux Installation Request 
    
    Request to  CDS for the installation of the Linux Operating  System 
    
    Host name: 
    Numerical IP address:
    Location:
    
     
    (If known)
    PO this machine was purchased under XXXXXXX 
    Does this machine have a pre-installed Fermi Redhat distribution?

D0 environment

At Fermilab, D0 products reside on a central server so you should never have to do anything described in this note except buying a PC, getting it up and running on Linux and getting the D0 products disks mounted on your machine.

Offsite, you may well have such a local server, but most of this note is about getting a standalone D0 machine or file server set up.

Getting a PC

Supported Platforms

Fermilab currently supports Linux on Intel based CPU's. Other PC's may run into compatibility problems in programs such as cernlib.

Many large vendors such as Dell, Micron etc. like to give you the latest greatest equipment. Linux drivers for such equipment are often a few months in arriving. To ensure a system that will work you can:

The usual problem components are graphics cards and network interfaces. Fermilab and RedHat can help you with lists of interfaces that work.

Look at the hardware section of Fermilab Linux Page for a list of OK devices.

Disk

The D0 code distribution takes several GB of disk. If you are building a D0 code server, we suggest that you devote at least 4GB of disk to d0 with an additional 2 GB for the operating system. If your machine will be mounting D0 distributions from a server, you are free to set things up as you wish.

One suggestion - Use of EIDE instead of SCSI disk for the system disk is recommended.

Warning - disk size limits

Some machines have trouble with partitions > 8GB. See the FNAL Linux page and the news archive for advice on this.

What you need to do before you install

The Linux install needs to know some system information, notably the graphics card, the monitor and the network card.

HAVE THE MANUALS FOR THESE COMPONENTS AVAILABLE WHEN YOU START!

see the Pre-install Checklist under ``Installation via ..'' on the Fermilab linux page. http://www-oss.fnal.gov/fss/documentation/linux/ for more details.

Installing the operating system

Overview

Official D0 Linux is Fermilab Red Hat and is distributed by the Fermilab Computing Division on CD-rom and via network.

If you want to be D0 compatible, you need the Fermilab version.

The FNAL distribution contains:

  1. Red Hat Linux
  2. Additional security patches
  3. Predefined ups/upd (Fermilab products installation packages)
  4. Perl

This makes it very easy to get started.

If for some reason you cannot use the Fermilab release you will have to install perl, ups and upd yourself. This is non-trivial and can cause continuing problems for both you and the D0 support people. This is more work for everyone and should not be done unless you really have to.

The Fermilab Unix Page - http://www-oss.fnal.gov/ has pointers to Linux documentation.

NT Dual boot - not checked yet

I (Heidi) have not tried this yet. Rumor has it that one should install NT first, then Linux, then pray. See the Fermilab Linux pages for some pointers on this. Overall, the emerging opinion is that this is more trouble than it is worth.

Installation

The instructions for installing the official distribution are at: http://www-oss.fnal.gov/fss/documentation/linux/ and CD-ROM's are available through the computing division. People in the US should probably do a network install, which just requires a floppy disk. The floppies can be checked out from Yolanda Valadez on the 8th floor (east side) of the hirise or from PREP at the computing center.

Go through the steps under ``Installation via ...'' on the FNAL linux page http://www-oss.fnal.gov/fss/documentation/linux/. I found them easy to follow with a couple of comments:

  1. If you have the CD you can use the disk copy utility (on the CD) to copy the boot disk image onto a floppy. It is very useful to have a DOS boot disk around while you are doing this.
  2. The operating system partition ``/'' should be at least 2GB with 127M swap.
  3. If you will have a local copy of /d0dist/ and /d0usr/, when you are formatting the disk, either make the system ``/'' component quite large or create a special /d0dist partition for your d0 products. They will grow to take several GB and you don't want to have to reformat your disk. /d0usr is small and can share with system easily.

At this point you should have a running linux system with ups, upd and perl installed. It is a bit different from the other fnal system in that common products such as tk, emacs come from the Red Hat distribution, not Fermilab products distributions.

{IF YOU ARE NOT RUNNING FNAL REDHAT YOU HAVE TO INSTALL UPS/UPD/PERL YOURSELF.

``Features'' to take notice of

  1. Version 0.0 - Products like flpr are in /usr/local/bin but I found them to be read/write only and had to do a chmod a+x and chmod u+s to execute them. The experts have been informed and the next release will have this fixed.
  2. Version 0.0 - people using mh and exmh have reported problems with sending mail in the default setup.

    In the file /usr/lib/mh/mtstailor, the last line looks like this:

    servers:        localhost \01localnet

    Dan Yocum reports that sendmail on the local machine is configured in such a way that it will not relay mail (a rudimentary method to thwart spammers from using your machine as a relay point).

    You should change the line to look like this:

    servers:        fnal.fnal.gov \01localnet

    or whatever your local mail server is.

  3. Limitations on disk size - Some systems have experienced problems formatting disks larger that 8GB - as of October this is being looked into.
  4. The root account is set up to run bash rather than any shell you are used to. The system people suggest that you keep it this way as it does not create any links to disks which might prevent root from logging in in a disaster. In general, you never want to run a shell for root which is not on the install CD.

Future Section on SCSI disk installation

Extra Memory

THe system seems to be set up for 128M memory. If you have more, you need to put a line

append=''mem=256m''

into /code/etc/lilo.conf. You can also type

linux mem=256m

every time you boot.

Dual Processor Machines (SMP) - not tried yet

One needs to make some patches to the Linux Kernel in order to use both processors on a dual processor machine. I have not tried this but here are some instructions from Dan Yocum for the 5.0 version of the OS. This has probably changed in 6.1.

Note the kernel version keeps changing - you might want to change kernel-source-2.0.... to kernel-source*.rpm when doing this.

install kernel-source rpm package (all on one line):

rpm -ivh ftp://linux.fnal.gov/linux/current/i386/RedHat/RPMS/kernel-source-2.0.
25-2.i386.rpm

cd /usr/src/linux

make menuconfig 

exit right away, no need to change anything, this will create a .config file

edit Makefile and uncomment the 'SMP = 1' line near the top

make dep
make clean
make zImage                  <-- 10minutes
make modules                 <-- 5minutes
make modules_install

cd /usr/src/linux/arch/i386/boot
cp zImage /boot

edit /etc/lilo.conf and add something like this to the end, do *NOT* remove 
the other entries:

image=/boot/zImage
        label=smp
        root=/dev/hda1
        read-only

run 'lilo'

reboot and type in 'smp' at the LILO: prompt.

cat /proc/cpuinfo and look for 2 cpu's

If this works, then edit the /etc/lilo.conf file and move the 4 line entry 
above from the last to the first and re-run 'lilo' so smp will come up by 
default.

If you have any scsi devices, there are a few more steps to take to get 
everything working:

after moving the zImage into /boot then do this:

insmod loop
mkinitrd /boot/initrd-smp.img 2.0.35

edit the lilo.conf file and add this entry to the end instead:

image=/boot/zImage
        label=smp
        root=/dev/hda1
	initrd=/boot/initrd-smp.img
        read-only

and re-run 'lilo'

If this works, then move the entry up in the list and re-run lilo.

ups/upd - Fermilab products

First, you should register   your node with D0 and the Fermilab code distribution system via email to by filling out the form:

http://www-d0.fnal.gov/software/cmgt/upd_reg.txt

ups/upd are the Fermilab code distribution and management software. They are the code behind 'setup' of products on your system. The Fermilab Linux install CD sets you up with these products.

Documentation on these products can be found at:

http://www.fnal.gov/docs/products/ups/

Alan Jonckheere and the Kit's group have already documented a lot of this for general Unix systems. It is actually much easier on Linux because the ups/upd install has been done for you.

Setting up the ups/upd system

To set up the ups/upd system you need to type:

source ~products/etc/setups.csh

if you are in the root directory, otherwise just type

setup ups

then you can type:

setup product to set up products
ups list to see what products you have

Bringing ups/upd up to date

If you are not registered 5 with the Fermilab code distribution system this will not work.

Installing a new product

To use D0 code you will need tk/tcl anyways so it is a good chance to practice using ups/upd.

  1. Log in as root or products.
  2.  source ~products/etc/setups.sh

    to setup ups

  3. setup upd

    to get the product distribution package upd

  4. upd list -a tk

    to find out about the current version of tk on linux.


  5. upd install tk vNNNN -G'-c'

    will bring the tk code over from the fermilab code repository fnkits.fnal.gov and put it on your disk. The -G'-c' option tells ups to 'declare' the code as well, telling the database that it exists. It is also smart enough to bring over any code (such as tcl which tk 'depends' on).

  6. logout and log in as yourself
  7. ups verify tk

    should check the database

  8. setup tk

    will set it up.

Try doing the same for cern

Other Products

You can get a list of available Fermilab products via:

upd list -a

Getting the Kai compiler

Fermilab distributes the Kai compiler or you can deal directly with the company. In either case, you should use the Fermilab install procedure, not the one that comes with KAI. All you need from them is the license key. D0 code assumes that KAI is in a particular place.

Documentation is available at:

http://www.fnal.gov/cd/FUE/KAI/kai.html

You want version 3_4g if you want to be compatible with RedHat 6.1.

The price for a single license is around $300 ($250 + FNAL overheads). On dual processor machines, the price is $385 + FNAL overheads (tex2html_wrap_inline418 20%) If you buy through Fermilab, you pay overhead but Fermilab will provide maintenance costs.

In my case I purchased the license through Fermilab but, KAI contacted me directly with a key code. I then used the instructions from http://www.fnal.gov/cd/FUE/KAI/kai.html to set up and give it the key. Do not use the KAI instructions as they do not set up all the useful environmentals required by the D0 code environment.

Using ups/upd to get D0 products

Now you actually need to know something about how ups/upd works.

The FNAL products are in a ups database which resides in directory

tex2html_wrap_inline418 products/db which is actually /fnal/ups/db.

The products themselves lie in

 ~products/prd
. D0 specific products are installed in two other directories /d0dist/dist and /d0usr/products and then linked to the main products directory.

Adding D0 products

Getting the code and setting up database links

Code Management at D0 http://www-d0.fnal.gov/software/cmgt/cmgt.html is a very valuable place to look for information on D0 setup.

This note replaces the Installing ups/upd/perl and UPS sections of the D0 code management page.

  1. First you need to bring the products over. One could just copy the full distribution off of d0mino but that would require a lot of disk and give you the IRIX version of everything. We will soon have a clean Linux distribution but for now we have to make do with the UPS distribution of an empty release t00.xx.00 and update to the present version as a separate step.
  2. As root, create the directories /d0dist/dist/ and /d0usr/products/

    Download the following files into these directories:

  3. gunzip them and tar xBf them to unpack.
  4. Alan has provided scripts fix-*.sh in each directory which changes the internal product database to fit its current location. Run this script and say yes and the D0 product databases will know that they reside in /d0dist/dist and /d0usr/products/.

    At this point you have the D0 products on your machine but the database is unaware of their existence.

    1. type

      source ~products/etc/setups.csh

      to get ups set up again.

    2. Then edit the file $SETUPS_DIR/upsdb_list so that the uncommented lines looks like this:
      ${Node}/products/db
      ~products/db
      /d0usr/products/upsdb
      /d0dist/dist/upsdb

      All you have done is add the /d0usr/ and 00dist databases to the list.

    3. You also need to change a file called updconfig.

      Go to the

      ~products/db/.updfiles/
      directory and type

      mv updconfig updconfig-default

      then download http://www-d0.fnal.gov/software/cmgt/example_updconfig

      and store it as updconfig. You may need to edit updconfig to reflect your local upd database locations.

      The system now knows about your D0 databases.

Getting a real version of D0 code

The main text here is a bit old and works best on a reliable line. Arnaud Duperrin has documented a remote install (Jan 2000) over an unreliable line in http://www-d0.fnal.gov/tex2html_wrap_inline418schellma/duperrin.txt You should look at this as it is the most current test we have.

Onwards to the main narrative:

To get a more recent version of D0 code, for example t00.53.00 do the following

upd install D0RunII t00.53.00 -h www-d0.fnal.gov -q dist
upd install D0RunII-bin t00.53 -h www-d0.fnal.gov -q dist

As of March 2000 -bin will give you a Linux 5.2 compatible version. If you are running 6.1, you will need to do the build of the bin part yourself. This will change very soon.

GET THE BUILD INSTRUCTIONS

This gets the files installed on your machine but does not make them live.

You should then tell the database that you are done with the dummy version

ups undeclare D0RunII t00.xx.00
ups undeclare D0RunII t00.xx.00 -q build -Y

Final stages of setup

 

  1. You still need to tell the system about D0RunII

    You need to build the ups/upd table for your real version (options for two shells are given.)

    These may no longer be needed - try skipping to step 2

    export SRT_TOP=/d0dist/dist/release/t00.53.00         // in sh
    setenv SRT_TOP /d0dist/dist/releases/t00.53.00        // in csh
    $SRT_TOP/Srtutil/reltools/BldTable
  2. Find out what version you have by doing:

    ls /d0dist/dist/upsdb/D0RunII

    The version that comes from the tar files is t00.xx.00

  3. Then 'declare' it to the system as follows:

    ups declare -z /d0dist/dist/upsdb/ -r releases/t00.27.00 -m D0RunII.table -f NULL D0RunII t00.27.00 -c

    The arguments mean:

    -z is the database location
    -r is the source location
    -m is the name of the definition table
    -f is the flavor (in this case none)
    -c means current. -t would mean test version
    and you need to include the product (D0RunII) and the version (t00.27.00)

    The database now knows about D0RunII.

  4. some minor details.
  5. D0 does something a bit nonstandard in ups/upd. current and test are chains, not versions in ups/upd but it is very convenient to make them versions as well so you can do think like newrel -t test mytest. To achieve this,
    1. go to the

      /d0dist/dist/releases directory and look at the versions available.

    2. do a

      ln -s txxxxxx current

      ln -s tyyyyyy test

      this makes fake releases with versions current and test

    3. Then declare your new versions to the ups database:

      ups declare D0RunII current -c -r releases/current -f NULL -m D0RunII.table -z /d0dist/dist/upsdb
      
      ups declare D0RunII test -t -r releases/test -f NULL -m D0RunII.table -z /d0dist/dist/upsdb
      
      \code{ups declare -z /d0dist/dist/upsdb/ -r releases/t00.54.00 -m D0RunII.table -f NULL D0RunII t00.54.00 -c}

      The arguments mean:

      -z is the database location
      -r is the source location
      -m is the name of the definition table
      -f is the flavor (in this case none)
      -c means current. -t would mean test version
      and you need to include the product (D0RunII) and the version (t00.54.00)

      The database now knows about D0RunII.

    4. some minor details.

      ups/upd now think that current and test are versions.BUT YOU MUST FIX THIS BY HAND WHEN YOU UPDATE YOUR DISTRIBUTIONS !!!

    5. at this point you should be able to log in as a user and type setup D0RunII

At this point you have a D0 system set up and can follow the instructions under Updating "Products" on the main D0 Code Management page: http://www-d0.fnal.gov/software/cmgt/cmgt.html to add or update products.

How to update your installation to a more current version

First find out the version of D0RunII you want.

Then do:

upd install D0RunII vv.vv.vv -h www-d0.fnal.gov -q dist

upd install D0RunII-bin vv.vv.vv -h www-d0.fnal.gov -q dist

-q dist gives you a flavorless distribution.

Some products do not have table files as they are never set up standalone. You will get whiny messages to this effect.

When you are done, go back to the instructions in 8.3 and repeat the setup/declaration for your new release.

To Do list

About this document ...

The Professor's Guide to Installing the D0 Environment on Off-site Linux Systems

This document was generated using the LaTeX2HTML translator Version 96.1-h (September 30, 1996) Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.

The command line arguments were:
latex2html linux_v05.

The translation was initiated by Heidi Schellman on Thu Mar 23 08:19:04 CST 2000


next up previous

Heidi Schellman
Thu Mar 23 08:19:04 CST 2000