Sunday, April 20, 2014

Convert MBR to GPT without data loss using Gptgen

Using this method you can convert MBR to GPT without loosing data, using a command line utility called gptgen. Gptgen is a tool designed to non-destructively convert Hard Disk partitioned in the common, “MSDOS-style” MBR scheme (including extended partitions) to use a GUID partition table (GPT). It’s a very extensive tool but a bit complicated to run. According to the tool’s ‘read me’ file, the syntax of the tool is “gptgen [-w] \\.\physicaldriveX”, where X is the drive number reported by the Disk Management console or the “list disk” command of the DISKPART utility. The -w option makes gptgen write the generated GUID partition tables to the disk, otherwise the primary table will be written to a file named “primary.img“, and the secondary table to “secondary.img“, in the directory that the program was invoked from. You can then use e.g. dd to write the tables to the disk. You can download GPTGEN from