From 5252f1e581c6914413f9fbec86caf11fe6dc922c Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 22 Oct 2023 00:42:06 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E6=89=A9=E5=AE=B9=E6=97=B6=E6=9B=B4?= =?UTF-8?q?=E4=BC=98=E9=9B=85=E5=9C=B0=E6=89=BE=E5=88=B0=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E7=A1=AC=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resize.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resize.sh b/resize.sh index 1ed6f18..8aea820 100644 --- a/resize.sh +++ b/resize.sh @@ -22,7 +22,8 @@ update_part() { # 找出主硬盘 # shellcheck disable=SC2010 -xda=$(mount | awk '$3=="/" {print $1}' | grep -Eo 'sda|hda|xda|vda|xvda|nvme0n1') +root_drive=$(mount | awk '$3=="/" {print $1}') +xda=$(lsblk -r --inverse "$root_drive" | grep -w disk | awk '{print $1}') # 删除 installer 分区 installer_num=$(readlink -f /dev/disk/by-label/installer | grep -o '[0-9]*$')