GPT fdisk Changelog

What's new in GPT fdisk 1.0.9

Apr 19, 2022
  • Removed stray debugging code that caused "partNum is {x}" to be printed when changing a partition's name with sgdisk (-c/--change-name).
  • Added support for aligning partitions' end points, as well as their start points. This support affects the default partition size when using 'n' in gdisk; it affects the default partition size in cgdisk; and it's activated by the new '-I' option in sgdisk. See the programs' respective man pages for details. This feature is intended to help with LUKS2 encryption, which reacts badly to partitions that are not sized as exact multiples of the encryption block size.
  • Added check for too-small disks (most likely to be an issue when trying to use a too-small disk image); program now aborts if this happens.
  • Added the ability to build sgdisk and cgdisk for Windows.
  • Added new type codes:
  • FreeBSD nandfs (0xa506)
  • Apple APFS Pre-Boot (0xaf0b)
  • Apple APFS Recovery (0xaf0c)
  • ChromeOS firmware (0x7f03)
  • ChromeOS mini-OS (0x7f04)
  • ChromeOS hibernate (0x7f05)
  • U-Boot boot loader (0xb000)
  • 27 (!) codes for Fuchsia (0xf100 to 0xf11a)
  • Fixed build problems with recent versions of ncurses.
  • Fixed bug that caused cgdisk to report incorrect partition attributes.
  • Consolidated Makefiles for Linux, FreeBSD, Solaris, macOS, and Windows (32- and 64-bit). The old OS-specific Makefiles remain in case the new consolidated Makefile has problems, but the old ones are deprecated. (The Solaris support in the new Makefile is untested.)

New in GPT fdisk 1.0.8 (Jun 10, 2021)

  • Fixed double byte swap operation on writes of partition name data on big-endian systems; this is in addition to the double byte swap fix on reading partition label data fixed in 1.0.7. (Thanks to Erik Larsson for both fixes.)
  • Added feature to gdisk and sgdisk to enable swapping the byte order of partition names, so as to correct disks already affected by the preceding bug. This option is 'b' on the experts' menu in gdisk and -b/--byte-swap-name in sgdisk. This seems advanced/obscure enough that I don't want to clutter cgdisk's menu with this option, so I haven't added it there.
  • Added type code for the Barebox boot loader (0xbb00; 4778ED65-BF42-45FA-9C5B-287A1DC4AAB1).
  • Trivial code cleanup.

New in GPT fdisk 1.0.7 (Mar 11, 2021)

  • Fixed bug that caused spurious warnings about the partition tableheader claiming an invalid size of partition entries when reading
  • some MBR disks.
  • Added ARM64 as an architecture for the Mac builds of gdisk and fixparts.The official GPT fdisk binaries of these files for macOS are now"universal" x86-64/ARM64 binaries, so they will run natively on the new M1 (ARM64) Macs. The sgdisk and cgdisk binaries, though, remain built onlyfor x86-64, because they rely on libraries that are not easily built in "universal" form.
  • Fixed double byte swap operation on partition label data on big-endian CPUs. This resulted in partition names becoming gibberish on such CPUs.
  • Added three new type codes:
  • x0701 - Microsoft Storage Replica
  • x0702
  • ArcaOS Type 1
  • x8401 - Storage Performance Development Kit (SPDK) block device

New in GPT fdisk 1.0.5 (Feb 18, 2020)

  • Fixed typos and minor formatting issues in man pages
  • Changed number of columns in type code output ("sgdisk -L" and equivalents in gdisk and cgdisk) from 3 to 2, since some descriptions are long enough that they're ambiguous with three columns.
  • Makefile change: Add $(LDLIBS) support to enable clean static builds (for libintl).
  • You can now put the 0xEE partition last in a hybrid MBR using sgdisk.
  • (Previously, this was possible with gdisk but not with sgdisk.) See the
  • sgdisk man page for details.
  • Added numerous type codes for Container Linux, Veracrypt, and
  • Freedesktop.org's Discoverable Partitions Specification
  • Apple no longer supports building i386 or "fat" binaries in XCode (or if
  • they do, they're making it hard), so I've removed that support. GPT fdisk
  • macOS binaries are now x86-64 only. Similarly, building now seems to
  • require macOS 10.9 or later, so that's now the minimum macOS version. I've
  • also re-built my Mac build environment and tweaked Makefile.mac
  • appropriately.
  • Partition type name searches are now case-insensitive.
  • It's now possible to quit out of partition type name searches by typing
  • "q".
  • When changing a partition type code, the default is now the current
  • type code, not a platform-specific type code.
  • The UEFI GPT fdisk project
  • (https://sourceforge.net/projects/uefigptfdisk/) hasn't been updated since
  • 2016, and is now broken; binaries don't compile with modern GCC
  • toolchains, and even when dropping back to Ubuntu 14.04, which worked for
  • GPT fdisk 1.0.4, the resulting binary hangs on launch. Therefore, I'm
  • dropping support for the EFI build of gdisk, at least unless and until
  • UEFI GPT fdisk is fixed.

New in GPT fdisk 1.3.0 (Aug 22, 2017)

  • Fixed a major bug that caused invalid partition tables to be generated under some conditions

New in GPT fdisk 0.8.7 Beta (Jul 29, 2013)

  • Added "-a" option to cgdisk to use a ">" symbol to the left of the selected partition rather than ncurses highlighting.
  • Modified "converting MBR to GPT" message to clarify that the conversion is being held in memory, since some people have mistakenly assumed that a "gdisk -l" operation will change an MBR disk to a GPT disk without prompting.
  • Added partition type code for freedesktop.org's proposed $BOOT partition (bc13c2ff-59e6-4262-a352-b275fd6f7172; GPT fdisk type code EA00)
  • Adjusted alignment code when using -n or -N in sgdisk to keep the requested partition size (if specified using +###{MGT} terminology) as the requested value rather than relative to the requested start point. This gives you the requested partition size rather than be slightly smaller if sgdisk needs to adjust the start point up a bit and it prevents gaps from appearing between partitions if several are created in succession using automatic placement of the start point.
  • Fixed small bugs in gdisk_test.sh script.
  • Removed stray debug message that would appear when reading MBR disks.
  • Added partition type code for Intel Rapid Start partition (GUID D3BFE2DE-3DAF-11DF-BA40-E3A556D89593, code 8400), used by systems that implement Intel's Rapid Start technology.
  • Added partition type code for Haiku BFS (GUID 42465331-3BA3-10F1-802A-4861696B7521; code EB00).

New in GPT fdisk 0.8.6 Beta (Jul 29, 2013)

  • Fixed a bug that could cause sgdisk to crash when passing a partition number of 0 to the -t option.
  • Added support for building under Solaris.
  • Added a new check to the verification code.
  • Added partition type code for Sony system partition (F4019732-066E-4E12-8273-346C5641494F). I'm not entirely clear what this is used for, but it's appearing on some new Sony computers.
  • Tweaked hybrid MBR creation options to fix a problem that caused the main 0xEE MBR partition to NOT be created if the user told gdisk to NOT place it at the start of the disk AND IF fewer than three partitions are hybridize AND IF the user opted to create a second protective partition.
  • Changed default build options for Mac OS X to *NOT* use libicu, since it seems to have broken somewhere along the line.
  • Added partition type codes for VMWare ESX (FB00, FB01, and FC00).

New in GPT fdisk 0.8.5 Beta (Jul 29, 2013)

  • Changed code that writes the partition table so that a disk sync operation occurs even if one or more write operations failed (but not if they all failed). This is intended to work around a bug that a user reported on a Windows system on which the write of the protective MBR failed, although everything else worked. (I suspect anti-virus software may have been blocking write access to the MBR.)
  • Added type codes for Midnight BSD (0xA580 - 0xA585). I used these codes because Midnight BSD uses the same 0xA5 type code as FreeBSD on MBR disks, so I'm starting Midnight BSD's numbering halfway through the 0xA5## range.

New in GPT fdisk 0.8.4 Beta (Jul 29, 2013)

  • REALLY fixed Ctrl+D problems! Now gdisk terminates upon receiving a Ctrl+D. In all previous versions, it could lock itself into a CPU-hogging loop if launched via "sudo" from a terminal window that was then closed or if Ctrl+D was pressed at certain input prompts (for a partition name or sector number, for instance).

New in GPT fdisk 0.8.3 Beta (Jul 29, 2013)

  • Fixed compilation problem on GCC 4.7.
  • Improved handling of Ctrl+D on some systems.
  • Added disk's name to message stating that a disk write was successful.
  • Fixed bug that caused creation of >2TiB partitions on 32-bit systems to be truncated in sgdisk.

New in GPT fdisk 0.8.2 Beta (Jan 23, 2012)

  • Adjusted the code to support a number of partitions that's not a multiple of the number of partition table entries that fits in a sector (normally per sector). The program still rounds up, when necessary, when resizing the partition table manually, but not when loading a partition table that contains a peculiar number of partitions. This helps prevent spurious error messages about CRC problems when loading some Solaris partition tables.
  • Fixed bugs relating to the handling of empty partitions; Solaris's ZFS tools create weird empty partitions that are legal but that gdisk wasn't handling properly. (Specifically, they sometimes have non-zero end points; gdisk assumed empty partitions had end points of 0.)
  • Fixed a bug that caused an infinite loop of input prompts if the user pressed Ctrl+D.
  • Changed gdisk's first-sector input operation to specify a sector number that's properly aligned as the default value. This eliminates the need to alter that value and notify the user of the change when the user hits "Enter" for the default value as the first partition on an empty disk (as well as in some other situations).

New in GPT fdisk 0.8.1 Beta (Jan 23, 2012)

  • Fixed bug that could cause FixParts to keep a partition's assignment as logical when FixPart could not actually do so. This could happen when there are no gaps between two logical partitions. Some partitioning tools can create such configurations, but FixParts can't. Such configurations are extremely rare. I've only encountered them when logical partitions are out of order.
  • Added code to detect infinite loops of logical partitions when reading MBR data. When detected, the program now stops reading after the first loop, so no duplicates appear in the partition list.
  • Fixed bug in partition overlap detection in MBR code.
  • Changed GPT reading code to use the size encoded in GPT headers to
  • determine how much of the header to use in computing a CRC, with the restriction that the size be equal to or less than the disk's sector size. This should work around problems with libefi in ZFS, which sets the header size to 512 rather than the more common 92. A caveat: If the disk's sector size is larger than the GPTHeader data structure size (512 bytes), then the rest of the sector's contents are ignored and replaced with 0 values. This could produce false positives on CRC checks on disks with over-512-byte sector sizes if the header sector is padded with something other than 0 values.
  • Fixed bug in new (as of 0.8.0) check that main and backup partition tables are identical on big-endian (PowerPC, etc.) hardware.

New in GPT fdisk 0.8.0 Beta (Jan 23, 2012)

  • Added new return option for sgdisk: 8, which means that a replication operation (-R or --replicate) failed. Note that other operations on
  • the same command line might still have succeeded.
  • Added gdisk_test.sh shell script.
  • This script tests some common gdisk and sgdisk operations to be sure they're working correctly.
  • Enable sgdisk's -l (--load-backup) and -o (--clear) options to work even on disks that are damaged. Most other options will still be ignored, though, so if you suspect a disk may be bad and want to use one of these options, you should do so on a line by itself, followed by a separate command to perform other actions (such as adding new partitions).
  • Added check for mis-matched primary and backup partition tables.
  • A mismatch is reported as a CRC error.
  • Added Apple Core Storage partition type code (hex code AF05, GUID
  • F72-6167-11AA-AA11-00306543ECAC).
  • Added cgdisk program to the family. This program is a rough workalike
  • to cfdisk, much as gdisk is a rough workalike to fdisk. See the cgdisk
  • man page or http://www.rodsbooks.com/gdisk/cgdisk-walkthrough.html for
  • details about its operation.
  • Fixed bug that caused CHS end point for protective MBR to be set to
  • xfeffff rather than the spec-mandated 0xffffff on disks over ~8GB. This is a very minor bug, since not much cares about this, and most other GPT tools get it wrong in the same way, too.

New in GPT fdisk 0.7.2 Beta (Jan 23, 2012)

  • The Windows version now (finally!) generates proper GUIDs rather than a
  • purely random number. This fixes a bug that caused Windows 7 to crash
  • when converting a disk from MBR format (but, oddly, not when creating a
  • fresh partition table or doing various other things).
  • Added a warning when an MBR partition is discarded because it's too
  • big for the disk.
  • Changed warning to Windows users about the dangers of converting to GPT
  • so that it appears only on disks that aren't already in GPT form.
  • Fixed bug that caused bogus "3" values to pad the ends of partition names
  • on some disks (particularly those created by Microsoft's disk partitioning tools).
  • Made compilation without Unicode support possible (see README file)
  • Made default filesystem type code OS-dependent (based on the compilation
  • platform).
  • Added new Linux-only filesystem partition type GUID code,
  • FC63DAF-8483-4772-8E79-3D69D8477DE4 (8300 entry code). Also changed name of the EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (0700 entry code) to "Microsoft basic data").
  • Fixed a bug that caused an incorrect code to be set for active/bootable
  • partitions when generating a hybrid MBR.
  • Enable entry of hex codes that begin with "0x" for both GPT and MBR partitions.
  • Fixed bug that caused the boot loader code to be lost when creating a hybrid MBR.
  • Fixed bug in sector input code that could produce improper values if the user inputs ridiculously large "+" values.

New in GPT fdisk 0.7.1 Beta (Jan 23, 2012)

  • Added support for proper UTF-16LE partition names rather than the "shortcut" that properly encoded only ASCII names. This support works only in Linux, FreeBSD, and OS X, though, at least for the moment.
  • Although it's possible to compile this support into Windows when using Visual C++, it doesn't seem to work properly. Since using this feature would require distributing the ICU libraries with the Windows binary, thus bloating the binary package's size to no effect, I've disabled it in my standard Windows build, at least for now.
  • Added check to fixparts to keep it from operating on devices that lack an existing MBR signature. (In 0.7.0, it could write an empty MBR data structure to a device on which it was mistakenly launched.)
  • Fixed bug that caused the protective MBR to not be written when restoring a backup of the GPT data.
  • Fixed bug that caused second protective MBR partition, when created as part of a hybrid MBR, to always be of type 0xEE, even when the user specified something else.
  • Integrated a number of code cleanups

New in GPT fdisk 0.7.0 Beta (Jan 23, 2012)

  • Fixed bug that caused some types of logical partitions to be misread.
  • Created FixParts program, to fix problems on MBR-partitioned disks.
  • Although this program is part of the GPT fdisk family, it is NOT used on GPT disks.
  • Completely redid the GPT-to-MBR code, used both for converting to MBR form and for creating hybrid MBRs.
  • Fixed a bug that caused gdisk to "forget" some partitions if there were numbering gaps when a conversion to MBR was aborted.
  • Improved CHS value creation on small (

New in GPT fdisk 0.6.14 Beta (Jan 23, 2012)

  • Made small change to the way the start sector is interpreted if you use a "+" specification, as in "+2G" to locate a partition 2 GiB into the default range. This change makes adjustments for sector alignment less likely.
  • Modified sgdisk's -n (--new) option to work with relative start and end values (which the man page incorrectly stated it already did). Values of for the start and end sectors refer to the first and last available sectors in the largest free block, and a partition number of 0 refers to the first available partition.
  • Added ChromeOS GUID values to list of recognized partition type GUIDs.
  • F00 = ChromeOS kernel, 7501 = ChromeOS root, 7502 = ChromeOS reserved.
  • Untested on actual ChromeOS system.
  • Tweaked APM detection to look for APM signature even if an MBR signature has already been found. Helps in diagnosis of cases in which an MBR has overwritten an APM disk.

New in GPT fdisk 0.6.13 Beta (Jan 23, 2012)

  • Added notification about nonexistent partitions to hybrid MBR creation in gdisk.
  • Fixed bug in GPT-to-MBR conversion that could sometimes enable creation of an extended partition that overlaps a preceding partition
  • Fixed bug in GPT-to-MBR conversion that prevented creation of an MBR table with logical partitions if there were four or fewer partitions.

New in GPT fdisk 0.6.12 Beta (Jan 23, 2012)

  • Adjusted alignment code to use 1 MiB alignment by default for drives with
  • other than 512-byte sector sizes. (Previous versions increased this --
  • for instance, to 4 MiB for drives with 2048-byte logical sector size.)
  • Entry of non-hexadecimal value for partition type code now causes re-prompting for a new value, fixing a recently-introduced minor bug.
  • Fixed bug in sector entry using K/M/G/T/P suffixes on disks with other-than-512-byte sector numbers.
  • Added "P" (PiB, pebibyte) suffix to suffixes accepted in entering partition sizes.
  • Fixed bug that caused sgdisk to segfault if fed the (invalid)
  • "-A show" parameter. Now it terminates with a complaint about an invalid
  • partition number 0.
  • Removed warning when running on big-endian hardware, since this support has been present for quite a while with no bug reports.

New in GPT fdisk 0.6.11 Beta (Jan 23, 2012)

  • Added -F (--first-aligned-in-largest) option to sgdisk. This option is a
  • variant on -f (--first-in-largest); it returns the number of the first
  • sector that will be used in the largest free area, given the current
  • alignment value (set via -a/--set-alignment).
  • Streamlined GUID code entry in gdisk; it no longer offers the option
  • to enter GUIDs in separate segments.
  • The -t option to sgdisk now accepts GUID values as well as the
  • sgdisk/gdisk-specific two-byte hex codes.
  • Added check that the protective 0xEE MBR partition begins on sector 1
  • to the verify function. If it doesn't, a warning message is displayed,
  • but it doesn't count as an error.
  • Added check for overlapping MBR partitions to verify function (gdisk "v"
  • function on all menus; sgdisk -v/--verify function). Also warns about
  • multiple MBR 0xEE partitions (causes problems in some OSes).
  • Added check to GPT-to-MBR and hybrid MBR creation options to prevent
  • creation of disks with duplicate partitions. When told to create a disk
  • with duplicates, sgdisk now aborts with the error message "Problem
  • creating MBR!" When attempting to create a hybrid MBR with duplicates,
  • gdisk silently drops duplicate partitions, leaving fewer than requested.
  • Creating duplicates should not be possible in sgdisk when converting to
  • MBR form.