diff --git a/misc/packaging/acrn-hypervisor.postinst b/misc/packaging/acrn-hypervisor.postinst index d61f0908e..73c29927d 100644 --- a/misc/packaging/acrn-hypervisor.postinst +++ b/misc/packaging/acrn-hypervisor.postinst @@ -21,7 +21,7 @@ GENERATED_PARAMS=(cpu_perf_policy=Performance) #ACRN parameters End ACRNBIN="/boot/acrn.${SCENARIO}.${BOARD}.bin" -type=$(lsblk -l |awk '$NF == "/" {print $1}') +type=$(findmnt / |awk '$1 == "/" {print $2}') pattern='^/dev/.* UUID="([^"]+)".* PARTUUID="([^"]+)"' while IFS= read -r line; do @@ -29,7 +29,7 @@ while IFS= read -r line; do uuid="${BASH_REMATCH[1]}" partuuid="${BASH_REMATCH[2]}" fi -done < <(blkid |grep ext4 |grep ${type}) +done < <(blkid |grep ${type}) filename="/etc/grub.d/40_custom" diff --git a/misc/packaging/acrn-kernel.postinst b/misc/packaging/acrn-kernel.postinst index 1704c254e..23e024b66 100644 --- a/misc/packaging/acrn-kernel.postinst +++ b/misc/packaging/acrn-kernel.postinst @@ -3,7 +3,7 @@ # postinst script for acrn kernel filename="/etc/grub.d/40_custom" menu=$(grep ACRN_deb_multiboot2 ${filename}) || true -type=$(lsblk -l |awk '$NF == "/" {print $1}') +type=$(findmnt / |awk '$1 == "/" {print $2}') str=$(blkid |grep ${type}) uuid=$(echo $str |cut -d " " -f 2|cut -d "=" -f 2) str=$(blkid |grep ${type})