Last Web page update: 3/2/2014, GPT fdisk version 0.8.10
This Web page, and the associated software, is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find GPT fdisk or this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
|Donate $1.00||Donate $2.50||Donate $5.00||Donate $10.00||Donate $20.00||Donate another value|
Note: This page is part of the documentation for my GPT fdisk program.
GPT fdisk is available via several methods:
I've split the GPT fdisk binaries into two packages because they serve such different needs and because I want to minimize the risk of a user who wants FixParts accidentally converting a disk from MBR to GPT form by inappropriately using gdisk. I've kept the source code for all the programs together because it's all so related—except for one small source code file, all of the FixParts source files are used by gdisk.
The files section of the GPT fdisk SourceForge page has subdirectories for each GPT fdisk version. Beginning with version 0.7.0, these subdirectories are further subdivided. For version 0.8.9, these subdirectories are:
If you download the source RPM, you can build the software and install it on any RPM-based distribution, or on Debian-based distributions with a bit more effort. You will need to install several packages. I recommend you launch Synaptic, Yumex, YaST2, or any other GUI package manager your distribution uses. Look for packages called gcc-c++, e2fsprogs-devel, libicu-devel, and popt-devel, and install them. Unfortunately, the package names vary from one distribution to another; for instance, some use -dev rather than -devel as part of the name, and sometimes the development files (normally in the -devel or -dev package) are included in the main package (such as in popt instead of popt-devel). You may also find you'll need to install other packages, such as libstdc++-devel. On Debian-based distributions, the build-essential package should pull in these common packages.
On an RPM-based distribution (such as Fedora, Mandriva, or OpenSUSE), you may need to install a package called rpmbuild. On a Debian-based distribution (such as Debian or Ubuntu), you may need to install alien, which will also cause several RPM-related packages to be installed. Once you've installed all of these packages and downloaded the source RPM file, you can issue the following command to build the software:
$ rpmbuild --rebuild gptfdisk-0.8.9-1.src.rpm
A successful build will end with a line reading + exit 0. The result is two new binary package files, usually in /usr/src/rpm/RPMS/arch/, where arch is an architecture code for your system. Sometimes the files are placed in a subdirectory of your home directory instead; look for the location on a line beginning with Wrote: about a dozen lines up from the end of the rpmbuild output. Once you've found these files, you can install them from that location or copy them somewhere convenient and install them from there.
If the build fails, chances are you're missing a development package. Examine the output, and find the first error message. Chances are there will be a report of a missing file a line or two above that, as in:
g++ -Wall -D_FILE_OFFSET_BITS=64 -c -o sgdisk.o sgdisk.cc sgdisk.cc:13:18: error: popt.h: No such file or directory sgdisk.cc: In function 'int main(int, char**)': sgdisk.cc:58: error: 'poptContext' was not declared in this scope
In this example, the popt.h file is missing. Use your package manager to locate any package with a similar name—you'd type popt into the package manager's search function. Install any likely-sounding development package and try again.
If you use a Debian-based distribution, such as Debian or Ubuntu, you must convert the RPM packages into Debian package form. You do this with the alien utility from the directory in which the RPM files reside:
# alien -k gdisk-0.8.9-1.x86_64.rpm # alien -k fixparts-0.8.9-1.x86_64.rpm
Note that these commands must be run as root (Ubuntu users should add sudo to the start of each command). Change the architecture code (x86_64 in this example) as necessary for your system. The result should be .deb files that you can install using dpkg or by double-clicking the files' icons.
Prior to version 0.7.1, it was possible for me to build GPT fdisk binaries that would work on most recent Linux distributions. With the addition of Unicode support, though, version 0.7.1 links to libraries that vary greatly between distributions, so any given binary is likely to work on only a handful of distributions. The OpenSUSE Build Service provides at least a partial solution to this problem; it hosts binary RPM and Debian package builds for a variety of distributions, as detailed in the table below. If your distribution isn't listed, you can try a build for another distribution, but that will be a bit hit-or-miss. You might be better off building the software from source, as described earlier.
The Debian and Ubuntu builds on OBS provide a single binary package file, gptfdisk, rather than separate gdisk and fixparts packages, as is the case for the RPM-based distributions.
Builds for the current version are available for:
|Distribution||i386 or i586 (32-bit)||x86-64/AMD64 (64-bit)|
|Red Hat Enterprise Linux 5|
|SUSE Linux Enterprise 10 SDK|
|SUSE Linux Enterprise 11|
|SUSE Linux Enterprise 11 SP1|
|SUSE Linux Enterprise 11 SP2|
|SUSE Linux Enterprise 11 SP3|
|OpenSUSE Linux 11.4|
|OpenSUSE Linux 12.1|
|OpenSUSE Linux 12.2|
|OpenSUSE Linux 12.3|
|OpenSUSE Linux Factory|
GPT fdisk is included in several major Linux distributions' standard package repositories. I'm no longer keeping track of which distributions have GPT fdisk packages, since the list is so extensive and includes most major distributions. I do recommend you pay attention to versions, though; some distributions are very behind in their GPT fdisk versions. Assuming the version is reasonably recent, installing from a distribution's package is usually a very convenient way to get the software.
Some Linux emergency disk systems ship with GPT fdisk, so you can use the program from these emergency systems even if you run an OS on which GPT fdisk doesn't compile. The last I checked, most of these do not yet include FixParts, although PartedMagic 6.2 does. Emergency discs that provide GPT fdisk include:
GPT fdisk is currently beta-quality software! Although I know of no data-corruption bugs in the current version, I can't guarantee that the program won't damage your system. I welcome bug reports and reports of successful use of the program, particularly if you're using it on exotic systems.
Go on to "Revisions"
Return to "GPT fdisk" main page
If you have problems with or comments about this web page, please e-mail me at firstname.lastname@example.org. Thanks.
Return to my main web page.