[parted-devel] GoGPT

H. Peter Anvin hpa at zytor.com
Fri Apr 17 03:30:13 UTC 2009


phcoder wrote:
> Hello. I needed to convert my MBR disk to GPT without losing data, so I
> coded a tool to do so. It should be able to also convert from other
> partition labels as long as logical sector is 512 bit
> It worked perfectly for me but I tested it only once so bugs are
> possible. Use at your own risk
> To compile:
> put endian.h from libparted to the same directory as gogpt.c
> gcc -o gogpt gogpt.c -Wall -luuid -lparted
> To convert to gpt you do:
> sudo ./gogpt <disk>
> Note: it will change the order of your partitions and clean most of
> attributes

Why changing the partition order?

Also, I'm assuming that this requires blank space after the MBR (as
most, but not ALL disks have.)

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.




More information about the parted-devel mailing list