windows: bios + mbr 启动盘最大可用 2t

This commit is contained in:
bin456789 2024-01-25 20:50:30 +08:00
parent 9f5fcbd87a
commit 4d975fb8b2
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -845,11 +845,12 @@ create_part() {
mkfs.ext4 -F -L os /dev/$xda*3 #3 os
mkfs.ntfs -f -F -L installer /dev/$xda*4 #4 installer
else
# bios
# bios + mbr 启动盘最大可用 2t
is_xda_gt_2t && max_usable_size=2TiB || max_usable_size=100%
parted /dev/$xda -s -- \
mklabel msdos \
mkpart primary ntfs 1MiB -${part_size} \
mkpart primary ntfs -${part_size} 100% \
mkpart primary ntfs -${part_size} ${max_usable_size} \
set 1 boot on
update_part /dev/$xda