mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-19 04:49:13 +08:00
core: 兼容 xen 磁盘
This commit is contained in:
parent
69f2bd2e58
commit
9efe2552e3
2
ks.cfg
2
ks.cfg
@ -9,7 +9,7 @@ reboot
|
|||||||
%include /tmp/include-url-command
|
%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"
|
bootloader # 甲骨文x86输出到控制台添加 --append="console=ttyS0,9600"
|
||||||
clearpart --all --initlabel
|
clearpart --all --initlabel
|
||||||
reqpart # 如果需要,自动创建 efi 或 biosboot 分区
|
reqpart # 如果需要,自动创建 efi 或 biosboot 分区
|
||||||
|
@ -21,7 +21,9 @@ update_part() {
|
|||||||
# ubuntu grownpart
|
# 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 分区
|
||||||
installer_num=$(readlink -f /dev/disk/by-label/installer | grep -o '[0-9]*$')
|
installer_num=$(readlink -f /dev/disk/by-label/installer | grep -o '[0-9]*$')
|
||||||
|
2
trans.sh
2
trans.sh
@ -137,7 +137,7 @@ fi
|
|||||||
# alpine 不自带lsblk,liveos安装的软件也会被带到新系统,所以不用lsblk
|
# alpine 不自带lsblk,liveos安装的软件也会被带到新系统,所以不用lsblk
|
||||||
# xda=$(lsblk -dn -o NAME | grep -E 'nvme0n1|.da')
|
# xda=$(lsblk -dn -o NAME | grep -E 'nvme0n1|.da')
|
||||||
# shellcheck disable=SC2010
|
# shellcheck disable=SC2010
|
||||||
xda=$(ls /dev/ | grep -Ex '[shv]da|nvme0n1')
|
xda=$(ls /dev/ | grep -Ex 'sda|hda|xda|vda|xvda|nvme0n1')
|
||||||
|
|
||||||
# arm要手动从硬件同步时间,避免访问https出错
|
# arm要手动从硬件同步时间,避免访问https出错
|
||||||
hwclock -s
|
hwclock -s
|
||||||
|
@ -8,7 +8,9 @@ cat <<EOF >>/autoinstall.yaml
|
|||||||
size: 0
|
size: 0
|
||||||
EOF
|
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 没什么用
|
# 是用 size 寻找分区,number 没什么用
|
||||||
# https://curtin.readthedocs.io/en/latest/topics/storage.html
|
# https://curtin.readthedocs.io/en/latest/topics/storage.html
|
||||||
size_os=$(lsblk -bn -o SIZE /dev/disk/by-label/os)
|
size_os=$(lsblk -bn -o SIZE /dev/disk/by-label/os)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user