basic unattended Centos8 ISO image installation with xCat. the following steps are based on a diskless installation
- both MN OS and the ISO image are based on
CentOS-Stream-8-x86_64-20220513-dvd1.iso
- memory of the MN: 4 GB
- coppied the iso image to
/tmp
on the management node - mounted the iso to
/mnt/iso/centos8
on the management node - created a yum repo file
/etc/yum.repos.d/centos8.repo
- contents of
centos8.repo
:
[centos8-appstream]
name=Centos8 packages
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&infra=$infra
#baseurl=file:///mnt/iso/centos8/AppStream
enabled=1
gpgcheck=1
hostnamectl set-hostname xcatmn.cluster.com
- contents of
/etc/sysconfig/network-scripts/ifcfg-ens160
:
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=ens160
UUID=f8c0d05b-7177-4b1c-b6b3-8f4fb7db5298
DEVICE=ens160
ONBOOT=yes
IPADDR=192.168.121.143
NETMASK=255.255.255.0
GATEWAY=192.168.121.2
PREFIX=24
DNS1=192.168.121.143
- contents of
/etc/resolv.conf
:
# Generated by NetworkManager
search cluster.com
nameserver 192.168.121.143
wget https://raw.githubusercontent.com/xcat2/xcat-core/master/xCAT-server/share/xcat/tools/go-xcat -O - >/tmp/go-xcat
chmod +x /tmp/go-xcat
/tmp/go-xcat install
source /etc/profile.d/xcat.sh
/tmp/go-xcat -x devel install
chtab key=system passwd.username=root passwd.password=root
copycds /tmp/CentOS-Stream-8-x86_64-20220513-dvd1.iso
genimage centos-stream8-x86_64-netboot-compute
packimage centos-stream8-x86_64-netboot-compute
domain=cluster.com
forwarders=192.168.121.2
master=192.168.121.143
nameservers=192.168.121.143
chdef -t site dhcpinterfaces="ens160,virbr0"
mkdef -t node -o cn1 arch=x86_64 mac="00:0C:29:16:54:EB" ip="192.168.121.170" netboot="xnba" groups="all"
makehosts cn1
makedns -n # was asked to disable SELINUX (was disabled already!)
makedhcp -n
--> I got this: No dynamic range specified for 192.168.121.0. If hardware discovery is being used, a dynamic range is required.makedhcp -a
nodeset cn1 osimage=centos-stream8-x86_64-netboot-compute
- power on the compute node
- OS installation starts on the memory (diskless) and login prompt appears
- Issue when compute node had less than 2 GB of RAM. solved by using RAM >= 3 GB
xcatprobe osdeploy -n <node_range>
- osdeploy operating system provision process. Supports two modes - ‘Realtime monitor’ and ‘Replay history’.
- Realtime monitor: This is a default. This tool with monitor provision state of the node. Trigger ‘Realtime monitor’ before rebooting target node to do provisioning.
- Replay history: Used after provisioning is finished to probe the previously completed provisioning.
storing a backup copy of xcat DB so it can be restored later if needed
mkdir ~/Documents/xcat-backup
dumpxCATdb -p ~/Documents/xcat-backup
- restoring data can be done with
restorexCATdb -p <path_to_the_saved_database>
- add the script to /install/postscript/
vim /install/postscripts/{script-name}
chdef cn1 -p postscripts={script-name}
- the script should be run on the next boot of the compute node (diskless)
- in case of dikfull installation:
updatenode cn2 -P
- the previous command should run the script right away
xdsh cn1,cn2 "touch /root/test-file"
- kickstart file is created in diskfull installtion case and we is at
/install/autoinst/{node_name}
and we can modify it.
- DHCP install https://linuxhint.com/dhcp_server_centos8/