.NetRolller 3D Posted June 16, 2009 Share Posted June 16, 2009 I'm here to announce a useful tool for installing OSx86 from retail DVD: Gptgen! Gptgen is a tool to convert a hard drive from MBR to GPT-style partitioning - all while retaining all data on the disk. AFAIK no partition manager does this today. This is useful when installing from a retail DVD to a non-empty HDD. Just create a partition to install OS X to, resize the partitions so that there are at least 33 empty sectors at the end of the drive (to house the backup GPT), and run gptgen on the drive; and you are ready to install from a retail DVD! It is open-source, licensed under the ISC license. (For the curious, this is not the primary use of the program; a much more important use is moving data from an MBR-formatted HDD to a new one that is bigger than 2 TiB, without limiting the usable space on the new HDD to 2 TiB. The current biggest internal HDD on the market is 2 TB, and there are already 4 TB external HDDs on the market.) I hope you will find it useful. P.S. Gptgen currently runs under Windows, and should also work with Linux, though Linux is untested at this point. Please help port to OSX! :-) Link to comment https://www.insanelymac.com/forum/topic/171043-announcing-gptgen-useful-tool-for-installing-from-retail-dvd/ Share on other sites More sharing options...
Keshav Amburay Posted December 20, 2009 Share Posted December 20, 2009 I knew about GPTGEN for quite sometime but I mostly used GPT fdisk http://rodsbooks.com/gdisk/ since it is a GPT Editor and not just a converter. It is good to see a Windows based GPT conversion utility. I was unable to compile gptgen in Linux - My System - Fedora 12 x86_64 installed in UEFI-GPT setup This is the output of "yum info gcc" Arch : x86_64 Version : 4.4.2 Release : 7.fc12 Size : 18 M Repo : installed From repo : fedora Summary : Various compilers (C, C++, Objective-C, Java, ...) URL : [url="http://gcc.gnu.org"]http://gcc.gnu.org[/url] License : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions Description: The gcc package contains the GNU Compiler Collection version 4.4. : You'll need this package in order to compile C code. and this is the output of make command [keshav@keshav-laptop SVN]$ make g++ gptgen.cpp -o gptgen gptgen.cpp:49: error: ‘uint64_t’ does not name a type gptgen.cpp:55: error: ‘uint16_t’ does not name a type gptgen.cpp:60: error: ‘uint16_t’ does not name a type gptgen.cpp:65: error: ‘uint32_t’ does not name a type gptgen.cpp:73: error: ‘uint32_t’ does not name a type gptgen.cpp:78: error: ‘uint64_t’ does not name a type gptgen.cpp:90: error: ‘uint64_t’ does not name a type gptgen.cpp:95: error: expected constructor, destructor, or type conversion before ‘(’ token gptgen.cpp:96: error: expected constructor, destructor, or type conversion before ‘(’ token gptgen.cpp:97: error: expected constructor, destructor, or type conversion before ‘(’ token gptgen.cpp:98: error: expected constructor, destructor, or type conversion before ‘(’ token gptgen.cpp:99: error: expected constructor, destructor, or type conversion before ‘(’ token gptgen.cpp:100: error: expected constructor, destructor, or type conversion before ‘(’ token gptgen.cpp: In function ‘void setup_endian()’: gptgen.cpp:115: error: ‘uint16_t’ was not declared in this scope gptgen.cpp:115: error: expected primary-expression before ‘)’ token gptgen.cpp:115: error: expected ‘)’ before ‘test’ gptgen.cpp:116: error: ‘cpu_to_be16’ was not declared in this scope gptgen.cpp:116: error: ‘swap16’ was not declared in this scope gptgen.cpp:117: error: ‘cpu_to_be32’ was not declared in this scope gptgen.cpp:117: error: ‘swap32’ was not declared in this scope gptgen.cpp:118: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:118: error: ‘swap64’ was not declared in this scope gptgen.cpp:119: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:119: error: ‘keep16’ was not declared in this scope gptgen.cpp:120: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:120: error: ‘keep32’ was not declared in this scope gptgen.cpp:121: error: ‘cpu_to_le64’ was not declared in this scope gptgen.cpp:121: error: ‘keep64’ was not declared in this scope gptgen.cpp:123: error: ‘cpu_to_be16’ was not declared in this scope gptgen.cpp:123: error: ‘keep16’ was not declared in this scope gptgen.cpp:124: error: ‘cpu_to_be32’ was not declared in this scope gptgen.cpp:124: error: ‘keep32’ was not declared in this scope gptgen.cpp:125: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:125: error: ‘keep64’ was not declared in this scope gptgen.cpp:126: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:126: error: ‘swap16’ was not declared in this scope gptgen.cpp:127: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:127: error: ‘swap32’ was not declared in this scope gptgen.cpp:128: error: ‘cpu_to_le64’ was not declared in this scope gptgen.cpp:128: error: ‘swap64’ was not declared in this scope gptgen.cpp: At global scope: gptgen.cpp:133: error: ‘uint32_t’ does not name a type gptgen.cpp:134: error: ‘uint16_t’ does not name a type gptgen.cpp:135: error: ‘uint16_t’ does not name a type gptgen.cpp:136: error: ‘__be64’ does not name a type gptgen.cpp:175: error: ‘uint32_t’ does not name a type gptgen.cpp:176: error: ‘uint32_t’ does not name a type gptgen.cpp:188: error: ‘uint32_t’ does not name a type gptgen.cpp:189: error: ‘uint32_t’ does not name a type gptgen.cpp:195: error: ‘uint64_t’ does not name a type gptgen.cpp:196: error: ‘uint64_t’ does not name a type gptgen.cpp:197: error: ‘uint64_t’ does not name a type gptgen.cpp:208: error: too many initializers for ‘__guid’ gptgen.cpp:208: error: too many initializers for ‘__guid’ gptgen.cpp:208: error: invalid conversion from ‘const char*’ to ‘char’ gptgen.cpp:213: error: ‘uint32_t’ does not name a type gptgen.cpp:214: error: ‘uint32_t’ does not name a type gptgen.cpp:215: error: ‘uint32_t’ does not name a type gptgen.cpp:216: error: ‘uint64_t’ does not name a type gptgen.cpp:217: error: ‘uint64_t’ does not name a type gptgen.cpp:218: error: ‘uint64_t’ does not name a type gptgen.cpp:219: error: ‘uint64_t’ does not name a type gptgen.cpp:221: error: ‘uint64_t’ does not name a type gptgen.cpp:222: error: ‘uint32_t’ does not name a type gptgen.cpp:223: error: ‘uint32_t’ does not name a type gptgen.cpp:224: error: ‘uint32_t’ does not name a type gptgen.cpp:230: error: ‘uint32_t’ does not name a type gptgen.cpp:290: error: ‘uint32_t’ does not name a type gptgen.cpp: In function ‘bool cmp(part, part)’: gptgen.cpp:307: error: ‘struct part’ has no member named ‘start’ gptgen.cpp:307: error: ‘struct part’ has no member named ‘start’ gptgen.cpp: At global scope: gptgen.cpp:432: error: ‘uint64_t’ has not been declared gptgen.cpp:453: error: ‘uint64_t’ has not been declared gptgen.cpp:470: error: ‘uint64_t’ does not name a type gptgen.cpp:542: error: ‘uint64_t’ has not been declared gptgen.cpp:560: error: ‘uint64_t’ has not been declared gptgen.cpp:578: error: ‘uint32_t’ does not name a type gptgen.cpp: In function ‘int main(int, char**)’: gptgen.cpp:638: error: ‘uint64_t’ was not declared in this scope gptgen.cpp:638: error: expected ‘;’ before ‘disk_len’ gptgen.cpp:639: error: ‘uint32_t’ was not declared in this scope gptgen.cpp:639: error: expected ‘;’ before ‘first_ebr’ gptgen.cpp:703: error: ‘curr_ebr’ was not declared in this scope gptgen.cpp:707: error: ‘first_ebr’ was not declared in this scope gptgen.cpp:707: error: ‘parse_tbl’ was not declared in this scope gptgen.cpp:708: error: ‘curr_ebr’ was not declared in this scope gptgen.cpp:719: error: ‘disk_len’ was not declared in this scope gptgen.cpp:719: error: ‘get_capacity’ was not declared in this scope gptgen.cpp:730: error: ‘struct part’ has no member named ‘start’ gptgen.cpp:740: error: ‘struct part’ has no member named ‘start’ gptgen.cpp:740: error: ‘struct part’ has no member named ‘len’ gptgen.cpp:761: error: ‘struct part’ has no member named ‘start’ gptgen.cpp:762: error: ‘struct part’ has no member named ‘len’ gptgen.cpp:765: error: too many initializers for ‘__guid’ gptgen.cpp:768: error: ‘struct gptpart’ has no member named ‘flags’ gptgen.cpp:780: error: ‘struct gptpart’ has no member named ‘flags’ gptgen.cpp:780: error: ‘cpu_to_le64’ was not declared in this scope gptgen.cpp:789: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:789: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:789: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:795: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:795: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:795: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:826: error: ‘struct gptpart’ has no member named ‘flags’ gptgen.cpp:829: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:829: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:829: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:835: error: ‘struct gptpart’ has no member named ‘flags’ gptgen.cpp:839: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:839: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:839: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:846: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:846: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:846: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:852: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:852: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:852: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:858: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:858: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:858: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:864: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:864: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:864: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:870: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:870: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:870: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:876: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:876: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:876: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:882: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:882: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:882: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:894: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:894: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:894: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:903: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:903: error: ‘cpu_to_le16’ was not declared in this scope gptgen.cpp:903: error: ‘cpu_to_be64’ was not declared in this scope gptgen.cpp:908: error: too many initializers for ‘__guid’ gptgen.cpp:911: error: ‘struct gptpart’ has no member named ‘start’ gptgen.cpp:911: error: expected ‘)’ before ‘cpu_to_le32’ gptgen.cpp:911: error: ‘cpu_to_le64’ was not declared in this scope gptgen.cpp:912: error: ‘struct gptpart’ has no member named ‘end’ gptgen.cpp:912: error: expected ‘)’ before ‘cpu_to_le32’ gptgen.cpp:913: error: expected ‘)’ before ‘;’ token gptgen.cpp:940: error: ‘crc32’ was not declared in this scope gptgen.cpp:945: error: ‘cpu_to_le32’ was not declared in this scope gptgen.cpp:948: error: ‘cpu_to_le64’ was not declared in this scope gptgen.cpp:957: error: too many initializers for ‘gpthdr’ gptgen.cpp:974: error: too many initializers for ‘gpthdr’ gptgen.cpp:976: error: ‘struct gpthdr’ has no member named ‘hdrsum’ gptgen.cpp:977: error: ‘struct gpthdr’ has no member named ‘hdrsum’ gptgen.cpp:990: error: too many initializers for ‘mbrpart’ make: *** [gptgen] Error 1 [keshav@keshav-laptop SVN]$ I do not know programming to correct the make errors so please check them. Also is it possible for you to provide a src-rpm (or deb etc.) of gptgen so that it will be easy to manage it using package managers. I also have another request regarding GPT, is it possible for you to write a GPT Partitions Mounter for Windows XP 32-bit without the need to rely on Hybrid MBR/GPT. I think this will be very useful to many people who nowdays have GPT formatted external HDDs like me and find it hard to share data with friends who still use Win XP (which cannot read GPT disks while XP 64-bit >SP1 can). Also check this link about booting Windows in UEFI-GPT mode :- http://www.insanelymac.com/forum/index.php?showtopic=186440 Link to comment https://www.insanelymac.com/forum/topic/171043-announcing-gptgen-useful-tool-for-installing-from-retail-dvd/#findComment-1364571 Share on other sites More sharing options...
srs5694 Posted December 20, 2009 Share Posted December 20, 2009 Like Keshav, I was unable to get Gptgen to compile under Linux. I tried it several month ago, though, so I don't recall exactly what the problem was. Since I'm the author of GPT fdisk, it wasn't worth it for me to put much effort into debugging the Linux compilation problems. If you need help with it, though, feel free to e-mail me and I'll see what I can do. The make output that Keshav posted makes it look like it may be necessary to add an include file or two to the Gptgen source code. In addition to Gptgen and GPT fdisk, the FreeBSD version of the gpt utility can do this conversion, but I believe the OS X version lacks this ability. There may be ports to other platforms. My experience with gpt is that it works well with partitions whose type codes it understands, but it refuses to convert anything with a code it doesn't recognize. It also produced completely bogus results on a disk with a BSD disklabel in one of my tests -- there are quite a few variants of those, so they're easy to misinterpret. I struggled with that a lot in GPT fdisk, and I'm still not convinced I've got it right -- it works on all the disklabels I've created, but there may be variants I've not seen that will manifest as bogus output. Note that Windows can't boot from a pure GPT disk on a BIOS-based computer, so such a conversion should be attempted only on an EFI-based system or if you plan to create a hybrid MBR using GPT fdisk or yet another utility called gptsync. The link Keshav posted in his last paragraph provides instructions on getting an MBR-installed Windows to boot from GPT using EFI. I've never done this myself, though, since I don't have a suitable system and have never gotten UEFI DUET to work (the copy I've got hangs on the three systems I've tried it on). Link to comment https://www.insanelymac.com/forum/topic/171043-announcing-gptgen-useful-tool-for-installing-from-retail-dvd/#findComment-1364977 Share on other sites More sharing options...
Recommended Posts