Difference between revisions of "DAQ Controller diskless setup"

From GlueXWiki
Jump to: navigation, search
(TFTP)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Summary==
 
==Summary==
This page will document how to setup a new VME controller for the PXE boot and diskless OS client on the Hall D DAQ network.
+
This page will document how to set up a new VME controller for the PXE boot and diskless OS client on the Hall D DAQ network.
  
  
Line 14: Line 14:
 
** Requested '''Hostname''' (please conform to [https://halldweb.jlab.org/wiki/index.php/HallD_Online_IP_Name_And_Address_Conventions Hall D Naming Convention])
 
** Requested '''Hostname''' (please conform to [https://halldweb.jlab.org/wiki/index.php/HallD_Online_IP_Name_And_Address_Conventions Hall D Naming Convention])
 
** Take note of the automatically assigned '''IP Address'''
 
** Take note of the automatically assigned '''IP Address'''
 +
 +
===GLUON26===
 +
'''gluon26.jlab.org''' hosts the Hall D '''DHCP''' and '''tftp''' servers.  DHCP is required to provide the Controller's IP address, tftp server IP, and tftp boot file information. Modification of the relevant configuration files for both servers requires '''root''' or '''sudo''' privledges.
 +
 +
====DHCP====
 +
* Configuration file:
 +
  /etc/dhcp/dhcpd.conf -> /gluonfs1/diskless/conf/dhcpd.conf
 +
* Add an entry for requested '''hostname''' within the ''group'' with commented line:
 +
  # PXE bootable hosts
 +
: This group has the common configuration parameters
 +
  filename "linux-diskless/pxelinux.0";      # Binary for PXE booting environment
 +
  next-server 129.57.172.40;                # tftp server: gluon26.jlab.org
 +
 +
: The new entry should have this format
 +
  host rocfcal1                              # Requested hostname
 +
    {
 +
        hardware ethernet 00:40:9E:03:2D:75; # MAC ADDRESS
 +
        fixed-address 129.57.135.11;        # Assigned IP address
 +
    }
 +
* After saving the file, restart the '''DHCP''' server with:
 +
  /sbin/service dhcpd restart
 +
 +
====TFTP====
 +
The tftp server runs off of the xinetd daemon and ''very rarely'' needs to be restarted.
 +
The relevant configuration files are located here
 +
  /gluonfs1/diskless/tftpboot/linux-diskless/pxelinux.cfg/
 +
 +
Each host has its own configuration file with the filename provided by its IP address.  For example
 +
  8139870B -> 129.57.135.11
 +
 +
This translation can be done using the command '''gethostip''' (installed on gluon26 from '''syslinux''' RPM).  For example
 +
> gethostip rocfcal1.jlab.org
 +
rocfcal1.jlab.org 129.57.135.11 8139870B
 +
 +
This file provides the PXE client with the information on where to find the linux kernel and what kernel commandline options to include.  For example:
 +
<pre>
 +
default CentOS5-HallD
 +
 +
label CentOS5-HallD
 +
    kernel CentOS5-HallD/vmlinuz
 +
    append initrd=CentOS5-HallD/initrd.img root=/dev/ram0 init=disklessrc
 +
          NFSROOT=129.57.172.15:/vol/diskless/CentOS5
 +
          ramdisk_size=22947 ETHERNET=eth0 SNAPSHOT=rocfcal1.jlab.org
 +
          NISDOMAIN=CCCHP vga=0x305 vmalloc=256MB
 +
</pre>
 +
 +
'''Parameters of interest'''
 +
* Where to find the linux kernel (path relative to /gluonfs1/diskless/tftpboot/linux-install/)
 +
    kernel CentOS5-HallD/vmlinuz
 +
 +
* Ramdisk image:
 +
    initrd=CentOS5-HallD/initrd.img
 +
 +
* ROOT of diskless filesystem (NFS mounted from gluonfs1, contents at /gluonfs1/diskless/CentOS5-HallD/root)
 +
    NFSROOT=129.57.172.15:/vol/diskless/CentOS5
 +
 +
* Which network device to use when booting
 +
    ETHERNET=eth0
 +
 +
* Which snapshot directory to use (path relative to /gluonfs1/diskless/CentOS5-HallD/snapshot)
 +
    SNAPSHOT=rocfcal1.jlab.org
 +
 +
* NIS Domain for filesystem permissions
 +
    NISDOMAIN=CCCHP
 +
 +
* Extra virtual memory allocation for VME outbound windows
 +
    vmalloc=256MB
 +
 +
Scripts are provided in the directory ('''MakeNode.sh''')
 +
  /gluonfs1/diskless/tftpboot/linux-install/pxelinux.cfg/
 +
 +
to use a template for the easy generation of these configuration files.  Example usage:
 +
  MakeNode.sh rocfcal1.jlab.org
 +
 +
generates the file
 +
  8139870B
 +
 +
as well as a softlink:
 +
  rocfcal1.jlab.org -> 8139870B
 +
 +
The tftp server configuration file (rarely changed)
 +
  /etc/xinetd.d/tftp -> /gluonfs1/diskless/conf/tftp
 +
 +
If this file is changed, restart the server with
 +
  /sbin/service xinetd restart

Latest revision as of 15:19, 2 November 2017

Summary

This page will document how to set up a new VME controller for the PXE boot and diskless OS client on the Hall D DAQ network.


JNET

JNET access is necessary for properly obtaining an IP address and assigning a hostname to a specified MAC address on the VME Controler.

  • In a web browser (on a machine on the Hall D network), log into JNET
  • Click on the Machine Registration tab
  • Click on Add Device
  • Enter the relevant information
    • MAC Address of front panel LAN port to be used
    • VLAN 635 : Hall D DAQ (CODA)
    • Requested Hostname (please conform to Hall D Naming Convention)
    • Take note of the automatically assigned IP Address

GLUON26

gluon26.jlab.org hosts the Hall D DHCP and tftp servers. DHCP is required to provide the Controller's IP address, tftp server IP, and tftp boot file information. Modification of the relevant configuration files for both servers requires root or sudo privledges.

DHCP

  • Configuration file:
 /etc/dhcp/dhcpd.conf -> /gluonfs1/diskless/conf/dhcpd.conf
  • Add an entry for requested hostname within the group with commented line:
 # PXE bootable hosts
This group has the common configuration parameters
 filename "linux-diskless/pxelinux.0";      # Binary for PXE booting environment
 next-server 129.57.172.40;                 # tftp server: gluon26.jlab.org
The new entry should have this format
 host rocfcal1                              # Requested hostname
   { 
       hardware ethernet 00:40:9E:03:2D:75; # MAC ADDRESS
       fixed-address 129.57.135.11;         # Assigned IP address
   }
  • After saving the file, restart the DHCP server with:
 /sbin/service dhcpd restart

TFTP

The tftp server runs off of the xinetd daemon and very rarely needs to be restarted. The relevant configuration files are located here

 /gluonfs1/diskless/tftpboot/linux-diskless/pxelinux.cfg/

Each host has its own configuration file with the filename provided by its IP address. For example

 8139870B -> 129.57.135.11

This translation can be done using the command gethostip (installed on gluon26 from syslinux RPM). For example

> gethostip rocfcal1.jlab.org
rocfcal1.jlab.org 129.57.135.11 8139870B

This file provides the PXE client with the information on where to find the linux kernel and what kernel commandline options to include. For example:

default CentOS5-HallD

label CentOS5-HallD
    kernel CentOS5-HallD/vmlinuz
    append initrd=CentOS5-HallD/initrd.img root=/dev/ram0 init=disklessrc 
           NFSROOT=129.57.172.15:/vol/diskless/CentOS5 
           ramdisk_size=22947 ETHERNET=eth0 SNAPSHOT=rocfcal1.jlab.org 
           NISDOMAIN=CCCHP vga=0x305 vmalloc=256MB

Parameters of interest

  • Where to find the linux kernel (path relative to /gluonfs1/diskless/tftpboot/linux-install/)
   kernel CentOS5-HallD/vmlinuz
  • Ramdisk image:
   initrd=CentOS5-HallD/initrd.img
  • ROOT of diskless filesystem (NFS mounted from gluonfs1, contents at /gluonfs1/diskless/CentOS5-HallD/root)
   NFSROOT=129.57.172.15:/vol/diskless/CentOS5 
  • Which network device to use when booting
   ETHERNET=eth0
  • Which snapshot directory to use (path relative to /gluonfs1/diskless/CentOS5-HallD/snapshot)
   SNAPSHOT=rocfcal1.jlab.org 
  • NIS Domain for filesystem permissions
   NISDOMAIN=CCCHP
  • Extra virtual memory allocation for VME outbound windows
   vmalloc=256MB

Scripts are provided in the directory (MakeNode.sh)

 /gluonfs1/diskless/tftpboot/linux-install/pxelinux.cfg/

to use a template for the easy generation of these configuration files. Example usage:

 MakeNode.sh rocfcal1.jlab.org

generates the file

 8139870B

as well as a softlink:

 rocfcal1.jlab.org -> 8139870B

The tftp server configuration file (rarely changed)

 /etc/xinetd.d/tftp -> /gluonfs1/diskless/conf/tftp

If this file is changed, restart the server with

 /sbin/service xinetd restart