Skip to content

Commit 002d473

Browse files
committed
Add GPT "Fix" guide.
1 parent 3c07aba commit 002d473

File tree

4 files changed

+98
-5
lines changed

4 files changed

+98
-5
lines changed

.vitepress/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ function sidebarDocs(): DefaultTheme.SidebarItem[] {
4242
{ text: 'Install Drivers', link: '/InstallationGuides/InstallDrivers'},
4343
{ text: 'Enter UMS Mode', link: '/InstallationGuides/EnterUMS'},
4444
{ text: 'Hide Partition', link: '/InstallationGuides/SetGPTPartitionSystemAttr.md'},
45+
{ text: '24H2 GPT Errata', link: '/InstallationGuides/GPTErrata.md'},
4546
]
4647
},
4748
{

InstallationGuides/GPTErrata.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# GPT "Fix" for Windows 24H2 and later
2+
Since 24H2, there is a weird bug which will turn your device into a brick after OOBE or updates.
3+
This guide provides a method that must be performed before installing 24H2 by modifying the partition table, helping you prevent this issue from occurring.
4+
5+
:::danger
6+
Please always do GPT fix before installing/reinstalling Windows.
7+
:::
8+
9+
## Requirements
10+
- A phone running Android
11+
- Termux, gdisk, and root access on Android.
12+
13+
## Steps in Android/Linux
14+
- Install [Termux](https://github.com/termux/termux-app/releases)
15+
- General setup and installation of gptfdisk
16+
```bash
17+
# Replace mirror
18+
# *Use space to select and enter to confirm*
19+
termux-change-repo
20+
# Update
21+
apt update
22+
# Install root repo
23+
apt install root-repo
24+
# Install gptfdisk
25+
apt install tsu gptfdisk
26+
```
27+
- Open gdisk and run
28+
```bash
29+
tsu # when termux requests root permission, please agree.
30+
gdisk /dev/block/sda # sda can be sda, sdb, or other letters
31+
# In gdisk CLI
32+
x
33+
j
34+
# Enter without typing anything
35+
k
36+
# Enter without typing anything
37+
w
38+
y
39+
```
40+
- **Redo** the last step for sdb, sdc, sdd, sde, sdf... until gdisk gives an error.
41+
42+
## Why Windows corrupts your GPT?
43+
Windows increases `Starting LBA of entries` of all luns except lun0 but did not move LBA entries and update CRC.
44+
Causes the beginning LBA to not be recognized and GPT corruption. Then your device cannot boot anymore.
45+
46+
## Reference
47+
- [Zhihu - Why WOA breaks GPT and sends your device to 9008](https://zhuanlan.zhihu.com/p/1984041980913807755)
48+
- [TG - Chat message](https://t.me/project_aloha_issues/1/93859)

InstallationGuides/SetGPTPartitionSystemAttr.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
> In Windows, you may want to *hide* some partitions
33
> in Windows Disk Manager to prevent damage from Windows,
44
> this guide will tell you how to change gpt partition's
5-
> attribute to mark a partition as **system** partition.
5+
> attribute to mark a partition as **system** partition.
66
77
:::warning
88
Please **carefully** read each step and comments.
@@ -105,7 +105,3 @@ a # Change partition attribute
105105
# 60 (read-only)
106106
```
107107
- Set system bit for all partitions in a lun can make the lun invisible in Windows device manager.
108-
109-
## In the last
110-
This guide only help you interact with tools in CLI.
111-
The tool may support run in script, why not have a try with running these commands in script?

zh/InstallationGuides/GPTErrata.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Windows 24H2 及更高版本的 GPT "修复"
2+
自 24H2 以来,有一个奇怪的 bug,会在 OOBE 或更新后将您的设备变成砖头。
3+
本指南提供一种需要在安装24H2之前、修改分区表执行的方法以帮助您防止这种情况发生。
4+
5+
:::danger
6+
请在每次安装/重新安装 Windows之前,或者重新分区之后进行GPT修复。
7+
:::
8+
9+
## 要求
10+
- 一部运行 Android 的手机
11+
- Termux、gdisk 和 Android 上的 root 访问权限。
12+
13+
## Android/Linux 中的步骤
14+
- 安装 [Termux](https://github.com/termux/termux-app/releases)
15+
- gptfdisk 的一般设置和安装
16+
```bash
17+
# 替换镜像
18+
# *使用空格选择并回车确认*
19+
termux-change-repo
20+
# 更新
21+
apt update
22+
# 安装 root repo
23+
apt install root-repo
24+
# 安装 gptfdisk
25+
apt install tsu gptfdisk
26+
```
27+
- 打开 gdisk 并运行
28+
```bash
29+
tsu # 当 termux 请求 root 权限时,请同意。
30+
gdisk /dev/block/sda # sda 可以是 sda、sdb 或其他字母
31+
# 在 gdisk CLI 中
32+
x
33+
j
34+
# 直接回车,不输入任何内容
35+
k
36+
# 直接回车,不输入任何内容
37+
w
38+
y
39+
```
40+
- **对 sdb、sdc、sdd、sde、sdf... 重复** 最后一步,直到 gdisk 给出错误。
41+
42+
## 为什么 Windows 会损坏您的 GPT?
43+
Windows 增加了除 lun0 之外所有 lun 的 `Starting LBA of entries`,但没有移动 LBA 条目并更新 CRC。
44+
导致起始 LBA 不被识别和 GPT 损坏。然后您的设备无法再启动。
45+
46+
## 参考
47+
- [知乎 - 为什么 WOA 会破坏 GPT 并将您的设备发送到 9008](https://zhuanlan.zhihu.com/p/1984041980913807755)
48+
- [TG - 聊天消息](https://t.me/project_aloha_issues/1/93859)

0 commit comments

Comments
 (0)