mkfs.ext4 添加 -F
如果旧文件系统是 xfs, mkfs.ext4 会提示是否格式化,加 -F 不弹提示,强制格式化
This commit is contained in:
parent
0aac4fe2af
commit
910ee0466d
16
ks-trans.cfg
16
ks-trans.cfg
@ -53,9 +53,9 @@ if [ -d /sys/firmware/efi ]; then
|
|||||||
mkpart '" "' ext4 -2GiB 100% \
|
mkpart '" "' ext4 -2GiB 100% \
|
||||||
set 1 boot on
|
set 1 boot on
|
||||||
update_part /dev/$xda
|
update_part /dev/$xda
|
||||||
mkfs.fat -F 32 -n efi /dev/${xda}*1 #1 efi
|
mkfs.fat -F 32 -n efi /dev/${xda}*1 #1 efi
|
||||||
mkfs.ext4 -L os /dev/${xda}*2 #2 os
|
mkfs.ext4 -F -L os /dev/${xda}*2 #2 os
|
||||||
mkfs.ext4 -L installer /dev/${xda}*3 #3 installer
|
mkfs.ext4 -F -L installer /dev/${xda}*3 #3 installer
|
||||||
elif [ "$disk_size" -ge "$disk_2t" ]; then
|
elif [ "$disk_size" -ge "$disk_2t" ]; then
|
||||||
# bios 2t
|
# bios 2t
|
||||||
parted /dev/$xda -s -- \
|
parted /dev/$xda -s -- \
|
||||||
@ -65,9 +65,9 @@ elif [ "$disk_size" -ge "$disk_2t" ]; then
|
|||||||
mkpart '" "' ext4 -2GiB 100% \
|
mkpart '" "' ext4 -2GiB 100% \
|
||||||
set 1 bios_grub on
|
set 1 bios_grub on
|
||||||
update_part /dev/$xda
|
update_part /dev/$xda
|
||||||
echo #1 bios_boot
|
echo #1 bios_boot
|
||||||
mkfs.ext4 -L os /dev/${xda}*2 #2 os
|
mkfs.ext4 -F -L os /dev/${xda}*2 #2 os
|
||||||
mkfs.ext4 -L installer /dev/${xda}*3 #3 installer
|
mkfs.ext4 -F -L installer /dev/${xda}*3 #3 installer
|
||||||
else
|
else
|
||||||
# bios
|
# bios
|
||||||
parted /dev/$xda -s -- \
|
parted /dev/$xda -s -- \
|
||||||
@ -76,8 +76,8 @@ else
|
|||||||
mkpart primary ext4 -2GiB 100% \
|
mkpart primary ext4 -2GiB 100% \
|
||||||
set 1 boot on
|
set 1 boot on
|
||||||
update_part /dev/$xda
|
update_part /dev/$xda
|
||||||
mkfs.ext4 -L os /dev/${xda}*1 #1 os
|
mkfs.ext4 -F -L os /dev/${xda}*1 #1 os
|
||||||
mkfs.ext4 -L installer /dev/${xda}*2 #2 installer
|
mkfs.ext4 -F -L installer /dev/${xda}*2 #2 installer
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 挂载主分区
|
# 挂载主分区
|
||||||
|
Loading…
Reference in New Issue
Block a user