blob: a212e8f7005771170094bc6e909dfb4a772b064b [file] [log] [blame]
srs5694e7b4ff92009-08-18 13:16:10 -04001GPT fdisk (aka gdisk)
2by Roderick W. Smith, rodsmith@rodsbooks.com
3
4Introduction
5------------
6
7This software is intended as a (somewhat) fdisk-workalike program for
8GPT-partitioned disks. Although libparted and programs that use it (GNU
9Parted, gparted, etc.) provide the ability to handle GPT disks, they have
10certain limitations that gdisk overcomes. Specific advantages of gdisk
11include:
12
13* The ability to convert MBR-partitioned disks in-place to GPT format,
14 without losing data
15
16* The ability to specify sector-exact partition sizes
17
18* More flexible specification of filesystem type code GUIDs, which
19 GNU Parted tends to corrupt (particularly for FAT partitions)
20
21* Clear identification of the number of unallocated sectors on a
22 disk
23
24* A user interface that's familiar to long-time users of Linux
25 fdisk
26
27* The MBR boot loader code is left alone (GNU Parted tends to
28 wipe it out with every change)
29
30Of course, gdisk isn't without its limitations. Most notably, it lacks the
31filesystem awareness and filesystem-related features of GNU Parted. You
32can't resize a partition's filesystem or create a partition with a
33filesystem already in place with gdisk, for instance. There's no GUI
34version of gdisk.
35
36Installing
37----------
38
39To compile gdisk, you must have appropriate development tools installed,
40most notably the GNU Compiler Collection (GCC) and its g++ compiler for
srs56942a9f5da2009-08-26 00:48:01 -040041C++. Uncompress the package and type "make" at the command prompt in the
srs5694e7b4ff92009-08-18 13:16:10 -040042resulting directory. The result should be a program file called gdisk. You
43can use this in place or copy the file to a suitable directory, such as
44/usr/local/sbin. You can copy the man page (gdisk.8) to /usr/local/man/man8
45to make it available.
46
47Caveats
48-------
49
50THIS SOFTWARE IS EARLY BETA SOFTWARE! IF IT WIPES OUT YOUR HARD DISK OR
51EATS YOUR CAT, DON'T BLAME ME! To date, I've tested the software mainly on
52two USB flash drives, 2 GiB and 8 GiB in size. I've also made a few minor
53tweaks to a production system with a 500 GiB hard disk and made more
54extensive changes to a handful of 80-160 GiB hard disks. I believe all
55data-corruption bugs to be squashed, but I know full well that the odds of
56my missing something are high. This is particularly true for large drives;
57I have no way of testing the software with > 2TiB drives, which will test
srs56942a9f5da2009-08-26 00:48:01 -040058the 64-bit sector pointer support. I've received user reports of success
59with >2TiB drives, though.
srs5694e7b4ff92009-08-18 13:16:10 -040060
61My main development platform is a system running the 64-bit version of
srs56942a9f5da2009-08-26 00:48:01 -040062Ubuntu 8.04. I've also tested on 64-bit OpenSuSE, 32-bit Fedora 10, 32-bit
63Ubuntu 6.10, 64-bit Gentoo, 32-bit PowerPC Linux, and 32-bit Intel-based
64Mac OS X. Problems relating to 64-bit integers on the 32-bit Linux have
65been common during development and may crop up in the future. The Mac OS
66X and big-endian (PowerPC) support is new.
srs5694e7b4ff92009-08-18 13:16:10 -040067
68Redistribution
69--------------
70
71This program is licensed under terms of the GNU GPL (see the file COPYING).
72
73Acknowledgements
74----------------
75
76This code is mostly my own; however, I've used three functions from two
77other GPLed programs:
78
79- The code used to generate CRCs is taken from the efone program by
80 Krzysztof Dabrowski and ElysiuM deeZine. (See the crc32.h and
81 crc32.cc source code files.)
82
83- A function to find the disk size is taken from Linux fdisk by
84 A. V. Le Blanc.
85
86Additional code contributors include:
87
88- Yves Blusseau (1otnwmz02@sneakemail.com)
89
srs56947f244ba2009-08-18 14:22:12 -040090- David Hubbard (david.c.hubbard@gmail.com)