mirror of
https://github.com/bin456789/reinstall.git
synced 2025-10-05 06:24:53 +00:00
windows: 支持 4Kn 硬盘
This commit is contained in:
10
trans.sh
10
trans.sh
@@ -2328,6 +2328,10 @@ get_disk_logic_sector_size() {
|
||||
blockdev --getss "$1"
|
||||
}
|
||||
|
||||
is_4kn() {
|
||||
[ "$(blockdev --getss "$1")" = 4096 ]
|
||||
}
|
||||
|
||||
is_xda_gt_2t() {
|
||||
disk_size=$(get_disk_size /dev/$xda)
|
||||
disk_2t=$((2 * 1024 * 1024 * 1024 * 1024))
|
||||
@@ -6527,6 +6531,12 @@ EOF
|
||||
sed -i 's/EnableEMS=0/EnableEMS=1/i' $startnet_cmd
|
||||
fi
|
||||
|
||||
# 4kn EFI 分区最少要 260M
|
||||
# https://learn.microsoft.com/windows-hardware/manufacture/desktop/hard-drives-and-partitions
|
||||
if is_4kn /dev/$xda; then
|
||||
sed -i 's/is4kn=0/is4kn=1/i' $startnet_cmd
|
||||
fi
|
||||
|
||||
# Windows Thin PC 有 Windows\System32\winpeshl.ini
|
||||
# [LaunchApps]
|
||||
# %SYSTEMDRIVE%\windows\system32\drvload.exe, %SYSTEMDRIVE%\windows\inf\sdbus.inf
|
||||
|
Reference in New Issue
Block a user