2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-20 02:00:24 +00:00

Extract correct size of the nvme disk partition

This commit is contained in:
Mark Gurevich
2021-03-03 13:51:27 -05:00
parent 01780a010e
commit ef814440be

View File

@@ -45,9 +45,10 @@ if [ -z "$install_disk" ]; then
# Classify entries by DEVTYPE
for entry in $entries; do
DEVSIZE=$(udevadm info --attribute-walk --name=$entry|grep size| sed -e 's/[^"]*"//' -e 's/"//'|tail -n 1)
DEVSIZE=$(udevadm info --attribute-walk --name=$entry|grep \{size\}| sed -e 's/[^"]*"//' -e 's/"//'|tail -n 1)
if [ -z "$DEVSIZE" -o $DEVSIZE -lt 262144 ]; then
# ignore small devices, that are likely remote media or similar
echo "[get_install_disk] Skipping partition $entry. Size too small: $DEVSIZE"
continue
fi