diff --git a/xCAT-server/share/xcat/install/scripts/pre.rhels8 b/xCAT-server/share/xcat/install/scripts/pre.rhels8 index 66abd34db..11a9ee9d7 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.rhels8 +++ b/xCAT-server/share/xcat/install/scripts/pre.rhels8 @@ -206,6 +206,26 @@ base64decode() done } +getdisksize() +{ + local disk="$1" + + local blah + local blocks + local name + + while read -r blah blah blocks name + do + if [ "${name}" = "${disk}" ] + then + echo "${blocks}" + break + fi + done >/tmp/partitionfile fi +DISKSIZE="$(getdisksize "${instdisk}")" + # TODO: Ondisk detection, /dev/disk/by-id/edd-int13_dev80 for legacy maybe, and no idea about efi. At least maybe blacklist SAN if mptsas/mpt2sas/megaraid_sas seen... echo "part /boot --fstype=$BOOTFSTYPE --asprimary --ondisk=$instdisk --size=512" >>/tmp/partitionfile echo "part pv.000997 --grow --asprimary --ondisk=$instdisk --size=18432" >>/tmp/partitionfile