diff --git a/ks.cfg b/ks.cfg index d0420df..2ed8592 100644 --- a/ks.cfg +++ b/ks.cfg @@ -9,7 +9,7 @@ reboot %include /tmp/include-url-command # 分区 -ignoredisk --only-use="hda|sda|vda|nvme0n1" +ignoredisk --only-use="sda|hda|xda|vda|xvda|nvme0n1" bootloader # 甲骨文x86输出到控制台添加 --append="console=ttyS0,9600" clearpart --all --initlabel reqpart # 如果需要,自动创建 efi 或 biosboot 分区 diff --git a/resize.sh b/resize.sh index 98b941a..c1a795c 100644 --- a/resize.sh +++ b/resize.sh @@ -21,7 +21,9 @@ update_part() { # ubuntu grownpart # 找出主硬盘 -xda=$(lsblk -dn -o NAME | grep -E 'nvme0n1|.da') +# xda=$(lsblk -dn -o NAME | grep -E 'nvme0n1|.da') +# shellcheck disable=SC2010 +xda=$(ls /dev/ | grep -Ex 'sda|hda|xda|vda|xvda|nvme0n1') # 删除 installer 分区 installer_num=$(readlink -f /dev/disk/by-label/installer | grep -o '[0-9]*$') diff --git a/trans.sh b/trans.sh index 322bc28..0d04fd5 100644 --- a/trans.sh +++ b/trans.sh @@ -137,7 +137,7 @@ fi # alpine 不自带lsblk,liveos安装的软件也会被带到新系统,所以不用lsblk # xda=$(lsblk -dn -o NAME | grep -E 'nvme0n1|.da') # shellcheck disable=SC2010 -xda=$(ls /dev/ | grep -Ex '[shv]da|nvme0n1') +xda=$(ls /dev/ | grep -Ex 'sda|hda|xda|vda|xvda|nvme0n1') # arm要手动从硬件同步时间,避免访问https出错 hwclock -s diff --git a/ubuntu-storage-early.sh b/ubuntu-storage-early.sh index 11a73d8..9d5712b 100644 --- a/ubuntu-storage-early.sh +++ b/ubuntu-storage-early.sh @@ -8,7 +8,9 @@ cat <>/autoinstall.yaml size: 0 EOF -xda=$(lsblk -dn -o NAME | grep -E 'nvme0n1|.da') +# xda=$(lsblk -dn -o NAME | grep -E 'nvme0n1|.da') +# shellcheck disable=SC2010 +xda=$(ls /dev/ | grep -Ex 'sda|hda|xda|vda|xvda|nvme0n1') # 是用 size 寻找分区,number 没什么用 # https://curtin.readthedocs.io/en/latest/topics/storage.html size_os=$(lsblk -bn -o SIZE /dev/disk/by-label/os)