~ubuntu-branches/ubuntu/trusty/gdisk/trusty-proposed

« back to all changes in this revision

Viewing changes to gdisk.8

  • Committer: Bazaar Package Importer
  • Author(s): Guillaume Delacour
  • Date: 2011-01-26 20:55:51 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20110126205551-j876kgolmsg2674s
Tags: upstream-0.6.14
ImportĀ upstreamĀ versionĀ 0.6.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\" Copyright 2009 Roderick W. Smith (rodsmith@rodsbooks.com)
 
1
.\" Copyright 2010 Roderick W. Smith (rodsmith@rodsbooks.com)
2
2
.\" May be distributed under the GNU General Public License
3
 
.TH "GDISK" "8" "0.5.1" "Roderick W. Smith" "GPT fdisk Manual"
 
3
.TH "GDISK" "8" "0.6.14" "Roderick W. Smith" "GPT fdisk Manual"
4
4
.SH "NAME"
5
 
gdisk \- GUID partition table (GPT) manipulator for Linux and Unix
 
5
gdisk \- Interactive GUID partition table (GPT) manipulator
6
6
.SH "SYNOPSIS"
7
7
.BI "gdisk "
8
8
[ \-l ]
9
9
.I device
10
10
 
11
11
.SH "DESCRIPTION"
12
 
 
13
12
GPT fdisk (aka \fBgdisk\fR) is a text\-mode menu\-driven program for
14
13
creation and manipulation of partition tables. It will automatically
15
14
convert an old\-style Master Boot Record (MBR) partition table or BSD
102
101
.B *
103
102
Some boot loaders for BIOS\-based systems make use of a \fIBIOS Boot
104
103
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.
 
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
108
 
109
109
.TP 
110
110
.B *
112
112
Reserved\fR (\fBgdisk\fR
113
113
internal code 0x0C01) is recommended. This partition should be about 128 MiB
114
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.)
 
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
118
 
119
119
.TP 
120
120
.B *
139
139
.TP 
140
140
.B b
141
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
 
142
in\-memory partition table to a disk file using this option. The resulting
143
143
file is a binary file consisting of the protective MBR, the main GPT
144
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
 
145
order. Note that the backup is of the current in\-memory data structures, so
146
146
if you launch the program, make changes, and then use this option, the
147
147
backup will reflect your changes. Note also that the restore option is on
148
148
the recovery & transformation menu; the backup option is on the main menu
155
155
string, but \fBgdisk\fR
156
156
supports only ASCII characters as names. For the most part, Linux ignores
157
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.
 
158
a 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 filesystem's
 
160
data structures.
159
161
 
160
162
.TP 
161
163
.B d
195
197
\fBfdisk\fR option, although some differences exist. You enter a partition
196
198
number, starting sector, and an ending sector. Both start and end sectors
197
199
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.
 
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.
207
210
 
208
211
.TP 
209
212
.B o
210
213
Clear out all partition data. This includes GPT header data,
211
 
all partition definitions, and the protective MBR.
 
214
all partition definitions, and the protective MBR. The sector alignment
 
215
is reset to the default (2048 sectors, or 1MB).
212
216
 
213
217
.TP 
214
218
.B p
312
316
 
313
317
.TP 
314
318
.B g
315
 
Convert GPT into MBR and exit. This option converts up to four GPT partitions
 
319
Convert GPT into MBR and exit. This option converts as many partitions as possible
316
320
into MBR form, destroys the GPT data structures, saves the new MBR, and exits.
317
321
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.
 
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.
324
330
 
325
331
.TP 
326
332
.B h
329
335
the partitions on the disk by creating MBR entries for them. Note that
330
336
these hybrid MBR entries can easily go out of sync with the GPT entries,
331
337
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.
 
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.
333
341
 
334
342
.TP 
335
343
.B i
416
424
same GUID on two partitions because of buggy GUID assignments (hopefully
417
425
not in \fBgdisk\fR) or sheer incredible coincidence.
418
426
 
419
 
.TP
 
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 
420
433
.B e
421
434
Move backup GPT data structures to the end of the disk. Use this command if
422
435
you've added disks to a RAID array, thus creating a virtual disk with space
423
436
that follows the backup GPT data structures. This command moves the backup
424
437
GPT data structures to the end of the disk, where they belong.
425
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
 
426
445
.TP 
427
446
.B g
428
447
Change disk GUID. Each disk has a unique GUID code, which \fBgdisk\fR
429
448
assigns randomly upon creation of the GPT data structures. You can generate
430
449
a fresh random GUID or enter one manually with this option.
431
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
 
432
462
.TP 
433
463
.B i
434
464
Show detailed partition information. This option is identical to the 'i'
435
465
option on the main menu.
436
466
 
437
467
.TP 
 
468
.B l
 
469
Change the sector alignment value. Disks with more logical sectors per
 
470
physical sectors (such as some Western Digital models introduced in
 
471
December of 2009) and some RAID configurations can suffer performance
 
472
problems if partitions are not aligned properly for their internal data
 
473
structures. On new disks, GPT fdisk attempts to align partitions on
 
474
2048\-sector (1MiB) boundaries by default, which optimizes performance
 
475
for both of these disk types. On pre\-partitioned disks, GPT fdisk
 
476
attempts to identify the alignment value used on that disk. In either
 
477
case, it can be changed by using this option.
 
478
 
 
479
.TP 
438
480
.B m
439
481
Return to the main menu. This option enables you to enter main\-menu commands.
440
482
 
476
518
partitions, though.
477
519
 
478
520
.TP 
 
521
.B t
 
522
Swap two partitions' entries in the partition table. One partition may be
 
523
empty. For instance, if partitions 1\-4 are defined, transposing 1 and 5
 
524
results in a table with partitions numbered from 2\-5. Transposing
 
525
partitions in this way has no effect on their disk space allocation; it
 
526
only alters their order in the partition table.
 
527
 
 
528
.TP
 
529
.B u
 
530
Replicate the current device's partition table on another device. You will
 
531
be prompted to type the new device's filename. After the write operation
 
532
completes, you can continue editing the original device's partition table.
 
533
Note that the replicated partition table is an exact copy, including all
 
534
GUIDs; if the device should have its own unique GUIDs, you should use the
 
535
\fBf\fR option on the new disk.
 
536
 
 
537
.TP 
479
538
.B v
480
539
Verify disk. This option is identical to the 'v' option in the main menu.
481
540
 
501
560
usually bypasses the prompt entirely.
502
561
 
503
562
.SH "BUGS"
504
 
As of November 2009 (version 0.5.1), \fBgdisk\fR
 
563
As of January 2011 (version 0.6.14), \fBgdisk\fR
505
564
should be considered beta software. Known bugs and limitations include:
506
565
 
507
566
.TP 
508
567
.B *
509
 
The program compiles correctly only on Linux, FreeBSD, and Mac OS X. Linux
510
 
versions for x86\-64 (64\-bit), x86 (32\-bit), and PowerPC (32\-bit) have been
511
 
tested, with the x86\-64 version having seen the most testing. The Mac OS X
512
 
support was added with version 0.3.1 and has not been as thoroughly tested.
513
 
FreeBSD support was added with version 0.4.0 and has seen even less
514
 
testing.
 
568
The program compiles correctly only on Linux, FreeBSD, Mac OS X, and Windows.
 
569
Linux versions for x86\-64 (64\-bit), x86 (32\-bit), and PowerPC (32\-bit) have been
 
570
tested, with the x86\-64 version having seen the most testing. Under FreeBSD,
 
571
32\-bit (x86) and 64\-bit (x86\-64) versions have been tested. Only 32\-bit
 
572
versions for Mac OS X and Windows have been tested by the author, although
 
573
I've heard of 64-bit versions being successfully compiled.
515
574
 
516
575
.TP 
517
576
.B *
518
577
The FreeBSD version of the program can't write changes to the partition
519
578
table to a disk when existing partitions on that disk are mounted. (The
520
579
same problem exists with many other FreeBSD utilities, such as
521
 
\fBgpt\fR, \fBfdisk\fR, and \fBdd\fR.)
 
580
\fBgpt\fR, \fBfdisk\fR, and \fBdd\fR.) This limitation can be overcome
 
581
by typing \fBsysctl kern.geom.debugflags=16\fR at a shell prompt.
522
582
 
523
583
.TP 
524
584
.B *
579
639
Booting after converting an MBR or BSD disklabel disk is likely to be
580
640
disrupted. Sometimes re\-installing a boot loader will fix the problem, but
581
641
other times you may need to switch boot loaders. Except on EFI\-based
582
 
platforms, Windows through at least Windows 7 RC doesn't support booting
 
642
platforms, Windows through at least Windows 7 doesn't support booting
583
643
from GPT disks. Creating a hybrid MBR (using the 'h' option on the recovery &
584
644
transformation menu) or abandoning GPT in favor of MBR may be your only
585
645
options in this case.
586
646
 
587
647
.PP 
588
648
 
589
 
The support for big\-endian CPUs (PowerPC, for example) is new, as of version
590
 
0.3.5. I advise using caution on that platform, particularly with the more
591
 
obscure features of the program.
 
649
The support for big\-endian CPUs (PowerPC, for example) is new, as of
 
650
version 0.3.5. I advise using caution on such CPUs, particularly with the
 
651
more obscure features of the program.
592
652
 
593
653
.SH "AUTHORS"
594
654
Primary author: Roderick W. Smith (rodsmith@rodsbooks.com)
599
659
 
600
660
* David Hubbard (david.c.hubbard@gmail.com)
601
661
 
 
662
* Justin Maggard (justin.maggard@netgear.com)
 
663
 
 
664
* Dwight Schauer (dschauer@ti.com)
 
665
 
 
666
 
602
667
.SH "SEE ALSO"
603
668
\fBcfdisk (8)\fR,
604
669
\fBfdisk (8)\fR,
605
670
\fBmkfs (8)\fR,
606
671
\fBparted (8)\fR,
607
672
\fBsfdisk (8)\fR
 
673
\fBsgdisk (8)\fR
608
674
 
609
675
\fIhttp://en.wikipedia.org/wiki/GUID_Partition_Table\fR
610
676