10.8.11 (?/?/2014):
2------------------
3
4- Small code changes to support compilation as EFI application with the
5  UEFI GPT fdisk library
6  (http://sourceforge.net/projects/uefigptfdisk/?source=directory)
7
8- Added new partition type codes for Ceph
9  (https://github.com/ceph/ceph/blob/9bcc42a3e6b08521694b5c0228b2c6ed7b3d312e/src/ceph-disk#L76-L81):
10  4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D/0xf800 (Ceph OSD),
11  4FBD7E29-9D25-41B8-AFD0-5EC00CEFF05D/0xf801 (Ceph dm-crypt OSD),
12  BFBFAFE7-A34F-448A-9A5B-6213EB736C22/0xf802 (Ceph journal),
13  45B0969E-9B03-4F30-B4C6-5EC00CEFF106/0xf803 (Ceph dm-crypt journal),
14  89C57F98-2FE5-4DC0-89C1-F3AD0CEFF2BE/0xf804 (Ceph disk in creation), and
15  89C57F98-2FE5-4DC0-89C1-5EC00CEFF2BE/0xf805 (Ceph dm-crypt disk in
16  creation)
17
18- Added new partition type codes from
19  http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/:
20  44479540-F297-41B2-9AF7-D131D5F0458A/0x8303 (Linux / on x86),
21  4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709/0x8304 (Linux / on x86-64),
22  B921B045-1DF0-41C3-AF44-4C6F280D3FAE/0x8305 (Linux / on 64-bit ARM),
23  3B8F8425-20E0-4F3B-907F-1A25A76F98E8/0x8306 (Linux /srv).
24
250.8.10 (3/2/2014):
26------------------
27
28- Added feature to sgdisk's -A/--attributes, -c/--change-name,
29  -t/--typecode, and -u/--partition-guid commands: If a -n/--new option
30  with "0" as the partition number precedes these options on the command
31  line, passin "0" as the partition number to the following options causes
32  them to use the newly-created partition. For instance, "sgdisk -n
33  0:0:+550M -t 0:EF00 /dev/sda" creates a new partition with a type code of
34  EF00. (Previous versions would ignore the "-t 0:EF00" option.)
35
36- Fixed bug that caused incorrect partition number to be displayed by
37  sgdisk in error messages when the user specified a non-existent partition
38  for inclusion in a hybrid MBR or conversion to a conventional MBR.
39
40- Fixed new (in 0.8.9) bug that caused a failure to create more than one
41  hybridized partition when creating a hybrid MBR.
42
43- Fixed bug that caused gdisk and sgdisk to create hybridized partitions
44  that ended at or above the 2^32 sector point with incorrect end values.
45  The behavior now varies between gdisk and sgdisk: gdisk now creates
46  hybrid partitions that begin below 2^32 sectors and that are smaller than
47  2^32 sectors, since this is technically legal; but gdisk displays a
48  warning, because some OSes (such as DOS, Windows XP, OS/2, and BeOS)
49  misbehave with such partitions. AFAIK, only Linux, FreeBSD, and Windows 7
50  work properly with such partitions. Because of this fact and because
51  sgdisk is a more automated tool, it's stricter in how it handles things:
52  It refuses to create a hybrid partition if the original ends at or above
53  the 2^32 sector mark.
54
550.8.9 (2/17/2014):
56------------------
57
58- Removed dependency on libicu for UTF-16 support.
59
60- Fixed spurious "0xEE partition doesn't start on sector 1" warning in
61  FixParts (and perhaps in other programs under some circumstances).
62
63- Added GPT regeneration command to GPT-destruction options ('z' in gdisk,
64  -z and -Z options to sgdisk). This is done to avoid wiping out data
65  mid-disk that might not be backup GPT data structures, which could
66  otherwise occur if a RAID array was resized in certain ways.
67
68- Added check for an oversized 0xEE protective partition. The program now
69  auto-repairs this condition on loading if the GPT data seem otherwise
70  valid. This is done because I've been receiving reports of some disks
71  (possibly from some OEM Windows 8 loads) that violate the GPT spec in
72  this way, and gdisk was reporting write errors when saving data.
73
74- If the GPT data seem to be damaged in some way or if the disk seems to
75  be a hybrid MBR and if the MBR partition(s) don't fit on the disk, the
76  verify (v) function now warns of this condition, and writing the disk if
77  it exists also displays a more specific error message about the problem.
78
79- Added new type codes (3000, 7412F7D5-A156-4B13-81DC-867174929325 and
80  3001, D4E6E2CD-4469-46F3-B5CB-1BFF57AFC149) for Open Network Install
81  Environment (ONIE) boot and config partitions, respectively.
82
83- Added new type ccde (ED01, BFBFAFE7-A34F-448A-9A5B-6213EB736C22), for
84  Lenovo's ESP-like partition.
85
860.8.8 (10/14/2013):
87-------------------
88
89- Fixed bug that could cause segfault when passing an invalid partition
90  number to sgdisk's -i/--info command.
91
92- Added new type code: 933AC7E1-2EB4-4F13-B844-0E14E2AEF915, or gdisk code
93  8302, for Linux /home partitions. This type code is used by recent
94  versions of systemd to permit /home to be auto-mounted; see
95  http://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html
96  for details.
97
98- Added new type code: 9E1A2D38-C612-4316-AA26-8B49521E5A8B, or gdisk code
99  4100, for PowerPC PReP (PowerPC reference platform) boot.
100
101- The number of partition type codes has grown large enough that it fills
102  an 80x24 display. I've therefore added a pause (with a prompt to hit
103  <Enter>) to display more items after showing 21 lines in gdisk or after
104  the screen has nearly filled with entries in cgdisk. There's no such
105  pause/prompt in sgdisk, though.
106
107- Fine-tuned verification ('v') check for 0xEE partition that doesn't begin
108  on sector 1: Previously, a disk with multiple 0xEE partitions would
109  always trigger this warning. Now, the warning occurs only if NONE of the
110  0xEE partitions begins on sector 1.
111
112- Fixed hybrid MBR creation on disks larger than 2TiB: Previously, if one
113  opted to create an extra partition to cover unused space following
114  hybridized partitions, gdisk would hang.
115
116- Added check for an active/bootable 0xEE protective partition to the
117  verify ('v') function. If found, this is not counted as an error, but
118  it is called out to the user, since it can cause some EFIs (such as
119  VirtualBox's EFI) to ignore the disk.
120
1210.8.7 (7/8/2013):
122-----------------
123
124- Modified Mac version so that it can work on /dev/rdisk* devices as well
125  as /dev/disk* devices. The result is that, when using the /dev/rdisk*
126  devices, the partition table can sometimes be re-read without removing
127  the disk or rebooting.
128
129- Added "-a" option to cgdisk to use a ">" symbol to the left of the
130  selected partition rather than ncurses highlighting.
131
132- Modified "converting MBR to GPT" message to clarify that the conversion
133  is being held in memory, since some people have mistakenly assumed that a
134  "gdisk -l" operation will change an MBR disk to a GPT disk without
135  prompting.
136
137- Added partition type code for freedesktop.org's proposed $BOOT partition
138  (bc13c2ff-59e6-4262-a352-b275fd6f7172; GPT fdisk type code EA00)
139
140- Adjusted alignment code when using -n or -N in sgdisk to keep the
141  requested partition size (if specified using +###{MGT} terminology)
142  as the requested value rather than relative to the requested start
143  point. This gives you the requested partition size rather than be
144  slightly smaller if sgdisk needs to adjust the start point up a bit and
145  it prevents gaps from appearing between partitions if several are created
146  in succession using automatic placement of the start point.
147
148- Fixed small bugs in gdisk_test.sh script.
149
150- Removed stray debug message that would appear when reading MBR disks.
151
152- Added partition type code for Intel Rapid Start partition (GUID
153  D3BFE2DE-3DAF-11DF-BA40-E3A556D89593, code 8400), used by systems that
154  implement Intel's Rapid Start technology. See
155  http://blog.adios.tw/2012/10/funtoo-linux-and-intel-rapid-start.html or
156  http://mjg59.dreamwidth.org/26022.html.
157
158- Added partition type code for Haiku BFS (GUID
159  42465331-3BA3-10F1-802A-4861696B7521; code EB00).
160
1610.8.6 (1/9/2013):
162-----------------
163
164- Fixed a bug that could cause sgdisk to crash when passing a partition
165  number of 0 to the -t option.
166
167- Added support for building under Solaris.
168
169- Added a new check to the verification code.
170
171- Added partition type code for Sony system partition
172  (F4019732-066E-4E12-8273-346C5641494F). I'm not entirely clear what this
173  is used for, but it's appearing on some new Sony computers.
174
175- Tweaked hybrid MBR creation options to fix a problem that caused the main
176  0xEE MBR partition to NOT be created if the user told gdisk to NOT place
177  it at the start of the disk AND IF fewer than three partitions are
178  hybridize AND IF the user opted to create a second protective partition.
179
180- Changed default build options for Mac OS X to *NOT* use libicu,
181  since it seems to have broken somewhere along the line. It still
182  works on Linux, though.
183
184- Added partition type codes for VMWare ESX (FB00, FB01, and FC00).
185
1860.8.5 (5/30/2012):
187------------------
188
189- Changed code that writes the partition table so that a disk sync
190  operation occurs even if one or more write operations failed (but not if
191  they all failed). This is intended to work around a bug that a user
192  reported on a Windows system on which the write of the protective MBR
193  failed, although everything else worked. (I suspect anti-virus software
194  may have been blocking write access to the MBR.)
195
196- Added type codes for Midnight BSD (0xA580 - 0xA585). I used these codes
197  because Midnight BSD uses the same 0xA5 type code as FreeBSD on MBR
198  disks, so I'm starting Midnight BSD's numbering halfway through the
199  0xA5## range.
200
2010.8.4 (3/25/2012):
202------------------
203
204- REALLY fixed Ctrl+D problems! Now gdisk terminates upon receiving a
205  Ctrl+D. In all previous versions, it could lock itself into a CPU-hogging
206  loop if launched via "sudo" from a terminal window that was then closed
207  or if Ctrl+D was pressed at certain input prompts (for a partition name
208  or sector number, for instance).
209
2100.8.3 (3/23/2012):
211------------------
212
213- Fixed compilation problem on GCC 4.7.
214
215- Improved handling of Ctrl+D on some systems.
216
217- Added disk's name to message stating that a disk write was successful.
218
219- Fixed bug that caused creation of >2TiB partitions on 32-bit systems to
220  be truncated in sgdisk.
221
2220.8.2 (1/22/2012):
223------------------
224
225- Adjusted the code to support a number of partitions that's not a multiple
226  of the number of partition table entries that fits in a sector (normally
227  4 per sector). The program still rounds up, when necessary, when resizing
228  the partition table manually, but not when loading a partition table that
229  contains a peculiar number of partitions. This helps prevent spurious
230  error messages about CRC problems when loading some Solaris partition
231  tables.
232
233- Fixed bugs relating to the handling of empty partitions; Solaris's ZFS
234  tools create weird empty partitions that are legal but that gdisk wasn't
235  handling properly. (Specifically, they sometimes have non-zero end
236  points; gdisk assumed empty partitions had end points of 0.)
237
238- Fixed a bug that caused an infinite loop of input prompts if the user
239  pressed Ctrl+D.
240
241- Changed gdisk's first-sector input operation to specify a sector number
242  that's properly aligned as the default value. This eliminates the need
243  to alter that value and notify the user of the change when the user
244  hits "Enter" for the default value as the first partition on an empty
245  disk (as well as in some other situations).
246
2470.8.1 (10/1/2011):
248------------------
249
250- Fixed bug that could cause FixParts to keep a partition's assignment
251  as logical when FixPart could not actually do so. This could happen
252  when there are no gaps between two logical partitions. Some partitioning
253  tools can create such configurations, but FixParts can't. Such
254  configurations are extremely rare. I've only encountered them when
255  logical partitions are out of order.
256
257- Added code to detect infinite loops of logical partitions when reading
258  MBR data. When detected, the program now stops reading after the first
259  loop, so no duplicates appear in the partition list.
260
261- Fixed bug in partition overlap detection in MBR code.
262
263- Changed GPT reading code to use the size encoded in GPT headers to
264  determine how much of the header to use in computing a CRC, with the
265  restriction that the size be equal to or less than the disk's sector
266  size. This should work around problems with libefi in ZFS, which sets the
267  header size to 512 rather than the more common 92. A caveat: If the
268  disk's sector size is larger than the GPTHeader data structure size (512
269  bytes), then the rest of the sector's contents are ignored and replaced
270  with 0 values. This could produce false positives on CRC checks on disks
271  with over-512-byte sector sizes if the header sector is padded with
272  something other than 0 values.
273
274- Fixed bug in new (as of 0.8.0) check that main and backup partition
275  tables are identical on big-endian (PowerPC, etc.) hardware.
276
2770.8.0 (9/10/2011):
278------------------
279
280- Added new return option for sgdisk: 8, which means that a replication
281  operation (-R or --replicate) failed. Note that other operations on
282  the same command line might still have succeeded.
283
284- Added gdisk_test.sh shell script, contributed by Guillaume Delacour.
285  This script tests some common gdisk and sgdisk operations to be sure
286  they're working correctly.
287
288- Enable sgdisk's -l (--load-backup) and -o (--clear) options to work
289  even on disks that are damaged. Most other options will still be ignored,
290  though, so if you suspect a disk may be bad and want to use one of these
291  options, you should do so on a line by itself, followed by a separate
292  command to perform other actions (such as adding new partitions).
293
294- Added check for mis-matched primary and backup partition tables.
295  A mismatch is reported as a CRC error.
296
297- Added Apple Core Storage partition type code (hex code AF05, GUID
298  53746F72-6167-11AA-AA11-00306543ECAC).
299
300- Added cgdisk program to the family. This program is a rough workalike
301  to cfdisk, much as gdisk is a rough workalike to fdisk. See the cgdisk
302  man page or http://www.rodsbooks.com/gdisk/cgdisk-walkthrough.html for
303  details about its operation.
304
305- Fixed bug that caused CHS end point for protective MBR to be set to
306  0xfeffff rather than the spec-mandated 0xffffff on disks over ~8GB. This
307  is a very minor bug, since not much cares about this, and most other GPT
308  tools get it wrong in the same way, too.
309
3100.7.2 (6/26/2011):
311------------------
312
313- The Windows version now (finally!) generates proper GUIDs rather than a
314  purely random number. This fixes a bug that caused Windows 7 to crash
315  when converting a disk from MBR format (but, oddly, not when creating a
316  fresh partition table or doing various other things).
317
318- Added a warning when an MBR partition is discarded because it's too
319  big for the disk.
320
321- Changed warning to Windows users about the dangers of converting to GPT
322  so that it appears only on disks that aren't already in GPT form.
323
324- Fixed bug that caused bogus "3" values to pad the ends of partition names
325  on some disks (particularly those created by Microsoft's disk
326  partitioning tools).
327
328- Made compilation without Unicode support possible (see README file)
329
330- Made default filesystem type code OS-dependent (based on the compilation
331  platform).
332
333- Added new Linux-only filesystem partition type GUID code,
334  0FC63DAF-8483-4772-8E79-3D69D8477DE4 (8300 entry code). Also changed name
335  of the EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (0700 entry code) to
336  "Microsoft basic data").
337
338- Fixed a bug that caused an incorrect code to be set for active/bootable
339  partitions when generating a hybrid MBR.
340
341- Enable entry of hex codes that begin with "0x" for both GPT and MBR
342  partitions.
343
344- Fixed bug that caused the boot loader code to be lost when creating a
345  hybrid MBR.
346
347- Fixed bug in sector input code that could produce improper values
348  if the user inputs ridiculously large "+" values.
349
3500.7.1 (3/21/2011):
351------------------
352
353- Added support for proper UTF-16LE partition names rather than the
354  "shortcut" that properly encoded only ASCII names. This support works
355  only in Linux, FreeBSD, and OS X, though, at least for the moment.
356  Although it's possible to compile this support into Windows when using
357  Visual C++, it doesn't seem to work properly. Since using this feature
358  would require distributing the ICU libraries with the Windows binary,
359  thus bloating the binary package's size to no effect, I've disabled it in
360  my standard Windows build, at least for now.
361
362- Added check to fixparts to keep it from operating on devices that
363  lack an existing MBR signature. (In 0.7.0, it could write an empty
364  MBR data structure to a device on which it was mistakenly launched.)
365
366- Fixed bug that caused the protective MBR to not be written when
367  restoring a backup of the GPT data.
368
369- Fixed bug that caused second protective MBR partition, when created
370  as part of a hybrid MBR, to always be of type 0xEE, even when the
371  user specified something else.
372
373- Integrated a number of code cleanups contributed by Florian Zumbiehl.
374
3750.7.0 (3/11/2011):
376------------------
377
378- Fixed bug that caused some types of logical partitions to be misread.
379
380- Created FixParts program, to fix problems on MBR-partitioned disks.
381  Although this program is part of the GPT fdisk family, it is NOT used on
382  GPT disks.
383
384- Completely redid the GPT-to-MBR code, used both for converting to MBR
385  form and for creating hybrid MBRs.
386
387- Fixed a bug that caused gdisk to "forget" some partitions if there were
388  numbering gaps when a conversion to MBR was aborted.
389
390- Improved CHS value creation on small (<~8GB) disks for protective MBR
391  and when creating hybrid MBRs or converting to MBR format. Linux-only,
392  for the moment; other platforms still produce bad CHS values on sub-~8GB
393  disks (but few OSes care these days).
394
395- Enhanced disk replication features ('u' on the experts' menu in gdisk; -R
396  or --replicate in sgdisk). It's now possible to replicate the partition
397  table from a larger to a smaller disk, so long as all the partitions fit
398  on the smaller disk. In sgdisk, the secondary GPT data are moved
399  automatically if disk sizes don't match. In gdisk, the secondary GPT data
400  are moved automatically if the target disk is smaller than the source
401  disk; if the target disk is larger than the source disk, the user is
402  given the option of making this adjustment.
403
404- Fixed --load-backup (-l) option to sgdisk, which was broken.
405
406- Changed largest drive that's not given a minimum 4 KiB alignment even
407  when smaller alignment is detected on the disk to 300 GB.
408
409- Fixed bug that prevented aborting a partition table backup ('u' on the
410  experts' menu) by hitting the Enter key for the device filename.
411
412- Implemented a number of code cleanups provided by Florian Zumbiehl.
413
4140.6.14 (1/8/2011):
415------------------
416
417- Made small change to the way the start sector is interpreted if you use a
418  "+" specification, as in "+2G" to locate a partition 2 GiB into the
419  default range. This change makes adjustments for sector alignment less
420  likely.
421
422- Modified sgdisk's -n (--new) option to work with relative start and end
423  values (which the man page incorrectly stated it already did). Values of
424  0 for the start and end sectors refer to the first and last available
425  sectors in the largest free block, and a partition number of 0 refers to
426  the first available partition.
427
428- Added ChromeOS GUID values to list of recognized partition type GUIDs.
429  7F00 = ChromeOS kernel, 7501 = ChromeOS root, 7502 = ChromeOS reserved.
430  Untested on actual ChromeOS system.
431
432- Tweaked APM detection to look for APM signature even if an MBR
433  signature has already been found. Helps in diagnosis of cases
434  in which an MBR has overwritten an APM disk.
435
4360.6.13 (10/12/2010):
437--------------------
438
439- Added notification about nonexistent partitions to hybrid MBR creation
440  in gdisk.
441
442- Fixed bug in GPT-to-MBR conversion that could sometimes enable creation
443  of an extended partition that overlaps a preceding partition.
444
445- Fixed bug in GPT-to-MBR conversion that prevented creation of an MBR
446  table with logical partitions if there were four or fewer partitions.
447
4480.6.12 (10/7/2010):
449-------------------
450
451- Adjusted alignment code to use 1 MiB alignment by default for drives with
452  other than 512-byte sector sizes. (Previous versions increased this --
453  for instance, to 4 MiB for drives with 2048-byte logical sector size.)
454
455- Entry of non-hexadecimal value for partition type code now causes
456  re-prompting for a new value, fixing a recently-introduced minor bug.
457
458- Fixed bug in sector entry using K/M/G/T/P suffixes on disks with
459  other-than-512-byte sector numbers.
460
461- Added "P" (PiB, pebibyte) suffix to suffixes accepted in entering
462  partition sizes.
463
464- Fixed bug that caused sgdisk to segfault if fed the (invalid)
465  "-A show" parameter. Now it terminates with a complaint about an invalid
466  partition number 0.
467
468- Removed warning when running on big-endian hardware, since this
469  support has been present for quite a while with no bug reports.
470
4710.6.11 (9/25/2010):
472-------------------
473
474- Added -F (--first-aligned-in-largest) option to sgdisk. This option is a
475  variant on -f (--first-in-largest); it returns the number of the first
476  sector that will be used in the largest free area, given the current
477  alignment value (set via -a/--set-alignment).
478
479- Streamlined GUID code entry in gdisk; it no longer offers the option
480  to enter GUIDs in separate segments.
481
482- The -t option to sgdisk now accepts GUID values as well as the
483  sgdisk/gdisk-specific two-byte hex codes.
484
485- Added check that the protective 0xEE MBR partition begins on sector 1
486  to the verify function. If it doesn't, a warning message is displayed,
487  but it doesn't count as an error.
488
489- Added check for overlapping MBR partitions to verify function (gdisk "v"
490  function on all menus; sgdisk -v/--verify function). Also warns about
491  multiple MBR 0xEE partitions (causes problems in some OSes).
492
493- Added check to GPT-to-MBR and hybrid MBR creation options to prevent
494  creation of disks with duplicate partitions. When told to create a disk
495  with duplicates, sgdisk now aborts with the error message "Problem
496  creating MBR!" When attempting to create a hybrid MBR with duplicates,
497  gdisk silently drops duplicate partitions, leaving fewer than requested.
498  Creating duplicates should not be possible in sgdisk when converting to
499  MBR form.
500
5010.6.10 (8/22/2010):
502-------------------
503
504- Enable disk-wipe (-z and -Z) and verification (-v) operations in
505  sgdisk even if the disk is badly damaged.
506
507- Added support for setting attributes in sgdisk (-A/--attributes option)
508  in sgdisk.
509
510- Fixed bug that created backwards attribute field values (bit #2 was
511  entered as bit #61, etc.).
512
513- Fixed bug that caused creation of hybrid MBR to wipe out the MBR's boot
514  code.
515
516- Added ability to save partition table from one device to another (gdisk:
517  'u' on experts' menu; sgdisk: -R or --replicate option).
518
519- Fixed inaccessible -C/--recompute-chs option in sgdisk.
520
5210.6.9 (7/4/2010):
522------------------
523
524- Fixed minor error in sgdisk man page (--largest-new option requires
525  a partition number).
526
527- Fixed major bug in hybrid MBR creation, which caused incorrect
528  protective partition end point settings and occasionally other
529  problems.
530
5310.6.8 (5/23/2010):
532------------------
533
534- Added tests to see if the file to be opened is a directory, character
535  device, FIFO, or socket; program now terminates if any of these
536  conditions is met. (Linux/FreeBSD/OS X only.) Thanks to  Justin Maggard
537  for this patch.
538
539- Added 'f' option on gdisk's experts' menu (-G/--randomize-guids in
540  sgdisk). This option randomizes the disk's GUID and all partitions'
541  GUIDs. Intended for use after cloning a disk with a utility that copies
542  the GUIDs intact (such as a raw dd copy) if you want each disk copy to
543  have its own set of GUIDs.
544
545- Added -u/--partition-guid and -U/--disk-guid options to sgdisk. These are
546  the equivalents of the 'g' and 'c' options, respectively, on the gdisk
547  experts' menu: They enable adjusting an individual partition's GUID or a
548  disk's GUID. The GUID may be either a fully specified GUID value or 'R'
549  or 'r' to set a random GUID value.
550
551- Fixed compile problem for FreeBSD (its math library lacks a log2()
552  function). Also created separate Makefile.freebsd with a couple of
553  FreeBSD-specific options.
554
555- Added -N (--largest-new) command to sgdisk. This command creates a single
556  partition that fills the largest single unpartitioned block of space on
557  the disk.
558
559- Fixed sgdisk man page error: the --change-name option was incorrectly
560  listed as --change.
561
562- Added 'h' option to gdisk experts' menu (-C or --recompute-chs in sgdisk)
563  to recompute all protective/hybrid MBR CHS values. This option is
564  intended to work around a bug in at least one BIOS that prevents the
565  computer from booting when the GPT-mandated (but technically illegal)
566  0xFFFFFF CHS value is used as the end point for a protective MBR. The
567  recomputed values will be legal (e.g., 0xFEFFFF instead of 0xFFFFFF),
568  but incorrect in GPT terms, and will therefore enable at least one
569  BIOS to boot with a GPT disk. See http://www.rodsbooks.com/gdisk/bios.html
570  for all I know about BIOS/GPT incompatibilities.
571
5720.6.7 (5/1/2010):
573-----------------
574
575- Undid earlier change, with version 0.6.4, that wiped the MBR boot loader
576  when doing MBR-to-GPT conversions. I've now become skeptical that MBR
577  boot loaders were causing any real problems on GPT disks, so I'm going
578  back to the philosophy of leaving as much alone as possible.
579
580- Fixed bug that caused incorrect reporting of free space on 0-size disks
581  (e.g., files of 0 length passed as disk images).
582
583- Fixed bug that caused segfault on some invalid disks
584
585- Fixed bug that caused incorrect partition numbers to be displayed for
586  some verify problems.
587
588
5890.6.6 (3/21/2010):
590-----------------
591
592- Added support for the "no block IO protocol" (referred to as "hide from
593  EFI" in GPT fdisk) and "legacy BIOS bootable" attribute bits. See Table
594  19 of the UEFI 2.3 specification (p. 153) for details.
595
596- Changed the sequence in which GPT data structures are written to disk;
597  backups are now written first, followed by the main structures. This is
598  as recommended in the UEFI 2.3 specification, since it's safer in the
599  extremely unlikely event that a RAID array's size is increased and
600  there's a power outage mid-write. (If the main structures are written
601  first in this case, they'll point to data that's not yet been written;
602  but by writing the backups first, the old main structures will still
603  point to the valid old backup structures.)
604
605- Protective MBRs now have disk signatures of 0x00000000, to better
606  conform with GPT as described in the UEFI 2.3 specification.
607
608- Added alignment information to the summary data produced by the
609  'p' main-menu option in gdisk or the -p option to sgdisk.
610
611- More alignment changes: GPT fdisk now attempts to determine the alignment
612  value based on alignment of current partitions, if any are defined. If no
613  partitions are defined, a default value of 2048 is set. If the computed
614  value is less than 8 on drives over about 596GiB, it's reset to 8, since
615  the drive might be a WD Advanced Format unit that requires an 8-sector
616  (or larger power-of-2) alignment value for best performance. The
617  2048-sector default provides better alignment in some RAID
618  configurations.
619
620- Changed behavior when a backup restore fails. Previously, GPT fdisk
621  would create a fresh blank set of partitions. Now it does so only
622  if the failure occurs when interpreting the backup's contents; if the
623  user typed the wrong filename, the in-memory data structures aren't
624  touched.
625
626
6270.6.5 (3/7/2010):
628-----------------
629
630- Added tests to verify ('v') function and to pre-save checks to look for
631  partitions that end before they begin or that are too big for their
632  disks.
633
634- Fixed a bug that could cause spurious data to appear in a grown partition
635  table.
636
637- Added ability to convert some or all partitions to logical partitions in
638  GPT-to-MBR conversion. This feature is limited by the fact that at least
639  one free sector must exist immediately prior to each logical partition,
640  so it won't do much good if partitions are crammed together. It should be
641  possible to convert back to MBR any disk that started that way, provided
642  no partitions were added or resized when the disk was in GPT form; and
643  disks that were partitioned with Apple's Disk Utility or other tools that
644  insert unpartitioned space should also be convertible. CAUTION: THE
645  LOGICAL PARTITION CREATION FEATURE DOESN'T TRY TO ALIGN PARTITIONS OR
646  PARTITION HEADER DATA TO CYLINDER BOUNDARIES! It's conceivable that some
647  older OSes or utilities will object to these disks, although Linux, OS X,
648  Windows Vista, and Windows 7 all seem happy with them.
649
650- Fixed bug that caused creation of 0-length file if an incorrect device
651  filename was typed.
652
653- The gdisk program now prompts for a device filename if it's called with
654  no options. This enables gdisk to do something useful if it's launched by
655  double-clicking its icon in a GUI environment.
656
657- Added workaround for bug in some versions of MinGW that caused the
658  program to garble input sector numbers.
659
660- The Windows version now works on disks with over-512-byte sectors.
661  Tested on a magneto-optical (MO) drive with 2048-byte sectors.
662
663- Added -D (--display-alignment) option to sgdisk, to display sector
664  alignment value (by default, 1 for sub-800GiB disks and 8 for disks
665  over that size).
666
667- Fixed bug in computation of CHS geometries for protective MBR. This is
668  non-critical, since most modern utilities ignore the CHS geometries.
669  Concerned users can use the 'n' option on the experts' menu to build new
670  protective MBRs with the new algorithm, if desired. (Note that GNU
671  Parted, at least, gets this wrong, too.)
672
673- Fixed memory-allocation bug when reading GPT disks with partition tables
674  with over 128 entries; could cause program to crash on startup.
675
6760.6.4-2 (2/20/2010):
677--------------------
678
679Note: Neither of the following changes affects actual program code, so I've
680left the version number in the program at 0.6.4.
681
682- Altered Makefile to pass user's compiler and linker environment
683  variables through.
684
685- Added #include to gpttext.cc to enable it to compile on the latest
686  GCC versions (it was failing on at least some 4.4.x compilers).
687
6880.6.4 (2/19/2010):
689-------------------
690
691- Added -m (--gpttombr) option to sgdisk, enabling conversion of GPT
692  disks to MBR format, with a limit of four partitions total, and of course
693  without overcoming the 2TiB limit.
694
695- Added -h (--hybrid) option to sgdisk, enabling creation of hybrid
696  MBRs. Fewer options are available in sgdisk than in gdisk, though,
697  in order to keep the user interface manageable.
698
699- Fixed off-by-one bug in specification of partition when using the
700  -T (--transform-bsd) option in sgdisk.
701
702- Changed the code to create a new MBR unique disk signature whenever a new
703  protective MBR is generated (when doing an MBR-to-GPT conversion, when
704  using the 'n' option on the experts' menu, or when using the 'o' option
705  on the main menu, for example). Previous versions attempted to preserve
706  the existing MBR disk signature in most cases, but this resulted in
707  values of 0x00000000 whenever an empty disk was partitioned, and often in
708  other cases, too. Better to risk changing this value too often than to
709  leave multiple disks with 0x00000000 values, I think.
710
711- Added transpose ('t' on experts' menu in gdisk; or -r or --transpose in
712  sgdisk) command to enable fine-tuning partition order without doing a
713  full sort.
714
715- Added code to clear the MBR boot loader when doing an MBR-to-GPT
716  conversion. (This was already done in full-disk BSD-to-GPT conversions.)
717  This is done because I've seen a few problem reports that make me think
718  some MBR boot loaders freak out and hang the system when they encounter
719  GPT disks, and/or they attempt to load a second-stage boot loader stored
720  in what is now GPT territory, causing a system hang. Since MBR boot
721  loaders don't work on GPT disks anyhow (even GRUB needs to be
722  reinstalled), this new wiping behavior shouldn't cause any problems, and
723  may prevent a few.
724
725- Fixed bug in Windows version that prevented saving backup files.
726
727- Fixed bug that caused second and subsequent partition numbers in
728  prompts in hybrid MBR conversion procedure to be displayed in
729  hexadecimal.
730
731- Fixed very obscure potential bug in hybrid MBR/GPT synchronization when
732  deleting partitions; code wasn't matching partition lengths correctly,
733  which would only affect partitions that start at the same point but have
734  different lengths in MBR vs. GPT.
735
736- Fixed bug in the -E option to sgdisk; it was actually returning the
737  last free sector, not the last free sector in the largest free block.
738
739- Fixed bug in -t option to sgdisk; it was corrupting partition type
740  codes.
741
742- Fixed minor alignment bug in partition summary list ('p' from any menu)
743  when partition sizes are between 1000 and 1024 units.
744
745- Backup restore function ('l' on recovery & transformation menu) now
746  accepts both backups generated by GPT fdisk and backups created by a
747  direct copy (via dd, etc.) of the MBR, main GPT header, and main GPT
748  partition table, in that order. ("dd if=/dev/sda of=backup.gpt bs=512
749  count=34" will do this on Linux for a disk with a typical-sized GPT table
750  of 128 entries.)
751
7520.6.3 (2/3/2010):
753------------------
754
755- Fixed serious data corruption bug on big-endian (PowerPC and similar)
756  systems.
757
758- Changed several GPT fdisk Solaris type codes to correct a duplicate
759
760- Corrected error in GPT fdisk type codes for NetBSD LFS and NetBSD RAID;
761  they were identical, but I've now changed NetBSD RAID to A906, which
762  is unique.
763
764- Added GUID for IBM General Parallel File System (GPFS) partition type
765  code. Somewhat arbitrarily set it to use the 7501 number (MBR code 0x75
766  is used by IBM PC/IX, so it's at least the right company, by my loose
767  numbering rules....).
768
769- Improved GUID generation. Prior versions generated completely random
770  numbers for GUIDs. This works, but is technically a violation of the
771  spec. Unix versions now employ libuuid to generate GUIDs in a more
772  correct way. The Windows version still generates random numbers, though.
773
774- Turned PartTypes class into a derived class of GUIDData, and renamed
775  it to PartType.
776
777- Created new GUIDData class, to replace the original GUIDData struct.
778
7790.6.2 (1/29/2010):
780------------------
781
782- The change-type ('t' on main menu) option now changes the partition's
783  name *IF* the current name is the generic one for the partition type.
784  If the current name is not the generic name, it is NOT changed.
785
786- Fixed bug that caused new protective MBR to not be created when the
787  MBR was invalid and the GPT was damaged and the user opts to try to
788  use the GPT data.
789
790- Enabled default partition type code of 0700 when creating partitions
791  or changing their type codes. (Type 0700, Linux/Windows data, is set if
792  the user hits the Enter key alone.)
793
794- Fixed bug in sort ('s' on main menu) option that caused partition
795  numbers to begin at more than 1 if the original partition list had
796  too many empty partitions before the last one defined.
797
798- Improved code to determine which partition table to load in case of
799  CRC mismatches between the partition tables and the stored CRC values
800  in the headers.
801
802- Compiles using MinGW (http://www.mingw.org) to create a Windows binary.
803
804- Moved all disk I/O functions to the new DiskIO class. This helps with the
805  Windows port; it uses diskio-windows.cc for Windows-specific code,
806  diskio-unix.cc for the Linux, FreeBSD, and OS X code, and diskio.cc for
807  cross-platform disk I/O code.
808
809- Changed BSD disklabel detection code to be more correct (I think).
810  This change has no effect on my test disks, but I hope it'll work
811  better on disks with sector sizes other than 512 or 2048.
812
8130.6.1 (1/20/2010):
814------------------
815
816- Fixed bug that returned incorrect disk size on 32-bit versions of
817  FreeBSD.
818
819- Fixed bug that prevented FreeBSD version from working on disk image
820  files.
821
822- Fixed bug that caused BSD disklabel conversion to fail.
823
8240.6.0 (1/15/2010):
825------------------
826
827- Fixed bug that caused the convert to MBR function to fail.
828
829- Added support for disks with other than 512-byte sectors.
830
831- Created embryonic sgdisk program.
832
833- Fixed bug that caused relative sector numbers entered by users (e.g,
834  "+128M") to be misinterpreted as from the start of the range rather than
835  from the default value.
836
8370.5.3 (1/4/2010):
838-----------------
839
840- Fixed bug in display of GUIDs when compiled with some versions of GCC.
841
842- Eliminated warnings caused by additional checks in latest versions of
843  GCC. These warnings were harmless, but to eliminate them I've added
844  more error checking on disk I/O.
845
846- Eliminated unnecessary warnings about potential data loss if the program
847  was launched with the -l option or if writes aren't possible.
848
849- Added code to set the partition boundary value based on the physical
850  sector size. (FindAlignment() function.) This function, however, works
851  only on Linux, and then only if the BLKPBSZGET ioctl is defined. This
852  ioctl is new in kernel 2.6.32 or thereabouts.
853
8540.5.2 (12/31/2009):
855-------------------
856
857- Modified partition creation function to begin partitions on 8-sector
858  boundaries by default. This improves performance on the new Western
859  Digital Advanced Format drives. The new 'd' and 'l' options on the
860  experts' menu display and change, respectively, the boundary size.
861
862- Tweaked code to produce fewer warnings on the latest versions of
863  GCC.
864
8650.5.1:
866------
867
868- Made some minor edits to the man page.
869
870- Incorporated RPM .spec file changes contributed by Scott Collier
871  (boodle11@gmail.com).
872
873- Changed method of locating and loading backup GPT data, to use the
874  main header's pointer, if it's valid, rather than seeking to the
875  end of the disk.
876
877- Added 'e' option (relocate backup GPT data structures) to the experts'
878  menu.
879
880- Fixed bug that prevented recovery of partitions in case of partially
881  damaged GPT data (bad main and good backup or bad backup and good
882  main header, for instance).
883
8840.5.0:
885------
886
887- Added GPT-to-MBR conversion function. It's very limited, but potentially
888  useful in some cases.
889
890- Fixed bug that caused incorrect file sizes to be reported on 32-bit
891  Linux, thus causing problems when editing partition tables in disk images
892  or when loading GPT backup files.
893
894- Fixed bug that caused bogus CRC error reports when loading backup GPT
895  data.
896
897- Reorganized menus. There are now three: the main menu, the experts' menu,
898  and the recovery & transformation menu. The last of these has most of the
899  items that had been on the earlier versions' experts' menu.
900
901- Added ability to re-load the MBR and generate a fresh GPT from it. This
902  is normally identical to quitting and re-running the program, but it
903  could be handy if, say, the GPT partitions on a hybrid configuration are
904  badly messed up; this will enable using the hybridized partitions as the
905  starting point for a new GPT setup.
906
907- The program now generates CHS values for hybrid and GPT-to-MBR conversion
908  MBRs. For the moment, the assumption is the maximum number of heads and
909  sectors per track (255 and 63, respectively), although the bulk of the
910  code supports other values -- it'd just be awkward to enter the data in
911  the user interface.
912
913- Fixed minor display bug that caused number of sectors on the disk to be
914  shown as 0 on large disks when running 32-bit binaries.
915
916- Reverted 0.4.2's zap (destroy GPT) changes, since I don't want to wipe
917  out a valid MBR if the user created that MBR over an older GPT without
918  first properly wiping out the GPT, and the user now wants to wipe out
919  the GPT.
920
921- Reformatted and edited the man page. Aside from edits related to the
922  preceding program changes, I've altered the markup slightly and trimmed
923  much of the more tutorial information from the man page to better
924  conform to typical terse man page style.
925
9260.4.2:
927------
928
929- Code cleanup.
930
931- Fixed very small formatting bug in display of hex code when a match isn't
932  found when converting from an MBR/gdisk hex code to a GUID type code.
933
934- Added the ability to work on disk image files (raw files for virtual
935  machines, backup images, etc.). The program assumes that all such disk
936  image files have 512-byte sectors.
937
938- Added verification prompt to 'o' main-menu option to avoid accidental
939  erasures of all partitions.
940
941- The "destroy GPT data structures" option ('z' on the experts' menu) now
942  also destroys all EFI GPT (0xEE) partitions in the MBR.
943
944- Added an extra warning to the "destroy GPT data structures" option if an APM
945  or BSD disklabel was detected on the disk.
946
947- Added a buffer flush after destroying GPT data structures, to get the OS
948  to read the new (empty or MBR-only) partition table.
949
950- Fixed bug that allowed entry of nonexistent partition numbers when creating
951  a hybrid MBR.
952
9530.4.1:
954------
955
956- Code cleanup/re-organization
957
958- Partition creation function ('n' on main menu) now uses the start of the
959  largest available chunk of free space rather than the first available
960  sector as the default starting sector number. This should enable easier
961  partition creation if there are small bits of free space on the disk.
962
963- You can now specify the end point of a partition by using a minus sign,
964  in which case the end point is the default value minus the specified
965  size. For instance, "-200M" creates a partition that ends 200MiB before
966  the default end point.
967
968- You can now specify the start point of a partition by using a plus or
969  minus sign, in which case the start point is the specified distance from
970  the start (+) or end (-) of free space. This is exactly the same as the
971  new rules for entry of the end point, except that the default value is
972  set differently.
973
974- Deleting a partition now checks for a matching hybrid MBR partition, and
975  if one is found, it's deleted. Any empty space that then surrounds the
976  0xEE (EFI GPT) MBR partitions is then added to the nearby 0xEE partition.
977  If no non-0xEE partitions are left, a fresh protective MBR is generated.
978
979- Added hybrid MBR consistency check to the verify ('v') option and to
980  pre-write checks. If non-0xEE/non-0x00 MBR partitions without
981  corresponding GPT partitions are found, the user is warned. This finding
982  does NOT prevent writing the partition table, though.
983
984- Added non-destructive write test when opening the device file, in order
985  to detect the problem with FreeBSD being unable to write to disks with
986  mounted partitions (or other potential problems).
987
9880.4.0:
989------
990
991- Added support for BSD disklabels. The program can now convert disks that
992  use "raw" disklabels, with the caveat that the first partition will
993  almost certainly need to be deleted because it'll overlap the main GPT
994  header; and convert disklabels contained within a GPT (or a former MBR,
995  converted to GPT) partition. In the latter case, the 'b' main menu option
996  is used.
997
998- Added support for compiling on FreeBSD.
999
1000- Fixed bug that could cause crashes or incomplete sorts when sorting
1001  the partition table.
1002
1003- New partitions, including converted ones, now take on the name of the
1004  partition type as a default name.
1005
1006- Reorganized some code; created a separate C++ class for GPT partitions
1007  (GPTPart), which replaced a struct and enabled moving code from the
1008  bloated GPTData class into GPTPart.
1009
1010- Fixed a bug that produced spurious warnings about unknown sector sizes
1011  when loading a backup file.
1012
10130.3.5:
1014------
1015
1016Note: This version was not officially publicly released; I wanted to test
1017the big-endian support while developing 0.4.0.
1018
1019- Tweaked the disk type identification code to warn users to re-sync their
1020  hybrid MBRs when one is detected.
1021
1022- Tweaked MBR-reading code to ignore 0xEE (EFI GPT) partitions. This will
1023  only have an effect on a poorly partitioned MBR disk that contains an
1024  inappropriate EFI GPT partition, or when attempting to recover a
1025  corrupted disk by using the hybrid MBR for data recovery.
1026
1027- Added big-endian (PowerPC, etc.) support!
1028
1029- Added code to identify and warn of the presence of an Apple Partition
1030  Map (APM) on the disk.
1031
1032- Enabled MBR conversion code to handle multiple logical partitions.
1033
10340.3.4:
1035------
1036
1037- Fixed bug that enabled (possibly accidental) entry of MBR type codes of
1038  0x00 in GPTData::MakeHybrid(). The fix also enables entry of default
1039  type code by pressing the Enter key when prompted. Applied a similar
1040  fix to the entry of the type code for the second protective partition,
1041  if one is used.
1042
1043- Fixed a typo: "sectors" was spelled "sectprs" in one spot!
1044
1045- Fixed bug that caused default entry for end sector to be refused if an
1046  initial value using a plus sign (e.g., "+20G") was also refused.
1047
10480.3.3:
1049------
1050
1051- Gave users control over the way MBR partitions are assigned to slots in a
1052  hybrid MBR setup; the original method (putting the 0xEE partition after
1053  the real partitions) works well for non-boot disks, but both GRUB and
1054  GRUB2 become confused by this type of setup, so it needs changing.
1055
1056- Changed "blocks" to "sectors" in GPT and MBR table displays.
1057
1058- Added "Boot" column to MBR table display; shows an asterisk (*) when the
1059  partition's status is bootable.
1060
10610.3.2:
1062------
1063
1064- Changed __DARWIN_UNIX03 to __APPLE__ as code to enable MacOS X support.
1065
1066- Added the ability to create a hybrid MBR ('h' on experts' menu). This was
1067  motivated by my discovery that Windows 7 remains brain-dead when it comes
1068  to the ability to boot from a GPT disk, at least on BIOS-based machines.
1069
1070- Added 'z' option to experts' menu, to destroy GPT data structures and
1071  exit. The intent is to use this feature to enable subsequent partitioning
1072  of the disk using fdisk or other GPT-unaware tools. (GNU Parted will wipe
1073  the GPT data structures itself when you create a new MBR ["msdos
1074  disklabel," in Parted parlance], so using Parted is another option.)
1075
1076- Slightly altered the effect of the 'o' command on the main menu. It now
1077  blanks out the protective MBR, as well as the GPT data.
1078
10790.3.1:
1080------
1081
1082- Added Mac OS X support, provided as a patch by David Hubbard
1083  (david.c.hubbard@gmail.com).
1084
1085- Fixed bug in disksize() function on Mac OS. (Possibly dependent on the
1086  kernel and/or GCC version.) The disk size, of type uint64_t, was not
1087  being passed correctly, so I reorganized the function to return it as
1088  the function's return value rather than as a parameter. This seems to
1089  work OK on my Mac OS test system and on both 32- and 64-bit Linux
1090  systems.
1091
1092- Fixed off-by-one bug in GPTData::FindLastAvailable().
1093
1094- Fixed bug that caused display of options after a disk-write error.
1095
1096- Fixed several incorrect MacOS X partition type GUIDs, thanks to Yves
1097  Blusseau (1otnwmz02@sneakemail.com).
1098
10990.3.0:
1100------
1101
1102- Changed version number to 0.3.0, reflecting the fact that I've received
1103  no significant bug reports and so am elevating the program to "beta"
1104  status. This change also entailed altering the warning the program
1105  displays when saving partition table changes.
1106
1107- Fixed minor bug in CHS geometry of the protective MBR's type EE partition
1108  (was producing 0x000200 as the start value, but should be 0x000100).
1109  Should be a non-critical bug since the protective MBR partition
1110  definition is only there to keep MBR-only disk utilities from messing
1111  with the disk.
1112
1113- Added ability to enter GUIDs as single massive strings rather than in
1114  chunks.
1115
11160.2.2:
1117------
1118
1119- Added #include directives required to compile the program using GCC
1120  4.4.0.
1121
11220.2.1:
1123------
1124
1125- Fixed partition numbering problem in reports of partition overlaps in
1126  verification function.
1127
1128- Fixed 1-sector partition size problem when creating new partitions
1129  (partitions were 1 sector too big when using the +size option).
1130
1131- Changed BytesToSI() to display values in bytes without decimal points
1132  (e.g., "512 bytes" rather than "512.0 bytes").
1133
1134- Added GPTData class member functions to retrieve GPT data structure
1135  locations on disk; used in my internal-use-only GPT-wiping program.
1136
1137- Eliminated the "a reboot is recommended" notice after writing the
1138  partition table.
1139
1140- Added notice after sorting the partition table to the effect that
1141  editing /etc/fstab and/or the boot loader files may be required.
1142
1143- Fixed bug in MBR-reading function that caused 0x0f (Win95 LBA) and 0x85
1144  (Linux extended) extended partitions to not be read.
1145
1146- Fixed bug in GetLastSector() (in support.cc) that would have prevented
1147  correct user entry of over-32-bit sector numbers on 32-bit systems.
1148
1149- Made some changes/corrections to the partition type list in
1150  parttypes.cc. Most of these were based on newly-discovered MBR type
1151  codes for Apple (Mac OS X) filesystems.
1152
1153- General code cleanup (setting explicit casts, etc.)
1154
11550.2.0:
1156------
1157
1158- Initial semi-public release
1159