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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user