xcat网络无盘启动——添加自定义安装包

最近在安装包含chess3的网络无盘启动包。发现手动要调整的太多,还是使用xcat更方便一点。

我们可以发现,在xcat的网络无盘启动中,其实是把/install/netboot/os/arch/compute/rootimg下的东西打了个包,通过查看genimage中产生的信息,我们也可以发现是通过yum --installroot=/install/netboot/os/arch/compute/rootimg将对应的包装到这个目录下的。随后再通过packimage打包。

那这样子事情就比较简单的了,通过更改rootimg下的对应文件就能够把更改做到无盘启动的文件包里。对于编译安装的软件直接复制更改对应就可以了。

对于rpm包,有两种办法安装,对于Redhat等本身dvd中已经有的包需要额外安装,可以更改/opt/xcat/share/netboot/rh/compute.pkglist,添加对应的包,如

cat /opt/xcat/share/netboot/rh/compute.pkglist
bash nfs
-utils openssl dhclient kernel openssh-server openssh-clients busybox-anaconda wget vim-minimal

更改为

cat /opt/xcat/share/netboot/rh/compute.pkglist
bash
nfs-utils
openssl
dhclient
kernel
openssh-server
openssh-clients
busybox-anaconda
wget
vim-minimal
ntp
sysklogd
rpm
rsync
apr
dosfstools
mtools
parted
mkisofs
cdrecord
syslinux
newt

第二种办法是对应于rhel官方dvd中没有的包,建立/install/post/otherpkgs/rhel5.7/x86_64目录(默认此目录不存在),将所需要安装的rpm包复制进去,然后用createrepo增加对应的repo,如果没有createrepo这个命令可以通过yum install createrepo,如

mkdir -p /install/post/otherpkgs/rhel5.7/x86_64
cp ~/client/*.rpm /install/post/otherpkgs/rhel5.7/x86_64/
yum install createrepo
createrepo /install/post/otherpkgs/rhel5.7/x86_64

创建好repo以后,需要在/opt/xcat/share/xcat/netboot/rh/compute.otherpkgs.pkglist中添加需要安装的包。

cat /opt/xcat/share/xcat/netboot/rh/compute.otherpkgs.pkglist
authd
buffer
chess-configurer
clusterit
ganglia-gmond
ganglia-gmond-modules-python
gexec
libconfuse
libganglia
mindi
mindi-busybox
mondo
mpiexec-torque
torque
torque-client
wol

最后,设置pbs客户端的hosts,mom_priv的config及server_name,pbs服务器端的server_priv,nodes等参数,用genimage安装和packimage打包以后,远程机器网络启动即可

注:很多服务依赖于系统时间的统一,所以ntp最好统一

通过chdef -p -t group -o compute postscripts=setupntp将ntp调校加入系统完成后的脚本设置中。可以用tabdump postscripts确认

相关阅读:http://www.cnblogs.com/sickboy/archive/2012/04/09/2439300.html

原文地址:https://www.cnblogs.com/sickboy/p/2440667.html