mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-21 13:35:32 +00:00
Merge pull request #7037 from gurevichmark/RH8-genesis-builder
Allow Genesis Builder to run on RHEL8 Systems (2)
This commit is contained in:
@ -12,9 +12,16 @@ DIR=`dirname $0`
|
||||
#DIR=`realpath $DIR`
|
||||
DIR=`readlink -f $DIR`
|
||||
BUILDARCH=`uname -m`
|
||||
REQUIRED_PACKAGES="rpmdevtools rpm-build screen lldpad mstflint epel-release ipmitool pciutils mdadm dosfstools usbutils bind-utils psmisc nmap-ncat"
|
||||
|
||||
# Install required packages
|
||||
yum -y install rpmdevtools rpm-build screen lldpad mstflint
|
||||
for required_package in $REQUIRED_PACKAGES; do
|
||||
yum -y install $required_package
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Can not install required packages $required_package, make sure EPEL repository is configured"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
rpmdev-setuptree
|
||||
|
||||
@ -44,9 +51,7 @@ fi
|
||||
# get all modules in the kernel
|
||||
cd $DIR
|
||||
KERVER=`uname -r`
|
||||
if [ ! -e "./default_module_list" ]; then
|
||||
mv ./installkernel ./default_module_list
|
||||
fi
|
||||
|
||||
echo "#!/bin/bash" > ./installkernel
|
||||
for line in `cat /lib/modules/$KERVER/modules.dep | awk -F: '{print \$1}'`; do
|
||||
basename $line >> ./installkernel;
|
||||
@ -149,7 +154,7 @@ libnss_pkgname=`find /usr/lib64/ -name libnss_dns-2*.so | xargs basename`
|
||||
sed -i "s/\/lib64\/libnss_dns-2.12.so/\/usr\/lib64\/$libnss_pkgname/g" $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib64\/libnss_dns.so.2/\/usr\/lib64\/libnss_dns.so.2/' $DRACUTMODDIR/install
|
||||
|
||||
# Based on cmdlist_check, makesure the commands are included in $DRACUTMODDIR/install
|
||||
# Based on cmdlist_check, make sure the commands are included in $DRACUTMODDIR/install
|
||||
if [ -e "${DRACUTMODDIR}/cmdlist_check" ]; then
|
||||
miss_cmd=0
|
||||
for cmd in `cat ${DRACUTMODDIR}/cmdlist_check`; do
|
||||
@ -202,6 +207,8 @@ for d in `echo $PERL_LIB_DIR`; do
|
||||
fi
|
||||
done
|
||||
|
||||
# create directory for ssh-keygen
|
||||
mkdir -p /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs/etc/ssh
|
||||
|
||||
# create the predictable naming for nics
|
||||
LIB_UDEV_RULES="/lib/udev/rules.d/"
|
||||
|
@ -581,6 +581,13 @@ inst "$moddir/xcatroot" "/sbin/xcatroot"
|
||||
inst "$moddir/dhclient.conf" "/etc/dhclient.conf"
|
||||
inst "$moddir/dhclient-script" "/sbin/dhclient-script"
|
||||
inst "$moddir/rsyslog.conf" "/etc/rsyslog.conf"
|
||||
dracut_install rngd
|
||||
dracut_install chronyc chronyd rpcbind systemd-tmpfiles
|
||||
dracut_install /etc/ssh
|
||||
dracut_install /etc/chrony.conf
|
||||
dracut_install /etc/chrony.keys
|
||||
dracut_install /run/rpcbind
|
||||
dracut_install /etc/systemd/system.conf
|
||||
dracut_install /sbin/rpc.statd /usr/sbin/sm-notify /etc/netconfig rpcbind /etc/host.conf /usr/sbin/rpc.idmapd
|
||||
dracut_install ps free find #debug
|
||||
inst_dir /var/lib/nfs
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
instmods nfs sunrpc
|
||||
instmods e1000 e1000e virtio_net virtio_pci igb ines sfc mlx4_en mlx5_core cxgb3 cxgb4 tg3 bnx2 bnx2x bna ixgb ixgbe qlge mptsas mpt2sas mpt3sas ata_piix megaraid_sas virtio_blk ahci ibmaem xhci-hcd sd_mod pmcraid be2net vfat ext3 ext4 btrfs reiserfs usb_storage scsi_wait_scan kvm kvm-intel kvm-amd ipmi_powernv ipmi_si ipmi_devintf qlcnic xfs
|
||||
instmods macvlan macvtap 8021q bridge bonding vmxnet3 cpufreq_ondemand acpi-cpufreq powernow-k8 cdc_ether
|
||||
instmods mptctl #LSI firmware management requires this
|
||||
instmods mlx4_ib mlx5_ib ib_umad #make the mellanox ib available enough to examine /sys
|
||||
instmods reiserfs #reiserfs on sysclone
|
||||
instmods ibmveth # ppc64 virtual ethernet
|
||||
instmods ibmvscsi # ppc64 virtual disk
|
||||
instmods ehea # ppc64 hea ethernet
|
||||
instmods dm-mod #support LVM for sysclone
|
||||
instmods sg # Lenovo thinkserver firmware update support
|
||||
instmods ipr # IBM Power RAID
|
||||
instmods i40e # Intel 40GbE
|
||||
instmods rtc-opal # For hardware clock
|
@ -15,6 +15,7 @@ sshd:x:30:30:SSH User:/var/empty/sshd:/sbin/nologin
|
||||
rpc:x:32:32:Rpcbind Daemon:/var/cache/rpcbind:/sbin/nologin
|
||||
rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
|
||||
qemu:x:107:107:qemu user:/:/sbin/nologin
|
||||
chrony:x:995:991::/var/lib/chrony:/sbin/nologin
|
||||
__ENDL
|
||||
# Fedora 20 ppc64 uses /lib/dracut/hooks/initqueue/finished
|
||||
# CentOS 7 probably uses /lib/dracut/hooks/initqueue/finished also
|
||||
@ -50,6 +51,13 @@ sleep 20
|
||||
ARCH="$(uname -m)"
|
||||
|
||||
if [[ ${ARCH} =~ ppc64 ]]; then
|
||||
# load all network driver modules listed in /lib/modules/<kernel>/modules.dep file
|
||||
KERVER=`uname -r`
|
||||
for line in `cat /lib/modules/$KERVER/modules.dep | awk -F: '{print \$1}' | sed -e "s/\(.*\)\.ko.*/\1/"`; do
|
||||
if [[ $line =~ "kernel/drivers/net" ]]; then
|
||||
modprobe `basename $line`
|
||||
fi
|
||||
done
|
||||
waittime=2
|
||||
ALL_NICS=$(ip link show | grep -v "^ " | awk '{print $2}' | sed -e 's/:$//' | grep -v lo)
|
||||
for tmp in $ALL_NICS; do
|
||||
|
Reference in New Issue
Block a user