分享

一条指令瞬间把系统盘从MBR无损转换成GPT

 leexingyuan5 2018-06-01
 本帖最后由 redknight_c 于 2017-8-19 12:06 编辑

MBR 与 GPT 孰优孰略,这里就不讨论了,大家可以自行百度研究。

考虑到GPT与UEFI的搭配比较合理,所以一直想把我的系统盘从MBR转换到GPT,这次把系统盘迁移到SSD,历经各种磨难(其实最简单,最小白的方法就是重装系统,但是好像年纪大了,心态老了,不想折腾了),最后总算是平稳迁移到SSD了,但是原封未动,还是MBR格式,心里各种不妥,总想着如何转成GPT。

各种搜索研究,发现了一个非常简单,而且安全可靠的方法(win10系统自带的程序,应该是比较安全可靠的吧),真的是简单快捷,大概就2-3分钟就搞掂了。

这就是win10创意者版中自带的内部程序,MBR2GPT, 用法很简单,提示符环境下键入mbr2gpt /?,就可以看到详尽的说明,
Converts a disk from MBR to GPT partitioning without modifying or deleting data on the disk.
MBR2GPT.exe /validate|convert [/disk:<diskNumber>] [/logs:<logDirectory>] [/map:<source>=<destination>] [/allowFullOS]
Where:
/validate
         - Validates that the selected disk can be converted
           without performing the actual conversion.
/convert
         - Validates that the selected disk can be converted
           and performs the actual conversion.
/disk:<diskNumber>
         - Specifies the disk number of the disk to be processed.
           If not specified, the system disk is processed.
/logs:<logDirectory>
         - Specifies the directory for logging. By default logs
           are created in the %windir% directory.
/map:<source>=<destination>
         - Specifies the GPT partition type to be used for a
           given MBR partition type not recognized by Windows.
           Multiple /map switches are allowed.
/allowFullOS
         - Allows the tool to be used from the full Windows
           environment. By default, this tool can only be used
           from the Windows Preinstallation Environment.


实际使用中,为了让大家避免走弯路,下面是我的心得分享个大家。

1、必须是win10创意者版之后的版本,这个内部应用只是在创意者版才提供。运行环境必须是管理员权限的提示符环境,如果是普通的CMD环境,就会有如下的错误提示
EnablePrivilege: AdjustTokenPrivileges failed (Error:0x514)
ERROR: Failed to enable backup/restore privileges.
Check that you are running in a process with elevated privileges.
告诉你权限不够,需要提升权限。


2、转换之前,最好先看看你的系统盘能否安全无损的转换成为GPT,可以在管理员权限下的提示符环境,运行mbr2gpt /validate /allowfullos


3、MBR2GPT,转换只能运行在winPE 或者 winRE,虽然有选项 /allowFullOS,可以允许MBR2GPT运行在所有windows环境,但是我没试过,慎重起见我觉得还是不要尝试在Windows系统运行的时候转换系统盘,想想都害怕。


4、转换前,务必检查确认你的电脑是可以UEFI+GPT启动,否则,MBR2GPT转换之后是不可逆的。如何从GPT转成MBR,对不起我还没研究过。


5,非系统盘,你可以用各种第三方软件转化,又简单又直观,而且还可以互相转换,这里就不说了。


最后提示,转换有风险,行动需谨慎。


各种问题,欢迎讨论。




    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多