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