From 4d975fb8b292f1a04ba1c066b7ebe01dfdc503f2 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Thu, 25 Jan 2024 20:50:30 +0800 Subject: [PATCH] =?UTF-8?q?windows:=20bios=20+=20mbr=20=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E7=9B=98=E6=9C=80=E5=A4=A7=E5=8F=AF=E7=94=A8=202t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trans.sh b/trans.sh index b8e1499..a32f663 100644 --- a/trans.sh +++ b/trans.sh @@ -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