From 8432960e02a218360d6b3d8cbdbfa9613c89367b Mon Sep 17 00:00:00 2001 From: Andrey Kiryanov Date: Tue, 25 Jun 2024 00:37:02 +0300 Subject: [PATCH] Automatically add biosboot partition on >2TB drives with RHEL 7/8 (#7400) Co-authored-by: Andrey Kiryanov --- xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 | 3 +++ xCAT-server/share/xcat/install/scripts/pre.rhels8 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 b/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 index aaf7b4fad..f3cc317a4 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 +++ b/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 @@ -245,6 +245,9 @@ echo "ignoredisk --only-use=$instdisk" >> /tmp/partitionfile if [ `uname -m` = "ppc64" -o `uname -m` = "ppc64le" ]; then echo 'part None --fstype "PPC PReP Boot" --ondisk '$instdisk' --size 8' >> /tmp/partitionfile fi +if [ `blockdev --getsz $instdisk` -gt 4294967295 ]; then + echo 'part biosboot --size 1 --ondisk '$instdisk >> /tmp/partitionfile +fi if [ -d /sys/firmware/efi ]; then echo 'part /boot/efi --size 50 --ondisk '$instdisk' --fstype '$EFIFSTYPE >> /tmp/partitionfile fi diff --git a/xCAT-server/share/xcat/install/scripts/pre.rhels8 b/xCAT-server/share/xcat/install/scripts/pre.rhels8 index 26d8f6ae4..5be2a2646 100644 --- a/xCAT-server/share/xcat/install/scripts/pre.rhels8 +++ b/xCAT-server/share/xcat/install/scripts/pre.rhels8 @@ -264,6 +264,9 @@ case "$(uname -m)" in echo "part prepboot --fstype=prepboot --asprimary --ondisk=$instdisk --size=8" >>/tmp/partitionfile ;; esac +if [ `blockdev --getsz $instdisk` -gt 4294967295 ]; then + echo "part biosboot --ondisk=$instdisk --size=1" >> /tmp/partitionfile +fi if [ -d /sys/firmware/efi ] then echo "part /boot/efi --fstype=$EFIFSTYPE --ondisk=$instdisk --size=256" >>/tmp/partitionfile