Note: this page is no longer used. It is being kept for historical reference, but should not be used for instructions on how to use xCAT. The information is likely out of date.
The provisioning method (provmethod) for node deployment determines the path for important files used during the image generation, install and updatenode process. The valid values for provmethod are install, netboot, statelite or an osimage name from the osimage table.
To determine the current provmethod of your node, run lsdef and look at the provmethod setting.
lsdef <nodename> | grep provmethod
On Linux, if provmethod for the node is install, netboot, or statelite, the os, profile, and arch of that node are used to search for the files in /install/custom/<provmethod>/<platform>; first, and then in /opt/xcat/share/xcat/<provmethod>/<platform>.</platform></provmethod></platform></provmethod>
lsdef node1
Object name: node1
arch=x86_64
.
profile=compute
os=rhels6
provmethod=netboot
In this example, since the provmethod is netboot and the os is rhels6 ( platform rh), the code will search first
/install/custom/netboot/rh for compute* files
and then if not found will search
/opt/xcat/share/xcat/netboot/rh
Before building your stateless image, you need to check the pkglists that will be used to build the image.
On Linux, the default list of rpms to added or exclude when building the image is shipped in the /opt/xcat/share/xcat/netboot/<platform> directory. Our example path is for provmethod=netboot, replace netboot with install in the directory path, for diskfull installs.
On the management node, check the compute node package list to see if it has all the rpms required. Check the exclude list to see if it excludes all packages we do not want.
cd /opt/xcat/share/xcat/netboot/rh/
vi compute.pkglist
vi compute.exlist
For example to add vi to be installed on the node, add the name of the vi rpm to compute.pkglist. Make sure nothing is excluded in compute.exlist that you need. For example, if you require perl on your nodes, remove ./usr/lib/perl5 from compute.exlist . Ensure that the pkglist contains bind-utils so that name resolution will work during boot.
If you modify the current defaults for .pkglist or .exlist or .postinstall, copy the shipped default lists to the custom* directory, so your modifications will not be removed on the next xCAT rpm update. xCAT will first look in the custom directory for the files before going to the share directory.
cp /opt/xcat/share/xcat/**netboot**/rh/compute.pkglist /install/custom/netboot \
/rh/compute.pkglist
Note: as an alternative to using genimage to create the stateless image, you can also capture an image from a running node and create a stateless image out of it. See [Capture_Linux_Image] for details.
[[ref=Install_Additional_Packages]]
Create your package list file, in the /install/custom/<provmethod>/<platform> where platform is your os name (rh,sles,fedora,etc). The file for this provmethod should have the name <profile>.otherpkgs.pkglist. For example, for service nodes, the name might be service.otherpkgs.pkglist. For compute nodes, compute.otherpkgs.list.
There are examples under /opt/xcat/share/xcat/netboot/<platform> of typical *otherpkgs.pkglist files that can be copied to the appropriate directory and modified.
Using postinstall files is optional. There are some examples shipped in /opt/xcat/share/xcat/netboot/<platform>.
There are rules for which * postinstall files will be selected to be used by genimage for by the diskfull install process.
If you are going to make modifications, copy the appropriate /opt/xcat/share/xcat/netboot/<platform>/*postinstall file to the
/install/custom/netboot/<platform> directory, so that on the next update of xCAT you changes will not be overwritten.
cp opt/xcat/share/xcat/**netboot**/<platform>/*postinstall /install/custom/**netboot**/<platform>/.
Use these basic rules to edit the correct file in the /install/custom/netboot/<platform> directory. The rule allows you to customize your image down to the profile, os and architecture level, if needed.
You will find *postinstall files of the following formats and they will process the files in the order of the below formats:
<profile>.<os>.<arch>.postinstall
<profile>.<arch>.postinstall
<profile>.<os>.postinstall
<profile>.postinstall
This means, if "<profile>.<os>.<arch>.postinstall" is there, it will be used first.
You can add more postinstall process ,if you want. The basic postinstall script (2.4) will be named <profile>.<arch>.postinstall ( e.g. compute.ppc64.postinstall). You can create one for a specific os by copying the shipped one to , for example, compute.rhels5.4.ppc64.postinstall
Refer to the following documentation for setting up synclist files [Sync-ing_Config_Files_to_Nodes].
cd /opt/xcat/share/xcat/netboot/rh/
./genimage -i eth0 -n tg3,bnx2 -o rhels6 -p compute
The genimage will create a default /etc/fstab in the image, for example:
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /tmp tmpfs defaults,size=10m 0 2
tmpfs /var/tmp tmpfs defaults,size=10m 0 2
compute_x86_64 / tmpfs rw 0 1
If you want to change the defaults, on the management node, edit fstab in the image or use a postinstall script ( see below):
Edit fstab in the image:
cd /install/netboot/rhels6/x86_64/compute/rootimg/etc
cp fstab fstab.ORIG
vi fstab
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
#tmpfs /dev/shm tmpfs rw 0 0
compute_x86_64 / tmpfs rw 0 1
none /tmp tmpfs defaults,size=10m 0 2
none /var/tmp tmpfs defaults,size=10m 0 2
_Note: adding /tmp and /var/tmp to /etc/fstab is optional, most installations can simply use /. It was documented her to show that you can restrict the size of filesystems, if you need to. The indicated values are just and example, and you may need much bigger filessystems, if running applications like OpenMPI. _
Use postinstall script
Another way to change the fstab during image generation is to use a postinstall script. Add lines such as the following to your postinstall script and then follow the instructions for setting up your postinstall before running the genimage.
#-- Example how /etc/fstab can be automatically generated during image generation:
cat <END >$installroot/etc/fstab
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
${profile}_${arch} / tmpfs rw 0 1
none /tmp tmpfs defaults,size=15m 0 2
none /var/tmp tmpfs defaults,size=15m 0 2
END
Pack the image:
packimage -o rhels6 -p compute -a x86_64
If the stateless image you are building doesn't match the OS/architecture of the management node, logon to the node with the desired architecture. Here the Management Node name is xcatmn.
ssh <node>
mkdir /install
mount xcatmn:/install /install ( make sure the mount is rw)
Create rhels6.repo:
cd /etc/yum.repos.d
rm -f *.repo
Put the following lines in /etc/yum.repos.d/rhels6.repo:
[rhels6]
name=rhels6 $releasever - $basearch
baseurl=file:///install/rhels6/x86_64
enabled=1
gpgcheck=0
Test with: yum search gcc
Copy the executables and files needed from the Management Node:
mkdir /root/netboot
cd /root/netboot
scp xcatmn:/opt/xcat/share/xcat/netboot/rh/genimage .
scp xcatmn:/opt/xcat/share/xcat/netboot/rh/geninitrd .
scp xcatmn:/opt/xcat/share/xcat/netboot/rh/compute.x86_64.pkglist .
scp xcatmn:/opt/xcat/share/xcat/netboot/rh/compute.exlist .
scp -r xcatmn:/opt/xcat/share/xcat/netboot/rh/dracut/ .
To build the image on the node run:
./genimage -i eth0 -n tg3 -o rhels6 -p compute
See the section above on building the stateless image on the MN.
Pack the image on xcatmn:
packimage -o rhels6 -p compute -a x86_64
You can continue to customize the image and then you can boot a node with the image:
nodeset <nodename> netboot
rpower <nodename> boot
You can monitor the install by running:
rcons <nodename>
tail -f /var/log/messages
Wiki: Capture_Linux_Image
Wiki: Editing_and_Downloading_xCAT_Documentation
Wiki: Sync-ing_Config_Files_to_Nodes