From decd51de2dc0253cc8edb5af92c3d7d1c5db3c83 Mon Sep 17 00:00:00 2001 From: ertaozh Date: Mon, 26 Jan 2015 04:31:29 -0500 Subject: [PATCH] fix defect 4535: xcat can not get the right disk name for powerkvm VM --- xCAT-server/share/xcat/install/ubuntu/compute.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/install/ubuntu/compute.tmpl b/xCAT-server/share/xcat/install/ubuntu/compute.tmpl index ed857afdb..d7bd64a85 100644 --- a/xCAT-server/share/xcat/install/ubuntu/compute.tmpl +++ b/xCAT-server/share/xcat/install/ubuntu/compute.tmpl @@ -52,7 +52,7 @@ d-i partman/early_command string \ head -n1 /tmp/devs-with-boot | egrep -o '\S+[^0-9]' > /tmp/boot_disk; \ rm /tmp/devs-with-boot 2>/dev/null || true; \ else \ - DEV=`ls /dev/disk/by-path/* -l | egrep -o '/dev.*sd[^0-9]$' | sort -t : -k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -g | head -n1 | egrep -o 'sd.*$'`; \ + DEV=`ls /dev/disk/by-path/* -l | egrep -o '/dev.*[s|h|v]d[^0-9]$' | sort -t : -k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -g | head -n1 | egrep -o '[s|h|v]d.*$'`; \ if [[ "$DEV" == "" ]]; then DEV="sda"; fi; \ echo "/dev/$DEV" > /tmp/boot_disk; \ fi; \