srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 1 | .\" Copyright 2009 Roderick W. Smith (rodsmith@rodsbooks.com) |
| 2 | .\" May be distributed under the GNU General Public License |
srs5694 | 1d1448a | 2009-12-31 21:20:19 -0500 | [diff] [blame^] | 3 | .TH "GDISK" "8" "0.5.1" "Roderick W. Smith" "GPT fdisk Manual" |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 4 | .SH "NAME" |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 5 | gdisk \- GUID partition table (GPT) manipulator for Linux and Unix |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 6 | .SH "SYNOPSIS" |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 7 | .BI "gdisk " |
| 8 | [ \-l ] |
| 9 | .I device |
srs5694 | 221e087 | 2009-08-29 15:00:31 -0400 | [diff] [blame] | 10 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 11 | .SH "DESCRIPTION" |
srs5694 | 221e087 | 2009-08-29 15:00:31 -0400 | [diff] [blame] | 12 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 13 | GPT fdisk (aka \fBgdisk\fR) is a text\-mode menu\-driven program for |
| 14 | creation and manipulation of partition tables. It will automatically |
| 15 | convert an old\-style Master Boot Record (MBR) partition table or BSD |
| 16 | disklabel stored without an MBR carrier partition to the newer Globally |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 17 | Unique Identifier (GUID) Partition Table (GPT) format, or will load a GUID |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 18 | partition table. When used with the \fI\-l\fR command\-line option, the |
| 19 | program displays the current partition table and then exits. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 20 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 21 | GPT fdisk operates mainly on the GPT headers and partition tables; however, |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 22 | it can and will generate a fresh protective MBR, when required. (Any boot |
| 23 | loader code in the protective MBR will not be disturbed.) If you've created |
| 24 | an unusual protective MBR, such as a hybrid MBR created by |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 25 | \fBgptsync\fR or \fBgdisk\fR's own hybrid MBR creation feature, |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 26 | this should not be disturbed by most ordinary actions. Some advanced data |
| 27 | recovery options require you to understand the distinctions between the |
| 28 | main and backup data, as well as between the GPT headers and the partition |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 29 | tables. For information on MBR vs. GPT, as well as GPT terminology and |
| 30 | structure, see the extended \fBgdisk\fR documentation at |
| 31 | \fIhttp://www.rodsbooks.com/gdisk/\fR or consult Wikipedia. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 32 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 33 | The \fBgdisk\fR program employs a user interface similar to that of Linux's |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 34 | \fBfdisk\fR, but \fBgdisk\fR modifies GPT partitions. It also has the |
| 35 | capability of transforming MBR partitions or BSD disklabels into GPT |
| 36 | partitions. Like the original \fBfdisk\fR program, \fBgdisk\fR does not |
| 37 | modify disk structures until you explicitly write them to disk, so if you |
| 38 | make a mistake, you can exit from the program with the 'q' option to save |
| 39 | your partitions. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 40 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 41 | Ordinarily, \fBgdisk\fR operates on disk device files, such as |
| 42 | \fI/dev/sda\fR or \fI/dev/hda\fR under Linux, \fI/dev/disk0\fR under |
| 43 | Mac OS X, or \fI/dev/ad0\fR or \fI/dev/da0\fR under FreeBSD. The program |
| 44 | can also operate on disk image files, which can be either copies of whole |
| 45 | disks (made with \fBdd\fR, for instance) or raw disk images used by |
| 46 | emulators such as QEMU or VMWare. Note that only \fIraw\fR disk images |
| 47 | are supported; \fBgdisk\fR cannot work on compressed or other advanced |
| 48 | disk image formats. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 49 | |
| 50 | The MBR partitioning system uses a combination of cylinder/head/sector |
| 51 | (CHS) addressing and logical block addressing (LBA). The former is klunky |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 52 | and limiting. GPT drops CHS addressing and uses 64\-bit LBA mode |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 53 | exclusively. Thus, GPT data structures, and therefore |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 54 | \fBgdisk\fR, do not need to deal with CHS geometries and all the problems |
| 55 | they create. Users of \fBfdisk\fR will note that \fBgdisk\fR |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 56 | lacks the options and limitations associated with CHS geometries. |
| 57 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 58 | For best results, you should use an OS\-specific partition table |
| 59 | program whenever possible. For example, you should make Mac OS X |
| 60 | partitions with the Mac OS X Disk Utility program and Linux partitions |
| 61 | with the Linux \fBgdisk\fR or GNU Parted program. |
srs5694 | 221e087 | 2009-08-29 15:00:31 -0400 | [diff] [blame] | 62 | |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 63 | Upon start, \fBgdisk\fR attempts to identify the partition type in use on |
| 64 | the disk. If it finds valid GPT data, \fBgdisk\fR will use it. If |
| 65 | \fBgdisk\fR finds a valid MBR or BSD disklabel but no GPT data, it will |
| 66 | attempt to convert the MBR or disklabel into GPT form. (BSD disklabels are |
| 67 | likely to have unusable first and/or final partitions because they overlap |
| 68 | with the GPT data structures, though.) GPT fdisk can identify, but not use |
| 69 | data in, Apple Partition Map (APM) disks, which are used on 680x0\- and |
| 70 | PowerPC\-based Macintoshes. Upon exiting with the 'w' option, \fBgdisk\fR |
| 71 | replaces the MBR or disklabel with a GPT. \fIThis action is potentially |
| 72 | dangerous!\fR Your system may become unbootable, and partition type codes |
| 73 | may become corrupted if the disk uses unrecognized type codes. Boot |
| 74 | problems are particularly likely if you're multi\-booting with any |
| 75 | GPT\-unaware OS. If you mistakenly launch \fBgdisk\fR on an MBR disk, you |
| 76 | can safely exit the program without making any changes by using the 'q' |
| 77 | option. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 78 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 79 | The MBR\-to\-GPT conversion will leave at least one gap in the partition |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 80 | numbering if the original MBR used logical partitions. These gaps are |
| 81 | harmless, but you can eliminate them by using the 's' option, if you like. |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 82 | (Doing this may require you to update your \fI/etc/fstab\fR file.) |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 83 | |
| 84 | When creating a fresh partition table, certain considerations may be in |
| 85 | order: |
| 86 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 87 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 88 | .B * |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 89 | For data (non\-boot) disks, and for boot disks used on BIOS\-based computers |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 90 | with GRUB as the boot loader, partitions may be created in whatever order |
| 91 | and in whatever sizes are desired. |
| 92 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 93 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 94 | .B * |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 95 | Boot disks for EFI\-based systems require an \fIEFI System |
| 96 | Partition\fR (\fBgdisk\fR internal code 0xEF00) formatted as FAT\-32. |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 97 | The recommended size of this partition is between 100 and 200 MiB. |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 98 | Boot\-related files are stored here. (Note that GNU Parted identifies |
| 99 | such partitions as having the "boot flag" set.) |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 100 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 101 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 102 | .B * |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 103 | Some boot loaders for BIOS\-based systems make use of a \fIBIOS Boot |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 104 | Partition\fR (\fBgdisk\fR internal code 0xEF02), in which the secondary |
| 105 | boot loader is stored, possibly without the benefit of a filesystem. This |
| 106 | partition can typically be quite small (roughly 32 to 200 KiB), but you |
| 107 | should consult your boot loader documentation for details. |
srs5694 | 2a9f5da | 2009-08-26 00:48:01 -0400 | [diff] [blame] | 108 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 109 | .TP |
srs5694 | 2a9f5da | 2009-08-26 00:48:01 -0400 | [diff] [blame] | 110 | .B * |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 111 | If Windows is to boot from a GPT disk, a partition of type \fIMicrosoft |
| 112 | Reserved\fR (\fBgdisk\fR |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 113 | internal code 0x0C01) is recommended. This partition should be about 128 MiB |
| 114 | in size. It ordinarily follows the EFI System Partition and immediately |
| 115 | precedes the Windows data partitions. (Note that GNU Parted creates all |
| 116 | FAT partitions as this type, which actually makes the partition unusable |
| 117 | for normal file storage in both Windows and Mac OS X.) |
| 118 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 119 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 120 | .B * |
| 121 | Some OSes' GPT utilities create some blank space (typically 128 MiB) after |
| 122 | each partition. The intent is to enable future disk utilities to use this |
| 123 | space. Such free space is not required of GPT disks, but creating it may |
srs5694 | e4ac11e | 2009-08-31 10:13:04 -0400 | [diff] [blame] | 124 | help in future disk maintenance. You can use GPT fdisk's relative partition |
| 125 | positioning option (specifying the starting sector as '+128M', for |
| 126 | instance) to simplify creating such gaps. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 127 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 128 | .SH "OPTIONS" |
| 129 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 130 | .B \-l |
| 131 | List the partition tables for the specified devices and then exit. |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 132 | .PP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 133 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 134 | Most interactions with \fBgdisk\fR |
| 135 | occur with its interactive text\-mode menus. Three menus exist: the main |
| 136 | menu, the recovery & transformation menu, and the experts' menu. The main |
| 137 | menu provides the functions that are most likely to be useful for typical partitioning tasks, such as creating and deleting partitions, changing partition type codes, and so on. Specific functions are: |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 138 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 139 | .TP |
srs5694 | 221e087 | 2009-08-29 15:00:31 -0400 | [diff] [blame] | 140 | .B b |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 141 | Save partition data to a backup file. You can back up your current |
| 142 | in-memory partition table to a disk file using this option. The resulting |
| 143 | file is a binary file consisting of the protective MBR, the main GPT |
| 144 | header, the backup GPT header, and one copy of the partition table, in that |
| 145 | order. Note that the backup is of the current in-memory data structures, so |
| 146 | if you launch the program, make changes, and then use this option, the |
| 147 | backup will reflect your changes. Note also that the restore option is on |
| 148 | the recovery & transformation menu; the backup option is on the main menu |
| 149 | to encourage its use. |
srs5694 | 221e087 | 2009-08-29 15:00:31 -0400 | [diff] [blame] | 150 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 151 | |
| 152 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 153 | .B c |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 154 | Change the GPT name of a partition. This name is encoded as a UTF\-16 |
| 155 | string, but \fBgdisk\fR |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 156 | supports only ASCII characters as names. For the most part, Linux ignores |
srs5694 | 221e087 | 2009-08-29 15:00:31 -0400 | [diff] [blame] | 157 | the partition name, but it may be important in some OSes. GPT fdisk sets |
| 158 | a default name based on the partition type code. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 159 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 160 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 161 | .B d |
| 162 | Delete a partition. This action deletes the entry from the partition table |
| 163 | but does not disturb the data within the sectors originally allocated to |
srs5694 | e4ac11e | 2009-08-31 10:13:04 -0400 | [diff] [blame] | 164 | the partition on the disk. If a corresponding hybrid MBR partition exists, |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 165 | \fBgdisk\fR deletes it, as well, and expands any adjacent 0xEE (EFI GPT) |
| 166 | MBR protective partition to fill the new free space. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 167 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 168 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 169 | .B i |
| 170 | Show detailed partition information. The summary information produced by |
| 171 | the 'p' command necessarily omits many details, such as the partition's |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 172 | unique GUID and the translation of \fBgdisk\fR's |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 173 | internal partition type code to a plain type name. The 'i' option |
| 174 | displays this information for a single partition. |
| 175 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 176 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 177 | .B l |
| 178 | Display a summary of partition types. GPT uses a GUID to identify |
| 179 | partition types for particular OSes and purposes. For ease of data entry, |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 180 | \fBgdisk\fR compresses these into two\-byte (four\-digit hexadecimal) |
| 181 | values that are related to their equivalent MBR codes. Specifically, the |
| 182 | MBR code is multiplied by hexadecimal 0x0100. For instance, the code for |
| 183 | Linux swap space in MBR is 0x82, and it's 0x8200 in \fBgdisk\fR. |
| 184 | A one\-to\-one correspondence is impossible, though. Most notably, many DOS, |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 185 | Windows, and Linux data partition codes correspond to a single GPT code |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 186 | (entered as 0x0700 in \fBgdisk\fR). Some OSes use a single MBR code but |
| 187 | employ many more codes in GPT. For these, \fBgdisk\fR |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 188 | adds code numbers sequentially, such as 0xa500 for a FreeBSD disklabel, |
| 189 | 0xa501 for FreeBSD boot, 0xa502 for FreeBSD swap, and so on. Note that |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 190 | these two\-byte codes are unique to \fBgdisk\fR. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 191 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 192 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 193 | .B n |
| 194 | Create a new partition. This command is modelled after the equivalent |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 195 | \fBfdisk\fR option, although some differences exist. You enter a partition |
| 196 | number, starting sector, and an ending sector. Both start and end sectors |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 197 | can be specified in absolute terms as sector numbers or as positions |
| 198 | measured in kilobytes (K), megabytes (M), gigabytes (G), or terabytes (T); |
| 199 | for instance, \fI\fB40M\fR\fR specifies a position 40MiB from the start of |
| 200 | the disk. You can specify locations relative to the start or end of the |
| 201 | specified range by preceding the number by a '+' or '\-' symbol, as in |
| 202 | \fI\fB+2G\fR\fR to specify a point 2GiB after the first available sector, |
| 203 | or \fI\fB\-200M\fR\fR to specify a point 200MiB before the last available |
| 204 | sector. Pressing the Enter key with no input specifies the default value, |
| 205 | which is the start of the largest available block for the start sector and |
| 206 | the last available block for the end sector. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 207 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 208 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 209 | .B o |
| 210 | Clear out all partition data. This includes GPT header data, |
| 211 | all partition definitions, and the protective MBR. |
| 212 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 213 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 214 | .B p |
| 215 | Display basic partition summary data. This includes partition |
| 216 | numbers, starting and ending sector numbers, partition sizes, |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 217 | \fBgdisk\fR's partition types codes, and partition names. For |
| 218 | additional information, use the 'i' command. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 219 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 220 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 221 | .B q |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 222 | Quit from the program \fIwithout saving your changes\fR. |
srs5694 | 2a9f5da | 2009-08-26 00:48:01 -0400 | [diff] [blame] | 223 | Use this option if you just wanted to view information or if you make a |
| 224 | mistake and want to back out of all your changes. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 225 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 226 | .TP |
| 227 | .B r |
| 228 | Enter the recovery & transformation menu. This menu includes emergency |
| 229 | recovery options (to fix damaged GPT data structures) and options to |
| 230 | transform to or from other partitioning systems, including creating |
| 231 | hybrid MBRs. |
| 232 | |
| 233 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 234 | .B s |
| 235 | Sort partition entries. GPT partition numbers need not match the order of |
| 236 | partitions on the disk. If you want them to match, you can use this option. |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 237 | Note that some partitioning utilities sort partitions whenever they make |
| 238 | changes. Such changes will be reflected in your device filenames, so you |
| 239 | may need to edit \fI/etc/fstab\fR if you use this option. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 240 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 241 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 242 | .B t |
| 243 | Change a single partition's type code. You enter the type code using a |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 244 | two\-byte hexadecimal number, as described earlier. You may also enter a |
| 245 | GUID directly, if you have one and \fBgdisk\fR doesn't know it. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 246 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 247 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 248 | .B v |
| 249 | Verify disk. This option checks for a variety of problems, such as |
| 250 | incorrect CRCs and mismatched main and backup data. This option does not |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 251 | automatically correct most problems, though; for that, you must use |
| 252 | options on the recovery & transformation menu. If no problems are found, |
| 253 | this command displays a summary of unallocated disk space. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 254 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 255 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 256 | .B w |
| 257 | Write data. Use this command to save your changes. |
| 258 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 259 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 260 | .B x |
| 261 | Enter the experts' menu. Using this option provides access to features you |
| 262 | can use to get into even more trouble than the main menu allows. |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 263 | .PP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 264 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 265 | .TP |
| 266 | .B ? |
| 267 | Print the menu. Type this command (or any other unrecognized command) to |
| 268 | see a summary of available options. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 269 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 270 | .PP |
| 271 | The second \fBgdisk\fR menu is the recovery & transformation menu, which |
| 272 | provides access to data recovery options and features related to the |
| 273 | transformation of partitions between partitioning schemes (converting |
| 274 | BSD disklabels into GPT partitions or creating hybrid MBRs, for instance). |
| 275 | A few options on this menu duplicate functionality on the main |
| 276 | menu, for the sake of convenience. The options on this menu are: |
| 277 | |
| 278 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 279 | .B b |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 280 | Rebuild GPT header from backup. You can use the backup GPT header to |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 281 | rebuild the main GPT header with this option. It's likely to be useful if |
| 282 | your main GPT header was damaged or destroyed (say, by sloppy use of |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 283 | \fBdd\fR). |
| 284 | |
| 285 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 286 | .B c |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 287 | Load backup partition table. Ordinarily, \fBgdisk\fR |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 288 | uses only the main partition table (although the backup's integrity is |
| 289 | checked when you launch the program). If the main partition table has been |
| 290 | damaged, you can use this option to load the backup from disk and use it |
| 291 | instead. Note that this will almost certainly produce no or strange |
| 292 | partition entries if you've just converted an MBR disk to GPT format, since |
| 293 | there will be no backup partition table on disk. |
| 294 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 295 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 296 | .B d |
| 297 | Use main GPT header and rebuild the backup. This option is likely to be |
| 298 | useful if the backup GPT header has been damaged or destroyed. |
srs5694 | c0ca8f8 | 2009-08-20 21:35:25 -0400 | [diff] [blame] | 299 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 300 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 301 | .B e |
| 302 | Load main partition table. This option reloads the main partition table |
| 303 | from disk. It's only likely to be useful if you've tried to use the backup |
| 304 | partition table (via 'c') but it's in worse shape then the main partition |
| 305 | table. |
srs5694 | c0ca8f8 | 2009-08-20 21:35:25 -0400 | [diff] [blame] | 306 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 307 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 308 | .B f |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 309 | Load MBR and build fresh GPT from it. Use this option if your GPT is corrupt |
| 310 | or conflicts with the MBR and you want to use the MBR as the basis for a new |
| 311 | set of GPT partitions. |
| 312 | |
| 313 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 314 | .B g |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 315 | Convert GPT into MBR and exit. This option converts up to four GPT partitions |
| 316 | into MBR form, destroys the GPT data structures, saves the new MBR, and exits. |
| 317 | Use this option if you've tried GPT and find that MBR works better for you. |
| 318 | Note that this function generates up to four \fIprimary\fR MBR partitions; |
| 319 | it cannot generate logical partitions, and so it cannot transform more than |
| 320 | four partitions. If four or fewer partitions exist, and if they can be represented |
| 321 | in the 32\-bit MBR LBA scheme, this function converts |
| 322 | them all. If more than four partitions exist, you'll be asked to select which |
| 323 | ones to convert. See also the 'h' option. |
srs5694 | c0ca8f8 | 2009-08-20 21:35:25 -0400 | [diff] [blame] | 324 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 325 | .TP |
srs5694 | c0ca8f8 | 2009-08-20 21:35:25 -0400 | [diff] [blame] | 326 | .B h |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 327 | Create a hybrid MBR. This is an ugly workaround that enables GPT\-unaware |
| 328 | OSes, or those that can't boot from a GPT disk, to access up to three of |
srs5694 | c0ca8f8 | 2009-08-20 21:35:25 -0400 | [diff] [blame] | 329 | the partitions on the disk by creating MBR entries for them. Note that |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 330 | these hybrid MBR entries can easily go out of sync with the GPT entries, |
| 331 | particularly when hybrid\-unaware GPT utilities are used to edit the disk. |
| 332 | Thus, you may need to recreate the hybrid MBR if you use such tools. |
srs5694 | c0ca8f8 | 2009-08-20 21:35:25 -0400 | [diff] [blame] | 333 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 334 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 335 | .B i |
| 336 | Show detailed partition information. This option is identical to the 'i' |
| 337 | option on the main menu. |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 338 | |
| 339 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 340 | .B l |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 341 | Load partition data from a backup file. This option is the reverse of the 'b' |
| 342 | option on the main menu. Note that restoring partition data from anything |
| 343 | but the original disk is not recommended. |
| 344 | |
| 345 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 346 | .B m |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 347 | Return to the main menu. This option enables you to enter main\-menu commands. |
| 348 | |
| 349 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 350 | .B o |
| 351 | Print protective MBR data. You can see a summary of the protective MBR's |
| 352 | partitions with this option. This may enable you to spot glaring problems |
| 353 | or help identify the partitions in a hybrid MBR. |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 354 | |
| 355 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 356 | .B p |
| 357 | Print the partition table. This option is identical to the 'p' option in |
| 358 | the main menu. |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 359 | |
| 360 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 361 | .B q |
| 362 | Quit without saving changes. This option is identical to the 'q' option in |
| 363 | the main menu. |
srs5694 | 2a9f5da | 2009-08-26 00:48:01 -0400 | [diff] [blame] | 364 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 365 | .TP |
| 366 | .B t |
| 367 | Transform BSD partitions into GPT partitions. This option works on BSD |
| 368 | disklabels held within GPT (or converted MBR) partitions. Converted |
| 369 | partitions' type codes are likely to need manual adjustment. \fBgdisk\fR |
| 370 | will attempt to convert BSD disklabels stored on the main disk when |
| 371 | launched, but this conversion is likely to produce first and/or last |
| 372 | partitions that are unusable. The many BSD variants means that the |
| 373 | probability of \fBgdisk\fR being unable to convert a BSD disklabel is |
| 374 | high compared to the likelihood of problems with an MBR conversion. |
| 375 | |
| 376 | .TP |
| 377 | .B v |
| 378 | Verify disk. This option is identical to the 'v' option in the main menu. |
| 379 | |
| 380 | .TP |
| 381 | .B w |
| 382 | Write table to disk and exit. This option is identical to the 'w' option in |
| 383 | the main menu. |
| 384 | |
| 385 | .TP |
| 386 | .B x |
| 387 | Enter the experts' menu. This option is identical to the 'x' option in the |
| 388 | main menu. |
| 389 | |
| 390 | .TP |
| 391 | .B ? |
| 392 | Print the menu. This option (or any unrecognized entry) displays a summary |
| 393 | of the menu options. |
| 394 | |
| 395 | .PP |
| 396 | The third \fBgdisk\fR menu is the experts' menu. This menu provides advanced |
| 397 | options that aren't closely related to recovery or transformation between |
| 398 | partitioning systems. Its options are: |
| 399 | |
| 400 | .TP |
| 401 | .B a |
| 402 | Set attributes. GPT provides a 64\-bit attributes field that can be used to |
| 403 | set features for each partition. \fBgdisk\fR supports four attributes: |
| 404 | \fIsystem partition\fR, \fIread\-only\fR, \fIhidden\fR, and |
| 405 | \fIdo not automount\fR. You can set other attributes, but their numbers |
| 406 | aren't translated into anything useful. In practice, most OSes seem to |
| 407 | ignore these attributes. |
| 408 | |
| 409 | .TP |
| 410 | .B c |
| 411 | Change partition GUID. You can enter a custom unique GUID for a partition |
| 412 | using this option. (Note this refers to the GUID that uniquely identifies a |
| 413 | partition, not to its type code, which you can change with the 't' main\-menu |
| 414 | option.) Ordinarily, \fBgdisk\fR assigns this number randomly; however, |
| 415 | you might want to adjust the number manually if you've wound up with the |
| 416 | same GUID on two partitions because of buggy GUID assignments (hopefully |
| 417 | not in \fBgdisk\fR) or sheer incredible coincidence. |
| 418 | |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 419 | .TP |
srs5694 | 1d1448a | 2009-12-31 21:20:19 -0500 | [diff] [blame^] | 420 | .B d |
| 421 | Display the number of logical sectors per physical sector. This value |
| 422 | determines the sector alignment that GPT fdisk enforces. See the |
| 423 | description of the 'l' option for more details. Note that this value |
| 424 | is not actually detected on a disk-by-disk basis; it's set to 8 as a |
| 425 | blanket default. |
| 426 | |
| 427 | .TP |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 428 | .B e |
srs5694 | 1d1448a | 2009-12-31 21:20:19 -0500 | [diff] [blame^] | 429 | Move backup GPT data structures to the end of the disk. Use this command if |
| 430 | you've added disks to a RAID array, thus creating a virtual disk with space |
| 431 | that follows the backup GPT data structures. This command moves the backup |
| 432 | GPT data structures to the end of the disk, where they belong. |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 433 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 434 | .TP |
| 435 | .B g |
| 436 | Change disk GUID. Each disk has a unique GUID code, which \fBgdisk\fR |
| 437 | assigns randomly upon creation of the GPT data structures. You can generate |
| 438 | a fresh random GUID or enter one manually with this option. |
| 439 | |
| 440 | .TP |
| 441 | .B i |
| 442 | Show detailed partition information. This option is identical to the 'i' |
| 443 | option on the main menu. |
| 444 | |
srs5694 | 1d1448a | 2009-12-31 21:20:19 -0500 | [diff] [blame^] | 445 | .TP |
| 446 | .B l |
| 447 | Change the number of logical sectors per physical sector. Prior to December |
| 448 | of 2009, most hard disks used 512-byte physical sectors. Starting in |
| 449 | December of 2009, disk manufacturers began transitioning to disks with |
| 450 | larger physical sectors, but their firmware translated to 512-byte logical |
| 451 | sectors to maintain compatibility with older OSes. If partitions begin |
| 452 | mid-physical-sector, though, performance can suffer on such drives, since |
| 453 | important filesystem data structures can span physical sectors on the disk. |
| 454 | To minimize such problems, GPT fdisk aligns the start of partitions on the |
| 455 | boundary of presumed physical sectors. You can set the number of logical |
| 456 | sectors per physical sector with this option. The default is 8, which is |
| 457 | set blindly; GPT fdisk does not currently read this information from the |
| 458 | disk. The default value will result in a tiny amount of wasted disk space |
| 459 | on older disks with true 512-byte sectors but will otherwise be harmless. |
| 460 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 461 | .TP |
| 462 | .B m |
| 463 | Return to the main menu. This option enables you to enter main\-menu commands. |
| 464 | |
| 465 | .TP |
| 466 | .B n |
| 467 | Create a new protective MBR. Use this option if the current protective MBR |
| 468 | is damaged in a way that \fBgdisk\fR doesn't automatically detect and |
| 469 | correct, or if you want to convert a hybrid MBR into a "pure" GPT with a |
| 470 | conventional protective MBR. |
| 471 | |
| 472 | .TP |
| 473 | .B o |
| 474 | Print protective MBR data. You can see a summary of the protective MBR's |
| 475 | partitions with this option. This may enable you to spot glaring problems |
| 476 | or help identify the partitions in a hybrid MBR. |
| 477 | |
| 478 | .TP |
| 479 | .B p |
| 480 | Print the partition table. This option is identical to the 'p' option in |
| 481 | the main menu. |
| 482 | |
| 483 | .TP |
| 484 | .B q |
| 485 | Quit without saving changes. This option is identical to the 'q' option in |
| 486 | the main menu. |
| 487 | |
| 488 | .TP |
| 489 | .B r |
| 490 | Enter the recovery & transformations menu. This option is identical to |
| 491 | the 'r' option on the main menu. |
| 492 | |
| 493 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 494 | .B s |
srs5694 | 2a9f5da | 2009-08-26 00:48:01 -0400 | [diff] [blame] | 495 | Resize partition table. The default partition table size is 128 entries. |
| 496 | Officially, sizes of less than 16KB (128 entries, given the normal entry |
| 497 | size) are unsupported by the GPT specification; however, in practice they |
| 498 | seem to work, and can sometimes be useful in converting MBR disks. Larger |
| 499 | sizes also work fine. OSes may impose their own limits on the number of |
| 500 | partitions, though. |
| 501 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 502 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 503 | .B v |
| 504 | Verify disk. This option is identical to the 'v' option in the main menu. |
srs5694 | c0ca8f8 | 2009-08-20 21:35:25 -0400 | [diff] [blame] | 505 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 506 | .TP |
srs5694 | c0ca8f8 | 2009-08-20 21:35:25 -0400 | [diff] [blame] | 507 | .B z |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 508 | Zap (destroy) the GPT data structures and exit. Use this option if you want to |
| 509 | repartition a GPT disk using \fBfdisk\fR or some other GPT\-unaware program. |
srs5694 | c0ca8f8 | 2009-08-20 21:35:25 -0400 | [diff] [blame] | 510 | You'll be given the choice of preserving the existing MBR, in case it's a |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 511 | hybrid MBR with salvageable partitions or if you've already created new MBR |
| 512 | partitions and want to erase the remnants of your GPT partitions. \fIIf you've |
| 513 | already created new MBR partitions, it's conceivable that this option will |
| 514 | damage the first and/or last MBR partitions!\fR Such an event is unlikely, but |
| 515 | could occur if your new MBR partitions overlap the old GPT data structures. |
srs5694 | c0ca8f8 | 2009-08-20 21:35:25 -0400 | [diff] [blame] | 516 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 517 | .TP |
| 518 | .B ? |
| 519 | Print the menu. This option (or any unrecognized entry) displays a summary |
| 520 | of the menu options. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 521 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 522 | .PP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 523 | In many cases, you can press the Enter key to select a default option when |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 524 | entering data. When only one option is possible, \fBgdisk\fR |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 525 | usually bypasses the prompt entirely. |
| 526 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 527 | .SH "BUGS" |
srs5694 | 1d1448a | 2009-12-31 21:20:19 -0500 | [diff] [blame^] | 528 | As of November 2009 (version 0.5.1), \fBgdisk\fR |
srs5694 | e4ac11e | 2009-08-31 10:13:04 -0400 | [diff] [blame] | 529 | should be considered beta software. Known bugs and limitations include: |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 530 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 531 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 532 | .B * |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 533 | The program compiles correctly only on Linux, FreeBSD, and Mac OS X. Linux |
| 534 | versions for x86\-64 (64\-bit), x86 (32\-bit), and PowerPC (32\-bit) have been |
| 535 | tested, with the x86\-64 version having seen the most testing. The Mac OS X |
| 536 | support was added with version 0.3.1 and has not been as thoroughly tested. |
| 537 | FreeBSD support was added with version 0.4.0 and has seen even less |
| 538 | testing. |
srs5694 | e4ac11e | 2009-08-31 10:13:04 -0400 | [diff] [blame] | 539 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 540 | .TP |
srs5694 | e4ac11e | 2009-08-31 10:13:04 -0400 | [diff] [blame] | 541 | .B * |
| 542 | The FreeBSD version of the program can't write changes to the partition |
| 543 | table to a disk when existing partitions on that disk are mounted. (The |
| 544 | same problem exists with many other FreeBSD utilities, such as |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 545 | \fBgpt\fR, \fBfdisk\fR, and \fBdd\fR.) |
srs5694 | e4ac11e | 2009-08-31 10:13:04 -0400 | [diff] [blame] | 546 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 547 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 548 | .B * |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 549 | The fields used to display the start and end sector numbers for partitions |
| 550 | in the 'p' command are 14 characters wide. This translates to a limitation |
| 551 | of about 45 PiB. On larger disks, the displayed columns will go out of |
| 552 | alignment. |
| 553 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 554 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 555 | .B * |
| 556 | Only ASCII characters are supported in the partition name field. If an |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 557 | existing partition uses non\-ASCII UTF\-16 characters, they're likely to be |
| 558 | corrupted in the 'i' and 'p' menu options' displays; however, they should be |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 559 | preserved when loading and saving partitions. |
| 560 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 561 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 562 | .B * |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 563 | The program can load only up to 128 partitions (4 primary partitions and |
| 564 | 124 logical partitions) when converting from MBR format. This limit can |
| 565 | be raised by changing the \fI#define MAX_MBR_PARTS\fR line in the |
| 566 | \fImbr.h\fR source code file and recompiling; however, such a change |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 567 | will require using a larger\-than\-normal partition table. (The limit |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 568 | of 128 partitions was chosen because that number equals the 128 partitions |
srs5694 | 8bb7876 | 2009-11-24 15:43:49 -0500 | [diff] [blame] | 569 | supported by the most common partition table size.) |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 570 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 571 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 572 | .B * |
| 573 | Converting from MBR format sometimes fails because of insufficient space at |
| 574 | the start or (more commonly) the end of the disk. Resizing the partition |
| 575 | table (using the 's' option in the experts' menu) can sometimes overcome |
| 576 | this problem; however, in extreme cases it may be necessary to resize a |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 577 | partition using GNU Parted or a similar tool prior to conversion with |
| 578 | \fBgdisk\fR. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 579 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 580 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 581 | .B * |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 582 | MBR conversions work only if the disk has correct LBA partition |
| 583 | descriptors. These descriptors should be present on any disk over 8 GiB in |
| 584 | size or on smaller disks partitioned with any but very ancient software. |
| 585 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 586 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 587 | .B * |
srs5694 | e4ac11e | 2009-08-31 10:13:04 -0400 | [diff] [blame] | 588 | BSD disklabel support can create first and/or last partitions that overlap |
| 589 | with the GPT data structures. This can sometimes be compensated by |
| 590 | adjusting the partition table size, but in extreme cases the affected |
| 591 | partition(s) may need to be deleted. |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 592 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 593 | .TP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 594 | .B * |
srs5694 | e4ac11e | 2009-08-31 10:13:04 -0400 | [diff] [blame] | 595 | Because of the highly variable nature of BSD disklabel structures, |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 596 | conversions from this form may be unreliable \-\- partitions may be dropped, |
srs5694 | e4ac11e | 2009-08-31 10:13:04 -0400 | [diff] [blame] | 597 | converted in a way that creates overlaps with other partitions, or |
| 598 | converted with incorrect start or end values. Use this feature with |
| 599 | caution! |
| 600 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 601 | .TP |
srs5694 | e4ac11e | 2009-08-31 10:13:04 -0400 | [diff] [blame] | 602 | .B * |
| 603 | Booting after converting an MBR or BSD disklabel disk is likely to be |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 604 | disrupted. Sometimes re\-installing a boot loader will fix the problem, but |
| 605 | other times you may need to switch boot loaders. Except on EFI\-based |
srs5694 | e4ac11e | 2009-08-31 10:13:04 -0400 | [diff] [blame] | 606 | platforms, Windows through at least Windows 7 RC doesn't support booting |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 607 | from GPT disks. Creating a hybrid MBR (using the 'h' option on the recovery & |
| 608 | transformation menu) or abandoning GPT in favor of MBR may be your only |
| 609 | options in this case. |
srs5694 | c0ca8f8 | 2009-08-20 21:35:25 -0400 | [diff] [blame] | 610 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 611 | .PP |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 612 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 613 | The support for big\-endian CPUs (PowerPC, for example) is new, as of version |
srs5694 | 2a9f5da | 2009-08-26 00:48:01 -0400 | [diff] [blame] | 614 | 0.3.5. I advise using caution on that platform, particularly with the more |
| 615 | obscure features of the program. |
| 616 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 617 | .SH "AUTHORS" |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 618 | Primary author: Roderick W. Smith (rodsmith@rodsbooks.com) |
| 619 | |
| 620 | Contributors: |
| 621 | |
| 622 | * Yves Blusseau (1otnwmz02@sneakemail.com) |
| 623 | |
srs5694 | 7f244ba | 2009-08-18 14:22:12 -0400 | [diff] [blame] | 624 | * David Hubbard (david.c.hubbard@gmail.com) |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 625 | |
| 626 | .SH "SEE ALSO" |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 627 | \fBcfdisk (8)\fR, |
| 628 | \fBfdisk (8)\fR, |
| 629 | \fBmkfs (8)\fR, |
| 630 | \fBparted (8)\fR, |
| 631 | \fBsfdisk (8)\fR |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 632 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 633 | \fIhttp://en.wikipedia.org/wiki/GUID_Partition_Table\fR |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 634 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 635 | \fIhttp://developer.apple.com/technotes/tn2006/tn2166.html\fR |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 636 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 637 | \fIhttp://www.rodsbooks.com/gdisk/\fR |
srs5694 | e7b4ff9 | 2009-08-18 13:16:10 -0400 | [diff] [blame] | 638 | |
srs5694 | 978041c | 2009-09-21 20:51:47 -0400 | [diff] [blame] | 639 | .SH "AVAILABILITY" |
| 640 | The \fBgdisk\fR command is part of the \fIGPT fdisk\fR package and is |
| 641 | available from Rod Smith. |