{"id":2550,"date":"2025-01-27T21:11:33","date_gmt":"2025-01-27T20:11:33","guid":{"rendered":"https:\/\/labalec.fr\/erwan\/?p=2550"},"modified":"2025-02-02T15:49:48","modified_gmt":"2025-02-02T14:49:48","slug":"mbr-to-gpt","status":"publish","type":"post","link":"https:\/\/labalec.fr\/erwan\/?p=2550","title":{"rendered":"MBR to GPT"},"content":{"rendered":"\n<p>In a previous article (<a href=\"https:\/\/labalec.fr\/erwan\/?p=1545\">here<\/a>), we had seen how to convert a GPT disk to a MBR disk, without any data loss.<\/p>\n\n\n\n<p>As indeed, your disk record (MBR or GPT) is actually only a header (i.e before your actual filesystem) pointing to your partition (aka volume aka filesystem&#8230;).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2025\/01\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"413\" height=\"564\" src=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2025\/01\/image.png\" alt=\"\" class=\"wp-image-2568\" srcset=\"https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2025\/01\/image.png 413w, https:\/\/labalec.fr\/erwan\/wp-content\/uploads\/2025\/01\/image-220x300.png 220w\" sizes=\"auto, (max-width: 413px) 100vw, 413px\" \/><\/a><\/figure>\n\n\n\n<p>Of course, I would strongly advise not to do it against a production system (or at least not without a 200% trusted backup&#8230;).<\/p>\n\n\n\n<p>This time, lets do it all from the command line:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rem create a fixed vhd, 512MB, to play with\nvmount createfixedvhd f:\\disk.vhd 512\nrem attach the fixed vhd - note the disk number\nvmount attachvhd f:\\disk.vhd\nrem create a MBR disk against the newly created physicaldrive\nRem make sure to adapt the disk number here!!!\nvmount createdisk \\\\.\\PhysicalDrive2 MBR\nrem create a MBR part - a format window should popup, go for it\nrem also note the offset and size like offset:1048576 &amp; size:534773760\nvmount createpart \\\\.\\PhysicalDrive2 MBR\nrem put some file on your MBR drive as a test for later\nRem lets pause\nrem note : you only really need this second par\nrem : the part above was meant to create a test disk\nPause\nrem delete the disk to layout (not the data)\nvmount deletedisklayout \\\\.\\PhysicalDrive2\nrem create a GPT disk\nvmount createdisk \\\\.\\PhysicalDrive2 GPT\nrem create a GPT part with same offset and size as above\nvmount createpart \\\\.\\PhysicalDrive2 GPT 1 1048576 534773760\nrem tada...you should now have a GPT drive, with your test file from previous step\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In a previous article (here), we had seen how to convert a GPT disk to a MBR disk, without any data loss. As indeed, your disk record (MBR or GPT) is actually only a header (i.e before your actual filesystem) pointing to your partition (aka volume aka filesystem&#8230;). Of course, I would strongly advise not <a href='https:\/\/labalec.fr\/erwan\/?p=2550' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-2550","post","type-post","status-publish","format-standard","hentry","category-clonedisk","category-26-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2550"}],"version-history":[{"count":6,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2550\/revisions"}],"predecessor-version":[{"id":2569,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=\/wp\/v2\/posts\/2550\/revisions\/2569"}],"wp:attachment":[{"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labalec.fr\/erwan\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}