遇到 MBR2GPT(无法找到操作系统分区)问题

遇到 MBR2GPT(无法找到操作系统分区)问题

我正在尝试使用 MBR2GPT 将 MBR/BIOS 磁盘转换为 GPT/UEFI。我收到错误“无法找到磁盘 4 的 OS 分区”。我在 setupact.log 中发现此信息:

2022-12-07 15:38:24, Info                         MBR2GPT was explicitly asked to run in full OS mode.
2022-12-07 15:38:24, Info                         MBR2GPT: Attempting to validate disk 4
2022-12-07 15:38:24, Info                         MBR2GPT: Retrieving layout of disk
2022-12-07 15:38:24, Info                         MBR2GPT: Initial partition information
2022-12-07 15:38:24, Info                         ===========================================================
2022-12-07 15:38:24, Info                         Partition layout for disk: 4
2022-12-07 15:38:24, Info                         Partition style          : MBR
2022-12-07 15:38:24, Info                         MBR signature: 2079525136
2022-12-07 15:38:24, Info                         Number of partitions     : 2
2022-12-07 15:38:24, Info                         ===================PARTITION===============================
2022-12-07 15:38:24, Info                              Number: 1
2022-12-07 15:38:24, Info                                Type: 7
2022-12-07 15:38:24, Info                                Boot: Yes
2022-12-07 15:38:24, Info                          Recognized: Yes
2022-12-07 15:38:24, Info                               Style: 0
2022-12-07 15:38:24, Info                              Offset: 1048576
2022-12-07 15:38:24, Info                              Length: 268435456000
2022-12-07 15:38:24, Info                              Volume: \\?\Volume{7bf30910-0000-0000-0000-100000000000}\
2022-12-07 15:38:24, Info                               Drive: C:\
2022-12-07 15:38:24, Info                             NT Path: \Device\HardDisk4\Partition1
2022-12-07 15:38:24, Info                         ===================PARTITION===============================
2022-12-07 15:38:24, Info                              Number: 2
2022-12-07 15:38:24, Info                                Type: 7
2022-12-07 15:38:24, Info                                Boot: No
2022-12-07 15:38:24, Info                          Recognized: Yes
2022-12-07 15:38:24, Info                               Style: 0
2022-12-07 15:38:24, Info                              Offset: 268436504576
2022-12-07 15:38:24, Info                              Length: 209715200
2022-12-07 15:38:24, Info                              Volume: \\?\Volume{7bf30910-0000-0000-0000-10803e000000}\
2022-12-07 15:38:24, Info                               Drive: X:\
2022-12-07 15:38:24, Info                             NT Path: \Device\HardDisk4\Partition2
2022-12-07 15:38:24, Info                         ===========================================================
2022-12-07 15:38:24, Info                         ESP partition size will be 104857600
2022-12-07 15:38:24, Info                         MBR2GPT: Validating layout, disk sector size is: 512 bytes
2022-12-07 15:38:24, Info                         BCD: Opening store. Flags: 0x0
2022-12-07 15:38:24, Info                         BCD: Store path: "\??\GLOBALROOT\device\harddisk4\partition1\Boot\BCD"
2022-12-07 15:38:24, Info                         BCD: Failed to load hive into key BCD00000000 from \??\GLOBALROOT\device\harddisk4\partition1\Boot\BCD. Status: c000000f
2022-12-07 15:38:24, Info                         BCD: BcdOpenStore: Failed to add store from file \??\GLOBALROOT\device\harddisk4\partition1\Boot\BCD. StoreFlags: 0x0 Status: c000000f
2022-12-07 15:38:24, Error                        FindOSPartitions: Cannot open BCD for boot volume. Error: 0xC000000F
2022-12-07 15:38:24, Error                        Cannot find OS partition(s) for disk 4

我正在运行的命令:

C:\Windows\system32>mbr2gpt /validate /allowFullOS /disk:4
MBR2GPT: Attempting to validate disk 4
MBR2GPT: Retrieving layout of disk
MBR2GPT: Validating layout, disk sector size is: 512 bytes
Cannot find OS partition(s) for disk 4

bcdedit(以管理员身份):

C:\Windows\system32>bcdedit

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=G:
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {069b9e52-330a-11ed-9d60-fc82c62dfcb6}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 10
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {069b9e54-330a-11ed-9d60-fc82c62dfcb6}
displaymessageoverride  Recovery
recoveryenabled         Yes
allowedinmemorysettings 0x15000075
osdevice                partition=C:
systemroot              \Windows
resumeobject            {069b9e52-330a-11ed-9d60-fc82c62dfcb6}
nx                      OptIn
bootmenupolicy          Standard

磁盘管理截图

答案1

对于有同样问题的人,我的解决方案是使用命令bcdboot C:\Windows /s Y: /f ALL

在哪里C:是您的操作系统位置是:是启动分区的指定卷号。通常是 Bios/Legacy 架构中的系统保留分区。我建议先创建备份,以防万一出现问题。

当使用 mbr2gpt 时,我遇到了确切的错误消息“无法打开启动卷的 BCD”,上述命令解决了我的问题。

此命令复制支持在基于 UEFI 或基于 BIOS 的计算机上启动的 BCD 文件。

如果您无法从磁盘管理中为系统保留分区分配字母,则可以从 Diskpart 中分配。在提升的命令提示符下运行Diskpart

例如,如果系统保留是磁盘 1 中的分区 2,我会执行以下操作:

DISKPART > sel disk 1
DISKPART > sel part 2
DISKPART > assign letter=Y

退出并尝试再次运行 mbr2gpt。

相关内容