Last Web page update: 7/27/2017, GPT fdisk version 1.0.3
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 1.0.3, 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-1.0.3-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-1.0.3-1.x86_64.rpm # alien -k fixparts-1.0.3-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.
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:
In most cases, uninstalling GPT fdisk is done through a reversal of the methods used to install it. In particular, Linux package managers such as dpkg and rpm provide uninstall options. Consult the package manager's documentation for details. If you install GPT fdisk under Windows, you can uninstall it by deleting whatever files you copied.
For the benefit of Mac users, I'm providing uninstall-gdisk and uninstall-fixparts scripts with the gdisk and fixparts packages, respectively. Type uninstall-gdisk or uninstall-fixparts to uninstall the specified package. Behind the scenes, these scripts are also run by the package installers prior to writing files to disk. This ensures that you won't have two versions of GPT fdisk installed if you upgrade from 1.0.0 or earlier to 1.0.1 or later.
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 email@example.com. Thanks.
Return to my main web page.