GDISK(8)

๐Ÿ“ฆ
version 1.0.10 ยท 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, epel 10, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– gdisk: the GPT fdisk Manual, section 8 ๐Ÿ’–

๐ŸŽ€ NAME ๐ŸŽ€

gdisk, the interactive GUID partition table (GPT) manipulator ๐Ÿ’…

๐Ÿ“ SYNOPSIS ๐Ÿ“

gdisk [ -l ] device

๐Ÿ’… DESCRIPTION ๐Ÿ’…

okay so GPT fdisk (aka gdisk) is a text-mode, menu-driven program for creating and manipulating partition tables ๐Ÿ’– It'll automatically convert an old-style Master Boot Record (MBR) partition table, or a BSD disklabel stored without an MBR carrier partition, into the newer Globally Unique Identifier (GUID) Partition Table (GPT) format. It can also just load a GUID partition table if you already have one โœจ When you use the -l command-line option, it shows you the current partition table and then exits, no fuss ๐Ÿซถ

GPT fdisk mainly works on the GPT headers and partition tables ๐Ÿงš It can and will generate a fresh protective MBR when it's needed. (Any boot loader code in the protective MBR won't be disturbed.) If you've made an unusual protective MBR, like a hybrid MBR made with gptsync or gdisk's own hybrid MBR creation feature, most ordinary actions shouldn't mess with it ๐Ÿฆ‹ Some advanced data recovery options require you to understand the difference between the main and backup data, and also between the GPT headers and the partition tables ๐Ÿ™ˆ For info on MBR vs. GPT, plus GPT terminology and structure, check the extended gdisk documentation at https://www.rodsbooks.com/gdisk/ or just consult Wikipedia ๐Ÿ“š

gdisk has a user interface that's similar to Linux's fdisk, but gdisk is the one that modifies GPT partitions ๐Ÿ”ฅ It can also transform MBR partitions or BSD disklabels into GPT partitions. Like the original fdisk, gdisk doesn't touch disk structures until you explicitly write them to disk, so if you mess up, you can exit with the q option and your partitions stay unmodified ๐Ÿ’œ

Ordinarily, gdisk works on disk device files, such as /dev/sda or /dev/hda under Linux, /dev/disk0 under Mac OS X, or /dev/ad0 or /dev/da0 under FreeBSD ๐ŸŒˆ It can also work on disk image files, which can be either copies of whole disks (made with dd, for instance) or raw disk images used by emulators such as QEMU or VMWare. Note that only raw disk images are supported. gdisk cannot work on compressed or other advanced disk image formats. ๐Ÿ™…โ€โ™€๏ธ

The MBR partitioning system uses a mix of cylinder/head/sector (CHS) addressing and logical block addressing (LBA). The former is klunky and limiting ๐Ÿ˜ญ GPT drops CHS addressing and uses 64-bit LBA mode exclusively. So GPT data structures, and therefore gdisk, don't need to deal with CHS geometries and all the problems they create ๐Ÿ’… If you're a fdisk user, you'll notice gdisk doesn't have the options and limitations that come with CHS geometries, and honestly, iconic behaviour ๐Ÿ‘‘

For best results, use an OS-specific partition table program whenever you can โœจ For example, make Mac OS X partitions with the Mac OS X Disk Utility program, and make Linux partitions with the Linux gdisk or GNU Parted program ๐Ÿ“

When gdisk starts up, it tries to identify the partition type in use on the disk ๐Ÿ” If it finds valid GPT data, it'll use it. If it finds a valid MBR or BSD disklabel but no GPT data, it'll attempt to convert the MBR or disklabel into GPT form. (BSD disklabels are likely to have unusable first and/or final partitions, because they overlap with the GPT data structures, though ๐Ÿฅฒ) GPT fdisk can identify, but not use the data in Apple Partition Map (APM) disks, which were used on 680x0- and PowerPC-based Macintoshes ๐ŸŽ

Upon exiting with the w option, gdisk replaces the MBR or disklabel with a GPT. This action is potentially dangerous! Your system may become unbootable, and partition type codes may become corrupted if the disk uses unrecognized type codes. Boot problems are especially likely if you're multi-booting with any GPT-unaware OS ๐Ÿ’€ If you accidentally launch gdisk on an MBR disk, you can safely exit without making any changes by using the q option ๐Ÿซถ

The MBR-to-GPT conversion will leave at least one gap in the partition numbering if the original MBR used logical partitions. These gaps are harmless, but if you like, you can get rid of them with the s option โœจ (Doing this may require you to update your /etc/fstab file.)

When you're creating a fresh partition table, a few things may be worth considering ๐ŸŽ€

  • Data (non-boot) disks, and boot disks on BIOS-based computers using GRUB as the boot loader: partitions can be created in whatever order and whatever sizes you want ๐ŸŒธ
  • Boot disks for EFI-based systems need an EFI System Partition (gdisk internal code 0xEF00) formatted as FAT-32 ๐Ÿงš The author recommends making this partition 550 MiB. (Smaller ESPs are common, but some EFIs have flaky FAT drivers that need a larger partition for reliable operation.) Boot-related files are stored here. (Note that GNU Parted identifies such partitions as having the "boot flag" set.)
  • BIOS-based systems with some boot loaders may use a BIOS Boot Partition (gdisk internal code 0xEF02), where the secondary boot loader is stored, possibly without the benefit of a filesystem ๐Ÿฆ‹ GRUB2 may optionally use one of these. This partition can typically be quite small (roughly 32 to 200 KiB, although 1 MiB is more common in practice), but check your boot loader documentation for details ๐Ÿ“š
  • Windows booting from a GPT disk should have a partition of type Microsoft Reserved (gdisk internal code 0x0C01) ๐Ÿ’œ It should be about 128 MiB in size and ordinarily follows the EFI System Partition and immediately precedes the Windows data partitions. (Note that old versions of GNU Parted create all FAT partitions as this type, which actually makes the partition unusable for normal file storage in both Windows and Mac OS X ๐Ÿ™ˆ)
  • Blank space after partitions: some OSes' GPT utilities leave some blank space (typically 128 MiB) after each partition, so future disk utilities can use it ๐ŸŒˆ Free space like this isn't required on GPT disks, but creating it may help with future disk maintenance. You can use GPT fdisk's relative partition positioning option (specifying the starting sector as +128M, for instance) to make these gaps easily โœจ

๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -l โ€” list the partition table for the specified device, then exit ๐Ÿ“‹

Most of your gdisk time happens in its interactive text-mode menus ๐Ÿ’… There are three menus: the main menu, the recovery & transformation menu, and the experts' menu. The main menu has the stuff you'll probably use for regular partitioning jobs, like creating and deleting partitions, changing partition type codes, and so on. Here are the specific functions:

  • b โ€” save partition data to a backup file ๐Ÿ’พ You can back up your current in-memory partition table to a disk file with this option. The file is a binary file made of the protective MBR, the main GPT header, the backup GPT header, and one copy of the partition table, in that order. Heads up: the backup is of the current in-memory data structures, so if you launch the program, make changes, and then use this option, the backup will reflect your changes. Also, the restore option lives on the recovery & transformation menu, while the backup option is on the main menu to encourage you to use it ๐Ÿซถ
  • c โ€” change the GPT name of a partition ๐Ÿท๏ธ This name is encoded as a UTF-16 string, but properly entering and displaying anything beyond basic ASCII values needs suitable locale and font support. For the most part Linux ignores the partition name, but it may matter in some OSes. GPT fdisk sets a default name based on the partition type code. Note that the GPT partition name is different from the filesystem name, which is encoded in the filesystem's own data structures ๐Ÿงš
  • d โ€” delete a partition ๐Ÿ—‘๏ธ This removes the entry from the partition table but doesn't disturb the data in the sectors originally allocated to the partition on the disk. If a corresponding hybrid MBR partition exists, gdisk deletes it too, and expands any adjacent 0xEE (EFI GPT) MBR protective partition to fill the new free space โœจ
  • i โ€” show detailed partition information ๐Ÿ”Ž The summary the p command shows necessarily leaves out lots of details, like the partition's unique GUID and the translation of gdisk's internal partition type code into a plain type name. The i option displays this info for a single partition ๐Ÿ’–
  • l โ€” display a summary of partition types ๐Ÿ“œ GPT uses a GUID to identify partition types for particular OSes and purposes. For easier data entry, gdisk squishes these into two-byte (four-digit hexadecimal) values that are related to their equivalent MBR codes. Specifically, the MBR code gets multiplied by hexadecimal 0x0100. For instance, the MBR code for Linux swap space is 0x82, and in gdisk it's 0x8200 ๐Ÿš A one-to-one match isn't possible, though. Most notably, all the varieties of FAT and NTFS partitions correspond to a single GPT code (entered as 0x0700 in gdisk). Some OSes use a single MBR code but employ many more codes in GPT. For these, gdisk adds code numbers sequentially, like 0xa500 for a FreeBSD disklabel, 0xa501 for FreeBSD boot, 0xa502 for FreeBSD swap, and so on. Note that these two-byte codes are unique to gdisk ๐Ÿฆ„ The type code list can optionally be filtered by a search string. For instance, entering linux shows only partition type codes with descriptions that include the string Linux. This search is case-insensitive ๐Ÿ”
  • n โ€” Make a new partition ๐Ÿ’– This one is modeled after fdisk's version, though it's not a perfect copy. You type in a partition number, a starting sector, and an ending sector. Start and end can be absolute sector numbers, or positions in kibibytes (K), mebibytes (M), gibibytes (G), tebibytes (T), or pebibytes (P). So 40M means a spot 40MiB from the start of the disk. You can also go relative to the default range with a + or -, like +2G for 2GiB past the default start sector, or -200M for 200MiB before the last available sector. โœจ Hit Enter with no input and you get the default, which is the start of the largest available block for the start sector and the end of that same block for the end sector. The defaults might get nudged to keep partition alignment optimized ๐ŸŽ€
  • o โ€” Wipe everything ๐Ÿงน This clears out all partition data: the GPT header data, every partition definition, and the protective MBR. The sector alignment goes back to the default, which is 1 MiB, or 2048 sectors on a disk with 512-byte sectors.
  • p โ€” Show a basic partition summary ๐Ÿ“‹ You get partition numbers, starting and ending sector numbers, partition sizes, gdisk's partition type codes, and partition names. If you want more detail, use the i command ๐Ÿฆ‹
  • q โ€” Quit without saving ๐Ÿšช Use this if you just wanted to look around, or if you messed up and want to back out of all your changes. Your changes don't get saved, so it's giving "undo everything" ๐Ÿ™ˆ
  • r โ€” Open the recovery & transformation menu ๐Ÿ› ๏ธ This one has emergency recovery options for fixing damaged GPT data structures, plus options to transform to or from other partitioning systems, including creating hybrid MBRs.
  • s โ€” Sort partition entries ๐Ÿ—‚๏ธ GPT partition numbers don't have to match the order of partitions on the disk. If you want them to match, this is your move. Heads up though: some partitioning utilities sort partitions every time they make changes. Those changes show up in your device filenames, so you may need to edit /etc/fstab if you use this option ๐Ÿ˜ญ
  • t โ€” Change one partition's type code ๐ŸŽจ You enter the type code as a two-byte hexadecimal number, as described earlier. If you have a GUID and gdisk doesn't recognize it, you can type the GUID in directly ๐Ÿ’œ
  • v โ€” Verify the disk ๐Ÿ” This checks for a bunch of problems, like incorrect CRCs and mismatched main and backup data. It doesn't automatically fix most of them though. For that, you'll need the options on the recovery & transformation menu ๐Ÿซถ If it finds no problems, it shows you a summary of unallocated disk space.
  • w โ€” Write your data ๐Ÿ’พ This is how you save your changes.
  • x โ€” Enter the experts' menu ๐Ÿ˜ˆ This gives you access to features that can get you into even more trouble than the main menu already can.
  • ? โ€” Print the menu ๐Ÿ“œ Type this (or any command that isn't recognized) to see a summary of the available options.

The second gdisk menu is the recovery & transformation menu ๐ŸŒˆ It gives you data recovery options and features for moving partitions between partitioning schemes, like converting BSD disklabels into GPT partitions or creating hybrid MBRs. A few options here repeat stuff from the main menu, just for convenience. Here's what's on this menu:

  • b โ€” Rebuild the GPT header from the backup ๐Ÿฉน You can use the backup GPT header to rebuild the main GPT header with this option. It's likely to come in handy if your main GPT header got damaged or destroyed, say by sloppy use of dd ๐Ÿ’€
  • c โ€” Load the backup partition table ๐Ÿ”„ Normally, gdisk only uses the main partition table, though the backup's integrity gets checked when you launch the program. If the main partition table is damaged, you can load the backup from disk and use it instead. Be warned: if you've just converted an MBR disk to GPT format, this will almost certainly show no partition entries or strange ones, since there's no backup partition table on disk yet ๐Ÿ™ƒ
  • d โ€” Use the main GPT header and rebuild the backup ๐Ÿ” This is likely useful if the backup GPT header got damaged or destroyed.
  • e โ€” Load the main partition table ๐Ÿ“ฅ This reloads the main partition table from disk. It's really only useful if you tried the backup partition table (via c) and it turned out to be in worse shape than the main one ๐Ÿ˜…
  • f โ€” Load the MBR and build a fresh GPT from it ๐Ÿง Use this if your GPT is corrupt or conflicts with the MBR, and you want the MBR to be the basis for a brand new set of GPT partitions.
  • g โ€” Convert GPT into MBR and exit ๐Ÿ”š This converts as many partitions as possible into MBR form, destroys the GPT data structures, saves the new MBR, and exits. Use it if you tried GPT and decided MBR works better for you.
Heads up: this function can make up to four primary MBR partitions, or three primary partitions plus as many logical partitions as it can generate. Each logical partition needs at least one unallocated block right before its first block. So on disks with tightly-packed partitions, you might only manage to convert four partitions. But if free space was inserted between partitions when they were made, and the disk is under 2 TiB, it should be possible to convert all the partitions to MBR form ๐Ÿฅบ See also the h option.
  • h โ€” Create a hybrid MBR ๐Ÿงฉ This is an ugly workaround, but it's a lifesaver. It lets GPT-unaware OSes, or ones that can't boot from a GPT disk, reach up to three of the partitions on the disk by creating MBR entries for them. These hybrid MBR entries can easily go out of sync with the GPT entries, especially when hybrid-unaware GPT utilities are used to edit the disk. So you may need to re-create the hybrid MBR if you use tools like that ๐Ÿ™ˆ Unlike the g option, this one can't convert any partitions into MBR logical partitions.
  • i โ€” Show detailed partition information ๐Ÿ” This is identical to the i option on the main menu.
  • l โ€” Load partition data from a backup file ๐Ÿ“‚ This is the reverse of the b option on the main menu. Restoring partition data from anything but the original disk is not recommended ๐Ÿšซ
  • m โ€” Go back to the main menu ๐Ÿ  This lets you enter main-menu commands again.
  • o โ€” Print the protective MBR data ๐Ÿ›ก๏ธ This shows a summary of the protective MBR's partitions. It might help you spot glaring problems, or identify the partitions in a hybrid MBR ๐Ÿ‘€
  • p โ€” Print the partition table ๐Ÿ“Š This is identical to the p option in the main menu.
  • q โ€” Quit without saving changes ๐Ÿ‘‹ This is identical to the q option in the main menu.
  • t โ€” Transform BSD partitions into GPT partitions ๐Ÿ”€ This works on BSD disklabels held within GPT (or converted MBR) partitions. The converted partitions' type codes will probably need manual adjustment. gdisk will try to convert BSD disklabels stored on the main disk when it launches, but that conversion is likely to produce first and/or last partitions that are unusable. There are so many BSD variants that gdisk being unable to convert a BSD disklabel is a lot more likely than running into problems with an MBR conversion ๐Ÿ˜ฌ
  • v โ€” Verify the disk โœ… This is identical to the v option in the main menu.
  • w โ€” Write the table to disk and exit ๐Ÿ’… This is identical to the w option in the main menu.
  • x โ€” Enter the experts' menu ๐Ÿงช This is identical to the x option in the main menu.
  • ? โ€” Print the menu ๐Ÿ“œ This option, or any unrecognized entry, shows a summary of the menu options.

The third gdisk menu is the experts' menu ๐Ÿ‘‘ It holds advanced options that aren't closely tied to recovery or transforming between partitioning systems. Its options are:

  • a โ€” Set attributes ๐Ÿท๏ธ GPT gives you a 64-bit attributes field that can set features for each partition. gdisk supports four attributes: system partition, read-only, hidden, and do not automount. You can set other attributes too, but their numbers don't get translated into anything useful. In practice, most OSes seem to ignore these attributes ๐Ÿคทโ€โ™€๏ธ
  • b โ€” Swap the byte order of the specified partition's name ๐Ÿ” Some partitioning tools, including GPT fdisk 1.0.7 and earlier, can write the partition name in the wrong byte order on big-endian computers, like IBM s390 mainframes and PowerPC-based Macs. This feature fixes that problem ๐Ÿ”ง
  • c โ€” Change the partition GUID ๐Ÿ†” You can enter a custom unique GUID for a partition with this option. (This is the GUID that uniquely identifies a partition, not its type code, which you change with the t main-menu option.) Normally, gdisk assigns this number randomly. But you might want to adjust it manually if you ended up with the same GUID on two partitions, either because of buggy GUID assignments (hopefully not in gdisk) or sheer incredible coincidence ๐Ÿ˜ต
  • d โ€” Display the sector alignment value ๐Ÿ“ See the description of the l option for more details.
  • e โ€” Move the backup GPT data structures to the end of the disk ๐Ÿšš Use this if you've added disks to a RAID array, creating a virtual disk with space that follows the backup GPT data structures. This moves the backup GPT data structures to the end of the disk, where they belong ๐Ÿฅฐ
  • f โ€” Randomize the disk's GUID and all partitions' unique GUIDs ๐ŸŽฒ The partition type code GUIDs are left alone. This may be used after cloning a disk with another utility, to make all GUIDs unique again โœจ
  • g โ€” Change the disk GUID! ๐Ÿ’– Every disk gets its own unique GUID, and gdisk picks one at random when it builds the GPT data structures. With this option you can roll a fresh random one or type in your own. ๐ŸŽ€
  • h โ€” Recompute the CHS values in a protective or hybrid MBR. ๐Ÿ”ฎ This can help when a disk utility, OS, or BIOS is being picky about the CHS values the partitions use in the protective or hybrid MBR. The GPT spec wants a CHS value of 0xFFFFFF for partitions over 8GiB, but that value is technically illegal by the usual standards, and some BIOSes hang when they see it. This option swaps in a more normal CHS value, 0xFEFFFF for over-8GiB partitions, so those BIOSes can finally boot. ๐Ÿ˜ญโœจ
  • i โ€” Show detailed partition information. ๐Ÿ” It's the exact same thing as the i option on the main menu.
  • j โ€” Adjust the location of the main partition table. ๐Ÿงš It's normally sector 2, but it might need to go higher, like when a system-on-chip (SoC) is hard-coded to read boot code from sector 2. I'm begging you, don't touch this unless it's absolutely necessary. ๐Ÿ™ˆ
  • k โ€” Adjust the location of the backup partition table. ๐ŸŒ™ This one normally lives just before the backup metadata at the very end of the disk, but it only gets moved in some very rare cases. Again, I recommend against changing it unless you truly have to. ๐Ÿซถ
  • l โ€” Change the sector alignment value. ๐Ÿฆ‹ Disks with more logical sectors per physical sector (think modern Advanced Format drives), some RAID setups, and lots of SSDs can get sluggish if partitions aren't lined up with their internal data structures. For new disks, gdisk tries to align partitions on 1 MiB boundaries (2048 sectors on disks with 512-byte sectors) by default, which keeps all of these disk types happy. โœจ On pre-partitioned disks, gdisk tries to figure out the alignment value that's already in use, but it'll set 8-sector alignment on disks larger than 300 GB even when smaller alignment values are detected. Either way, you can change it with this option. ๐Ÿ’… The alignment value also affects the default end sector when you create a new partition: the end sector gets aligned to one less than a multiple of the alignment value, if possible. That should keep partitions a multiple of the alignment value in size. Some disk encryption tools want partitions sized to a value, usually 4096 bytes, so the default 1 MiB alignment works great for them. ๐Ÿ”
  • m โ€” Return to the main menu. ๐Ÿ  This lets you go back and use main-menu commands.
  • n โ€” Create a new protective MBR. ๐Ÿ› ๏ธ Use this if the current protective MBR is damaged in a way gdisk doesn't automatically detect and fix, or if you want to turn a hybrid MBR into a "pure" GPT with a conventional protective MBR. ๐Ÿ’œ
  • o โ€” Print the protective MBR data. ๐Ÿ‘€ You get a summary of the protective MBR's partitions, which can help you spot glaring problems or figure out which partitions are in a hybrid MBR. ๐Ÿ“
  • p โ€” Print the partition table. ๐Ÿ“‹ Identical to the p option in the main menu.
  • q โ€” Quit without saving changes. ๐Ÿšช This is identical to the q option in the main menu, so double-check before you bail! ๐Ÿ’€
  • r โ€” Enter the recovery & transformations menu. ๐Ÿงฐ This is identical to the r option on the main menu.
  • s โ€” Resize the partition table. ๐Ÿ“ The default size is 128 entries. Officially, anything smaller than 16KB (128 entries, given the normal entry size) is unsupported by the GPT specification. In practice, though, those sizes seem to work and can be handy when converting MBR disks. Larger sizes also work fine, but OSes may impose their own limits on the number of partitions. ๐Ÿคทโ€โ™€๏ธ
  • t โ€” Swap two partitions' entries in the partition table. ๐Ÿ”„ One of the partitions can be empty. For example, if partitions 1-4 are defined, transposing 1 and 5 gives you a table where the partitions are numbered 2-5. Swapping like this doesn't change any disk space allocation; it only changes their order in the partition table. ๐ŸŒธ
  • u โ€” Replicate the current device's partition table on another device. ๐Ÿ‘ฏ You'll be asked to type the new device's filename. Once the write finishes, you can keep editing the original device's partition table. Heads up: the replicated table is an exact copy, GUIDs and all! If the new device should have its own unique GUIDs, use the f option on the new disk. ๐Ÿซถ
  • v โ€” Verify the disk. โœ… This is identical to the v option in the main menu.
  • z โ€” Zap (destroy) the GPT data structures and exit. ๐Ÿ’ฅ Use this if you want to repartition a GPT disk with fdisk or some other GPT-unaware program. You'll get to choose whether to keep the existing MBR, which is handy if it's a hybrid MBR with salvageable partitions, or if you've already made new MBR partitions and want to wipe the leftovers of your GPT partitions. โš ๏ธ If you've already created new MBR partitions, this option could damage the first and/or last MBR partitions! That's unlikely, but it could happen if your new MBR partitions overlap the old GPT data structures. ๐Ÿ˜ฌ
  • ? โ€” Print the menu. ๐Ÿ“œ This option (or any unrecognized entry) shows a summary of the menu options.

In many cases, you can press the Enter key to select a default option when entering data. When only one option is possible, gdisk usually skips the prompt entirely. ๐Ÿซง


๐Ÿ› BUGS ๐Ÿ›

Known bugs and limitations include: ๐Ÿ™ƒ

  • The program compiles correctly only on Linux, FreeBSD, Mac OS X, and Windows. Linux versions for x86-64 (64-bit), x86 (32-bit), and PowerPC (32-bit) have been tested, with the x86-64 version having seen the most testing. Under FreeBSD, 32-bit (x86) and 64-bit (x86-64) versions have been tested. Only 32-bit versions for Mac OS X and Windows have been tested by the author, although I've heard of 64-bit versions being successfully compiled. ๐Ÿ’ป
  • The FreeBSD version of the program can't write changes to the partition table to a disk when existing partitions on that disk are mounted. (The same problem exists with many other FreeBSD utilities, such as gpt, fdisk, and dd.) This limitation can be overcome by typing sysctl kern.geom.debugflags=16 at a shell prompt. ๐Ÿ”ง
  • The fields used to display the start and end sector numbers for partitions in the p command are 14 characters wide. That translates to a limitation of about 45 PiB. On larger disks, the displayed columns will go out of alignment. ๐Ÿ“
  • In the Windows version, only ASCII characters are supported in the partition name field. If an existing partition uses non-ASCII UTF-16 characters, they're likely to get corrupted in the i and p menu options' displays. They should still be preserved when loading and saving partitions, though. Binaries for Linux, FreeBSD, and OS X support full UTF-16 partition names. ๐ŸŒˆ
  • The program can load only up to 128 partitions (4 primary partitions and 124 logical partitions) when converting from MBR format. This limit can be raised by changing the #define MAX_MBR_PARTS line in the basicmbr.h source code file and recompiling. However, that change will require using a larger-than-normal partition table. (The limit of 128 partitions was chosen because that number equals the 128 partitions supported by the most common partition table size.) ๐Ÿ”ข
  • Converting from MBR format sometimes fails because of insufficient space at the start or (more commonly) the end of the disk. Resizing the partition table (using the s option in the experts' menu) can sometimes overcome this problem. In extreme cases, though, it may be necessary to resize a partition using GNU Parted or a similar tool before converting with gdisk. ๐Ÿ˜ค
  • MBR conversions work only if the disk has correct LBA partition descriptors. These descriptors should be present on any disk over 8 GiB in size, or on smaller disks partitioned with any but very ancient software. ๐Ÿ•ฐ๏ธ
  • BSD disklabel support can create first and/or last partitions that overlap with the GPT data structures. This can sometimes be compensated for by adjusting the partition table size, but in extreme cases the affected partition(s) may need to be deleted. ๐Ÿซ 
  • Because of the highly variable nature of BSD disklabel structures, conversions from this form may be unreliable. Partitions may be dropped, converted in a way that creates overlaps with other partitions, or converted with incorrect start or end values. Use this feature with caution! ๐Ÿšจ
  • Booting after converting an MBR or BSD disklabel disk is likely to be disrupted. Sometimes re-installing a boot loader will fix the problem, but other times you may need to switch boot loaders. Except on EFI-based platforms, Windows through at least Windows 7 doesn't support booting from GPT disks. Creating a hybrid MBR (using the h option on the recovery & transformation menu) or abandoning GPT in favor of MBR may be your only options in this case. ๐Ÿฅบ

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Primary author: Roderick W. Smith (rodsmith@rodsbooks.com) ๐Ÿ’–

Contributors: ๐Ÿซถ

  • Yves Blusseau (1otnwmz02@sneakemail.com)
  • David Hubbard (david.c.hubbard@gmail.com)
  • Justin Maggard (justin.maggard@netgear.com)
  • Dwight Schauer (das@teegra.net)
  • Florian Zumbiehl (florz@florz.de)

๐Ÿ“š SEE ALSO ๐Ÿ“š

cfdisk(8), cgdisk(8), fdisk(8), mkfs(8), parted(8), sfdisk(8), sgdisk(8), fixparts(8). โœจ

https://en.wikipedia.org/wiki/GUID_Partition_Table ๐ŸŒ

https://developer.apple.com/technotes/tn2006/tn2166.html ๐ŸŽ

https://www.rodsbooks.com/gdisk/ ๐Ÿฆ‹


๐ŸŽ€ AVAILABILITY ๐ŸŽ€

The gdisk command is part of the GPT fdisk package and is available from Rod Smith. ๐Ÿ’…


Roderick W. Smith ยท version 1.0.10 ยท GDISK(8) ๐ŸŒˆโœจ Thanks for reading, bestie, you're literally a partition-table pro now! ๐Ÿ’œ๐Ÿงš