2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Thinker xCAT/postscripts/cuda_power9_setup, (#5231)

* Fix the 40-redhat.rules udev rule
  * Remake initrd image for diskfull compute node
This commit is contained in:
Gᴏɴɢ Jie 2018-05-21 15:44:04 +08:00 committed by Bin Xu
parent 5ebcfc347f
commit eca6613c43

View File

@ -22,6 +22,15 @@ printf '[Service]\nRestart=always\n' > ${IMG_ROOTIMGDIR}/etc/systemd/system/nvid
[ ! -z "${IMG_ROOTIMGDIR}" ] && CHROOTCMD="chroot ${IMG_ROOTIMGDIR}"
$CHROOTCMD /bin/bash -c "systemctl enable nvidia-persistenced"
rm -f ${IMG_ROOTIMGDIR}/lib/udev/rules.d/40-redhat.rules
if [ -f ${IMG_ROOTIMGDIR}/lib/udev/rules.d/40-redhat.rules ]
then
sed -i /SUBSYSTEM==\"memory\"/d ${IMG_ROOTIMGDIR}/lib/udev/rules.d/40-redhat.rules
fi
echo 'options nvidia NVreg_EnableStreamMemOPs=1 NVreg_RegistryDwords="PeerMappingOverride=1"' >${IMG_ROOTIMGDIR}/usr/lib/modprobe.d/nvidia.conf
if [ -z "${IMG_ROOTIMGDIR}" ]
then
kernel_version="$(for d in $(ls /lib/modules | sort -V) ; do : ; done && echo $d)"
mkinitrd -v -f "/boot/initramfs-${kernel_version}.img" "${kernel_version}"
fi