-
Notifications
You must be signed in to change notification settings - Fork 2
/
NEWS
1367 lines (1014 loc) · 56.9 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1.0.4 (7/5/2018):
-----------------
- Added some explicit copy constructors and made some other tweaks to avoid
compiler warnings.
- The macOS binary for sgdisk is now a pure 64-bit build; I'm no longer
supporting 32-bit builds of sgdisk. The gdisk and cgdisk binaries remain
"fat" 32-/64-bit builds. The reason for dropping the 32-bit support from
sgdisk is that I've re-built my macOS development system, and I had
trouble building a "fat" binary with the fresh install of the popt
libraries upon which sgdisk relies. 32-bit support for the other binaries
is now officially deprecated, too.
- Added search feature to partition type list functions ("L" on main menu of
gdisk and "L" when entered in response to the "Hex code or GUID" prompt in
gdisk and sgdisk). This feature filters the partition type list to those
which include the search term in their GPT fdisk descriptions. For
instance, typing "Linux" shows only partitions with "Linux" in their
descriptions. Note that the search/filter is case-sensitive. If <Enter> is
pressed, no filter is applied.
- Change to Makefile.mac to use standard libncurses rather than a 3rd-party
version; should help with cgdisk compatibility.
- Minor bug fix in alignment of internal data structures.
- Minor bug fix in handling of damaged disks. Also, GPT fdisk now reports
more information on what data structures are damaged when a damaged disk
is detected.
- Added type code for Apple APFS (7C3457EF-0000-11AA-AA11-00306543ECAC,
0xaf0a).
- Added type code for Atari TOS basic data (0xa200,
734E5AFE-F61A-11E6-BC64-92361F002671).
- Added type codes for Linux dm-crypt (0x8308,
7FFEC5C9-2D00-49B7-8941-3EA10A5586B7) and LUKS (0x8309,
CA7D7CCB-63ED-4C53-861C-1742536059CC) partitions.
- Added 18 Ceph partition type codes.
- Added 52 (yes, 52!) Android partition type codes.
- Changed "Creating new GPT entries" message to read "Creating new
GPT entries in memory" because the latter is clearer, particularly when
using sgdisk with a non-destructive option, like "-p".
1.0.3 (7/27/2017):
------------------
- Fixed a major bug that caused invalid partition tables to be generated
when creating a new partition table (that is, partitioning a blank disk or
converting from MBR).
1.0.2 (7/26/2017):
------------------
- On Linux, the p/-p/--print command now shows the disk's model name, as
reported in /sys/block/sda/device/model (or equivalent filenames for other
disks). This feature does not yet work on other platforms, on which the
model name line is omitted from the output. This line is also not shown
when accessing disk image files, even on Linux.
- GPT fdisk can now report both the physical and logical sector sizes of
disks, but only on 2.6.32 and later Linux kernels. The verify feature now
uses the larger of the set alignment and physical/logical block sizes for
testing alignment, and setting alignment to something other than an exact
multiple of the ratio of the physical to logical block size results in a
warning.
- Addition of new verification checks, mostly (but not exclusively) related
to the new j/-j/--move-main-table option.
- Added new option: 'j' on the experts' menu in gdisk;
'-j/--move-main-table={sector}' in sgdisk. This option enables relocating
the main partition table from sector 2 (the default location) to somewhere
else on the disk. The main reason I know of to do this is if the disk is
to be used with a system-on-chip (SoC) computer, some of which require the
boot loader to be located at sector 2. If you pass this option the default
value of 2, it has the effect of reducing the padding placed between the
main partition table and the first usable sector value created by the
Linux fdisk tool.
- Updated man pages with new recommendations for ESP and BIOS Boot Partition
sizes.
- Added four type codes (AF06 through AF09) for Apple SoftRAID (Status,
Scratch, Volume, and Cache).
- Added two type codes for the Open Network Install Environment (ONIE):
0xe100 (7412F7D5-A156-4B13-81DC-867174929325) and 0xe101
(D4E6E2CD-4469-46F3-B5CB-1BFF57AFC149).
- Added thirteen type codes for Android partitions (0xa000 through
0xa00c).
- Added type code for QNX6 (aka QNX Power-Safe) filesystem: 0xb300, for
CEF5A9AD-73BC-4601-89F3-CDEEEEE321A1.
- Removed stray debug message ("REALLY setting name!") from sgdisk,
when setting new name via -c option.
1.0.1 (10/18/2015):
-------------------
- Created uninstall-fixparts and uninstall-gdisk scripts for OS X. As the
names imply, these scripts remove the files installed by the fixparts and
gdisk packages, respectively.
- Fixed bug that caused -N/--largest-new option to sgdisk to fail when
fed a "0" option.
- Fixed bug that caused input glitches in EFI version of gdisk.
- Fixed bug that caused sgdisk to not return an appropriate error code
when it encountered a write error when saving changes.
- Fixed bug that caused cgdisk's "Info" display to under-report the
partition's size by one sector.
- OS X 10.11 includes new security features that prevent GPT fdisk from
working unless these features are disabled. To do so, you must boot to a
Recovery HD system, open a Terminal, type "csrutil disable", and reboot
into the normal system. You can re-enable the security features by
repeating the process, but specify "enable" rather than "disable". I've
added a message pointing users to a Web page explaining how to disable
this feature when gdisk detects that it can't write to the disk under OS
X. If you know of a way around this (including code changes to gdisk),
please contact me.
- I've updated the OS X installation location from the Unix-standard
/usr/sbin (and related locations for documentation) to /usr/local/bin
(and related locations for documentation). This is Just Plain Crazy from
a Unix point of view, but Apple has to be Apple and do things just a
little bit differently.
- I've updated my OS X environment to OS X 10.11 and LLVM 7.0.0. This has
also meant installing fresh versions of popt and ncurses from MacPorts,
which may require upgrading popt to get sgdisk working on some systems.
(gdisk, cgdisk, and fixparts should continue to work normally on all
systems.) The OS X binaries are now "fat" (32- and 64-bit) versions,
which should have no noticeable effect unless you have a Mac with broken
32-bit support, in which case the binaries will now work.
- Changed the default name of 0xab00 partitions from "Apple boot" to
"Recovery HD", since the latter is the name that Apple gives these
partitions. Also, I discovered through painful experience that OS X
flakes out and won't boot if the name is something other than "Recovery
HD", so it really has to have the right name!
- Changed the OpenBSD type codes (0xa600 and 0xa601): 0xa600 is now
824CC7A0-36A8-11E3-890A-952519AD3F61 (OpenBSD disklabel) and 0xa601 is
now gone. Previously, 0xa600 was 516E7CB4-6ECF-11D6-8FF8-00022D09712B, a
duplicate of the FreeBSD disklabel, and 0xa601 was
824CC7A0-36A8-11E3-890A-952519AD3F61. OpenBSD is now officially
supporting 824CC7A0-36A8-11E3-890A-952519AD3F61 as a disklabel type,
though. It's unclear what, if anything, OpenBSD will use for
non-disklabel type codes at the moment.
- Added GUID 0311FC50-01CA-4725-AD77-9ADBB20ACE98 (0xbc00) for
Acronis Secure Zone backup partitions.
- Fixed bug that caused random crashes on ppc64el systems (and perhaps
others).
- Added GUID C91818F9-8025-47AF-89D2-F030D7000C2C (0x3900) for Plan 9.
- Added GUID 69DAD710-2CE4-4E3C-B16C-21A1D49ABED3 (0x8307) for 32-bit ARM
Linux root (/) partition, as per the Freedesktop.org Discoverable
Partition Spec
(http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/).
- Edited man pages to clarify that default alignment is to 1MiB boundaries;
this translates to 2048 sectors on disks with 512-byte sectors, but it
will be something else on disks with other sector sizes.
- Changed behavior of -z/--zap and -Z/--zap-all options to sgdisk so that
if a subsequent command causes changes, they'll be written to disk.
Previously, doing something like "sgdisk --zap-all --clear /dev/sdd"
would wipe the disk but not create a partition table; to create a blank
table you'd need to do "sgdisk --zap-all --clear --mbrtogpt /dev/sdd",
which is a bit odd and counter-intuitive, to the point of arguably being
a bug.
1.0.0 (3/16/2015):
------------------
- I'm now building a binary package of gdisk_x64.efi, using the UEFI GPT
fdisk package.
- Added partition type for OpenBSD data
(824CC7A0-36A8-11E3-890A-952519AD3F61/0xa601). Also mapped 0xa600 to the
FreeBSD disklabel type code (516E7CB4-6ECF-11D6-8FF8-00022D09712B). I'm
not sure that's 100% correct, but since I can't find references to an
OpenBSD disklabel GPT type code, it seems the best choice at the moment.
- Added partition type for Windows Storage Spaces
(E75CAF8F-F680-4CEE-AFA3-B001E56EFC2D/0x4202)
- Added -O/--print-mbr option to sgdisk, enabling easier display of MBR
data structures without invoking gdisk.
- Updated warning message: "EBR describes a logical partition" now reads
"EBR points to an EBR," which is more technically correct.
- Altered warning displayed when run from Windows on non-GPT disk, because
Windows on UEFI-based systems is becoming more common.
- Fixed spurious "1" return value in gdisk.
- Small code changes to support compilation as EFI application with the
UEFI GPT fdisk library
(http://sourceforge.net/projects/uefigptfdisk/?source=directory)
- Added new partition type codes for Ceph
(https://github.com/ceph/ceph/blob/9bcc42a3e6b08521694b5c0228b2c6ed7b3d312e/src/ceph-disk#L76-L81):
4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D/0xf800 (Ceph OSD),
4FBD7E29-9D25-41B8-AFD0-5EC00CEFF05D/0xf801 (Ceph dm-crypt OSD),
45B0969E-9B03-4F30-B4C6-B4B80CEFF106/0xf802 (Ceph journal),
45B0969E-9B03-4F30-B4C6-5EC00CEFF106/0xf803 (Ceph dm-crypt journal),
89C57F98-2FE5-4DC0-89C1-F3AD0CEFF2BE/0xf804 (Ceph disk in creation), and
89C57F98-2FE5-4DC0-89C1-5EC00CEFF2BE/0xf805 (Ceph dm-crypt disk in
creation)
- Added new partition type codes from
http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/:
44479540-F297-41B2-9AF7-D131D5F0458A/0x8303 (Linux / on x86),
4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709/0x8304 (Linux / on x86-64),
B921B045-1DF0-41C3-AF44-4C6F280D3FAE/0x8305 (Linux / on 64-bit ARM),
3B8F8425-20E0-4F3B-907F-1A25A76F98E8/0x8306 (Linux /srv).
0.8.10 (3/2/2014):
------------------
- Added feature to sgdisk's -A/--attributes, -c/--change-name,
-t/--typecode, and -u/--partition-guid commands: If a -n/--new option
with "0" as the partition number precedes these options on the command
line, passin "0" as the partition number to the following options causes
them to use the newly-created partition. For instance, "sgdisk -n
0:0:+550M -t 0:EF00 /dev/sda" creates a new partition with a type code of
EF00. (Previous versions would ignore the "-t 0:EF00" option.)
- Fixed bug that caused incorrect partition number to be displayed by
sgdisk in error messages when the user specified a non-existent partition
for inclusion in a hybrid MBR or conversion to a conventional MBR.
- Fixed new (in 0.8.9) bug that caused a failure to create more than one
hybridized partition when creating a hybrid MBR.
- Fixed bug that caused gdisk and sgdisk to create hybridized partitions
that ended at or above the 2^32 sector point with incorrect end values.
The behavior now varies between gdisk and sgdisk: gdisk now creates
hybrid partitions that begin below 2^32 sectors and that are smaller than
2^32 sectors, since this is technically legal; but gdisk displays a
warning, because some OSes (such as DOS, Windows XP, OS/2, and BeOS)
misbehave with such partitions. AFAIK, only Linux, FreeBSD, and Windows 7
work properly with such partitions. Because of this fact and because
sgdisk is a more automated tool, it's stricter in how it handles things:
It refuses to create a hybrid partition if the original ends at or above
the 2^32 sector mark.
0.8.9 (2/17/2014):
------------------
- Removed dependency on libicu for UTF-16 support.
- Fixed spurious "0xEE partition doesn't start on sector 1" warning in
FixParts (and perhaps in other programs under some circumstances).
- Added GPT regeneration command to GPT-destruction options ('z' in gdisk,
-z and -Z options to sgdisk). This is done to avoid wiping out data
mid-disk that might not be backup GPT data structures, which could
otherwise occur if a RAID array was resized in certain ways.
- Added check for an oversized 0xEE protective partition. The program now
auto-repairs this condition on loading if the GPT data seem otherwise
valid. This is done because I've been receiving reports of some disks
(possibly from some OEM Windows 8 loads) that violate the GPT spec in
this way, and gdisk was reporting write errors when saving data.
- If the GPT data seem to be damaged in some way or if the disk seems to
be a hybrid MBR and if the MBR partition(s) don't fit on the disk, the
verify (v) function now warns of this condition, and writing the disk if
it exists also displays a more specific error message about the problem.
- Added new type codes (3000, 7412F7D5-A156-4B13-81DC-867174929325 and
3001, D4E6E2CD-4469-46F3-B5CB-1BFF57AFC149) for Open Network Install
Environment (ONIE) boot and config partitions, respectively.
- Added new type ccde (ED01, BFBFAFE7-A34F-448A-9A5B-6213EB736C22), for
Lenovo's ESP-like partition.
0.8.8 (10/14/2013):
-------------------
- Fixed bug that could cause segfault when passing an invalid partition
number to sgdisk's -i/--info command.
- Added new type code: 933AC7E1-2EB4-4F13-B844-0E14E2AEF915, or gdisk code
8302, for Linux /home partitions. This type code is used by recent
versions of systemd to permit /home to be auto-mounted; see
http://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html
for details.
- Added new type code: 9E1A2D38-C612-4316-AA26-8B49521E5A8B, or gdisk code
4100, for PowerPC PReP (PowerPC reference platform) boot.
- The number of partition type codes has grown large enough that it fills
an 80x24 display. I've therefore added a pause (with a prompt to hit
<Enter>) to display more items after showing 21 lines in gdisk or after
the screen has nearly filled with entries in cgdisk. There's no such
pause/prompt in sgdisk, though.
- Fine-tuned verification ('v') check for 0xEE partition that doesn't begin
on sector 1: Previously, a disk with multiple 0xEE partitions would
always trigger this warning. Now, the warning occurs only if NONE of the
0xEE partitions begins on sector 1.
- Fixed hybrid MBR creation on disks larger than 2TiB: Previously, if one
opted to create an extra partition to cover unused space following
hybridized partitions, gdisk would hang.
- Added check for an active/bootable 0xEE protective partition to the
verify ('v') function. If found, this is not counted as an error, but
it is called out to the user, since it can cause some EFIs (such as
VirtualBox's EFI) to ignore the disk.
0.8.7 (7/8/2013):
-----------------
- Modified Mac version so that it can work on /dev/rdisk* devices as well
as /dev/disk* devices. The result is that, when using the /dev/rdisk*
devices, the partition table can sometimes be re-read without removing
the disk or rebooting.
- Added "-a" option to cgdisk to use a ">" symbol to the left of the
selected partition rather than ncurses highlighting.
- Modified "converting MBR to GPT" message to clarify that the conversion
is being held in memory, since some people have mistakenly assumed that a
"gdisk -l" operation will change an MBR disk to a GPT disk without
prompting.
- Added partition type code for freedesktop.org's proposed $BOOT partition
(bc13c2ff-59e6-4262-a352-b275fd6f7172; GPT fdisk type code EA00)
- Adjusted alignment code when using -n or -N in sgdisk to keep the
requested partition size (if specified using +###{MGT} terminology)
as the requested value rather than relative to the requested start
point. This gives you the requested partition size rather than be
slightly smaller if sgdisk needs to adjust the start point up a bit and
it prevents gaps from appearing between partitions if several are created
in succession using automatic placement of the start point.
- Fixed small bugs in gdisk_test.sh script.
- Removed stray debug message that would appear when reading MBR disks.
- Added partition type code for Intel Rapid Start partition (GUID
D3BFE2DE-3DAF-11DF-BA40-E3A556D89593, code 8400), used by systems that
implement Intel's Rapid Start technology. See
http://blog.adios.tw/2012/10/funtoo-linux-and-intel-rapid-start.html or
http://mjg59.dreamwidth.org/26022.html.
- Added partition type code for Haiku BFS (GUID
42465331-3BA3-10F1-802A-4861696B7521; code EB00).
0.8.6 (1/9/2013):
-----------------
- Fixed a bug that could cause sgdisk to crash when passing a partition
number of 0 to the -t option.
- Added support for building under Solaris.
- Added a new check to the verification code.
- Added partition type code for Sony system partition
(F4019732-066E-4E12-8273-346C5641494F). I'm not entirely clear what this
is used for, but it's appearing on some new Sony computers.
- Tweaked hybrid MBR creation options to fix a problem that caused the main
0xEE MBR partition to NOT be created if the user told gdisk to NOT place
it at the start of the disk AND IF fewer than three partitions are
hybridize AND IF the user opted to create a second protective partition.
- Changed default build options for Mac OS X to *NOT* use libicu,
since it seems to have broken somewhere along the line. It still
works on Linux, though.
- Added partition type codes for VMWare ESX (FB00, FB01, and FC00).
0.8.5 (5/30/2012):
------------------
- Changed code that writes the partition table so that a disk sync
operation occurs even if one or more write operations failed (but not if
they all failed). This is intended to work around a bug that a user
reported on a Windows system on which the write of the protective MBR
failed, although everything else worked. (I suspect anti-virus software
may have been blocking write access to the MBR.)
- Added type codes for Midnight BSD (0xA580 - 0xA585). I used these codes
because Midnight BSD uses the same 0xA5 type code as FreeBSD on MBR
disks, so I'm starting Midnight BSD's numbering halfway through the
0xA5## range.
0.8.4 (3/25/2012):
------------------
- REALLY fixed Ctrl+D problems! Now gdisk terminates upon receiving a
Ctrl+D. In all previous versions, it could lock itself into a CPU-hogging
loop if launched via "sudo" from a terminal window that was then closed
or if Ctrl+D was pressed at certain input prompts (for a partition name
or sector number, for instance).
0.8.3 (3/23/2012):
------------------
- Fixed compilation problem on GCC 4.7.
- Improved handling of Ctrl+D on some systems.
- Added disk's name to message stating that a disk write was successful.
- Fixed bug that caused creation of >2TiB partitions on 32-bit systems to
be truncated in sgdisk.
0.8.2 (1/22/2012):
------------------
- Adjusted the code to support a number of partitions that's not a multiple
of the number of partition table entries that fits in a sector (normally
4 per sector). The program still rounds up, when necessary, when resizing
the partition table manually, but not when loading a partition table that
contains a peculiar number of partitions. This helps prevent spurious
error messages about CRC problems when loading some Solaris partition
tables.
- Fixed bugs relating to the handling of empty partitions; Solaris's ZFS
tools create weird empty partitions that are legal but that gdisk wasn't
handling properly. (Specifically, they sometimes have non-zero end
points; gdisk assumed empty partitions had end points of 0.)
- Fixed a bug that caused an infinite loop of input prompts if the user
pressed Ctrl+D.
- Changed gdisk's first-sector input operation to specify a sector number
that's properly aligned as the default value. This eliminates the need
to alter that value and notify the user of the change when the user
hits "Enter" for the default value as the first partition on an empty
disk (as well as in some other situations).
0.8.1 (10/1/2011):
------------------
- Fixed bug that could cause FixParts to keep a partition's assignment
as logical when FixPart could not actually do so. This could happen
when there are no gaps between two logical partitions. Some partitioning
tools can create such configurations, but FixParts can't. Such
configurations are extremely rare. I've only encountered them when
logical partitions are out of order.
- Added code to detect infinite loops of logical partitions when reading
MBR data. When detected, the program now stops reading after the first
loop, so no duplicates appear in the partition list.
- Fixed bug in partition overlap detection in MBR code.
- Changed GPT reading code to use the size encoded in GPT headers to
determine how much of the header to use in computing a CRC, with the
restriction that the size be equal to or less than the disk's sector
size. This should work around problems with libefi in ZFS, which sets the
header size to 512 rather than the more common 92. A caveat: If the
disk's sector size is larger than the GPTHeader data structure size (512
bytes), then the rest of the sector's contents are ignored and replaced
with 0 values. This could produce false positives on CRC checks on disks
with over-512-byte sector sizes if the header sector is padded with
something other than 0 values.
- Fixed bug in new (as of 0.8.0) check that main and backup partition
tables are identical on big-endian (PowerPC, etc.) hardware.
0.8.0 (9/10/2011):
------------------
- Added new return option for sgdisk: 8, which means that a replication
operation (-R or --replicate) failed. Note that other operations on
the same command line might still have succeeded.
- Added gdisk_test.sh shell script, contributed by Guillaume Delacour.
This script tests some common gdisk and sgdisk operations to be sure
they're working correctly.
- Enable sgdisk's -l (--load-backup) and -o (--clear) options to work
even on disks that are damaged. Most other options will still be ignored,
though, so if you suspect a disk may be bad and want to use one of these
options, you should do so on a line by itself, followed by a separate
command to perform other actions (such as adding new partitions).
- Added check for mis-matched primary and backup partition tables.
A mismatch is reported as a CRC error.
- Added Apple Core Storage partition type code (hex code AF05, GUID
53746F72-6167-11AA-AA11-00306543ECAC).
- Added cgdisk program to the family. This program is a rough workalike
to cfdisk, much as gdisk is a rough workalike to fdisk. See the cgdisk
man page or http://www.rodsbooks.com/gdisk/cgdisk-walkthrough.html for
details about its operation.
- Fixed bug that caused CHS end point for protective MBR to be set to
0xfeffff rather than the spec-mandated 0xffffff on disks over ~8GB. This
is a very minor bug, since not much cares about this, and most other GPT
tools get it wrong in the same way, too.
0.7.2 (6/26/2011):
------------------
- The Windows version now (finally!) generates proper GUIDs rather than a
purely random number. This fixes a bug that caused Windows 7 to crash
when converting a disk from MBR format (but, oddly, not when creating a
fresh partition table or doing various other things).
- Added a warning when an MBR partition is discarded because it's too
big for the disk.
- Changed warning to Windows users about the dangers of converting to GPT
so that it appears only on disks that aren't already in GPT form.
- Fixed bug that caused bogus "3" values to pad the ends of partition names
on some disks (particularly those created by Microsoft's disk
partitioning tools).
- Made compilation without Unicode support possible (see README file)
- Made default filesystem type code OS-dependent (based on the compilation
platform).
- Added new Linux-only filesystem partition type GUID code,
0FC63DAF-8483-4772-8E79-3D69D8477DE4 (8300 entry code). Also changed name
of the EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (0700 entry code) to
"Microsoft basic data").
- Fixed a bug that caused an incorrect code to be set for active/bootable
partitions when generating a hybrid MBR.
- Enable entry of hex codes that begin with "0x" for both GPT and MBR
partitions.
- Fixed bug that caused the boot loader code to be lost when creating a
hybrid MBR.
- Fixed bug in sector input code that could produce improper values
if the user inputs ridiculously large "+" values.
0.7.1 (3/21/2011):
------------------
- Added support for proper UTF-16LE partition names rather than the
"shortcut" that properly encoded only ASCII names. This support works
only in Linux, FreeBSD, and OS X, though, at least for the moment.
Although it's possible to compile this support into Windows when using
Visual C++, it doesn't seem to work properly. Since using this feature
would require distributing the ICU libraries with the Windows binary,
thus bloating the binary package's size to no effect, I've disabled it in
my standard Windows build, at least for now.
- Added check to fixparts to keep it from operating on devices that
lack an existing MBR signature. (In 0.7.0, it could write an empty
MBR data structure to a device on which it was mistakenly launched.)
- Fixed bug that caused the protective MBR to not be written when
restoring a backup of the GPT data.
- Fixed bug that caused second protective MBR partition, when created
as part of a hybrid MBR, to always be of type 0xEE, even when the
user specified something else.
- Integrated a number of code cleanups contributed by Florian Zumbiehl.
0.7.0 (3/11/2011):
------------------
- Fixed bug that caused some types of logical partitions to be misread.
- Created FixParts program, to fix problems on MBR-partitioned disks.
Although this program is part of the GPT fdisk family, it is NOT used on
GPT disks.
- Completely redid the GPT-to-MBR code, used both for converting to MBR
form and for creating hybrid MBRs.
- Fixed a bug that caused gdisk to "forget" some partitions if there were
numbering gaps when a conversion to MBR was aborted.
- Improved CHS value creation on small (<~8GB) disks for protective MBR
and when creating hybrid MBRs or converting to MBR format. Linux-only,
for the moment; other platforms still produce bad CHS values on sub-~8GB
disks (but few OSes care these days).
- Enhanced disk replication features ('u' on the experts' menu in gdisk; -R
or --replicate in sgdisk). It's now possible to replicate the partition
table from a larger to a smaller disk, so long as all the partitions fit
on the smaller disk. In sgdisk, the secondary GPT data are moved
automatically if disk sizes don't match. In gdisk, the secondary GPT data
are moved automatically if the target disk is smaller than the source
disk; if the target disk is larger than the source disk, the user is
given the option of making this adjustment.
- Fixed --load-backup (-l) option to sgdisk, which was broken.
- Changed largest drive that's not given a minimum 4 KiB alignment even
when smaller alignment is detected on the disk to 300 GB.
- Fixed bug that prevented aborting a partition table backup ('u' on the
experts' menu) by hitting the Enter key for the device filename.
- Implemented a number of code cleanups provided by Florian Zumbiehl.
0.6.14 (1/8/2011):
------------------
- Made small change to the way the start sector is interpreted if you use a
"+" specification, as in "+2G" to locate a partition 2 GiB into the
default range. This change makes adjustments for sector alignment less
likely.
- Modified sgdisk's -n (--new) option to work with relative start and end
values (which the man page incorrectly stated it already did). Values of
0 for the start and end sectors refer to the first and last available
sectors in the largest free block, and a partition number of 0 refers to
the first available partition.
- Added ChromeOS GUID values to list of recognized partition type GUIDs.
7F00 = ChromeOS kernel, 7501 = ChromeOS root, 7502 = ChromeOS reserved.
Untested on actual ChromeOS system.
- Tweaked APM detection to look for APM signature even if an MBR
signature has already been found. Helps in diagnosis of cases
in which an MBR has overwritten an APM disk.
0.6.13 (10/12/2010):
--------------------
- Added notification about nonexistent partitions to hybrid MBR creation
in gdisk.
- Fixed bug in GPT-to-MBR conversion that could sometimes enable creation
of an extended partition that overlaps a preceding partition.
- Fixed bug in GPT-to-MBR conversion that prevented creation of an MBR
table with logical partitions if there were four or fewer partitions.
0.6.12 (10/7/2010):
-------------------
- Adjusted alignment code to use 1 MiB alignment by default for drives with
other than 512-byte sector sizes. (Previous versions increased this --
for instance, to 4 MiB for drives with 2048-byte logical sector size.)
- Entry of non-hexadecimal value for partition type code now causes
re-prompting for a new value, fixing a recently-introduced minor bug.
- Fixed bug in sector entry using K/M/G/T/P suffixes on disks with
other-than-512-byte sector numbers.
- Added "P" (PiB, pebibyte) suffix to suffixes accepted in entering
partition sizes.
- Fixed bug that caused sgdisk to segfault if fed the (invalid)
"-A show" parameter. Now it terminates with a complaint about an invalid
partition number 0.
- Removed warning when running on big-endian hardware, since this
support has been present for quite a while with no bug reports.
0.6.11 (9/25/2010):
-------------------
- Added -F (--first-aligned-in-largest) option to sgdisk. This option is a
variant on -f (--first-in-largest); it returns the number of the first
sector that will be used in the largest free area, given the current
alignment value (set via -a/--set-alignment).
- Streamlined GUID code entry in gdisk; it no longer offers the option
to enter GUIDs in separate segments.
- The -t option to sgdisk now accepts GUID values as well as the
sgdisk/gdisk-specific two-byte hex codes.
- Added check that the protective 0xEE MBR partition begins on sector 1
to the verify function. If it doesn't, a warning message is displayed,
but it doesn't count as an error.
- Added check for overlapping MBR partitions to verify function (gdisk "v"
function on all menus; sgdisk -v/--verify function). Also warns about
multiple MBR 0xEE partitions (causes problems in some OSes).
- Added check to GPT-to-MBR and hybrid MBR creation options to prevent
creation of disks with duplicate partitions. When told to create a disk
with duplicates, sgdisk now aborts with the error message "Problem
creating MBR!" When attempting to create a hybrid MBR with duplicates,
gdisk silently drops duplicate partitions, leaving fewer than requested.
Creating duplicates should not be possible in sgdisk when converting to
MBR form.
0.6.10 (8/22/2010):
-------------------
- Enable disk-wipe (-z and -Z) and verification (-v) operations in
sgdisk even if the disk is badly damaged.
- Added support for setting attributes in sgdisk (-A/--attributes option)
in sgdisk.
- Fixed bug that created backwards attribute field values (bit #2 was
entered as bit #61, etc.).
- Fixed bug that caused creation of hybrid MBR to wipe out the MBR's boot
code.
- Added ability to save partition table from one device to another (gdisk:
'u' on experts' menu; sgdisk: -R or --replicate option).
- Fixed inaccessible -C/--recompute-chs option in sgdisk.
0.6.9 (7/4/2010):
------------------
- Fixed minor error in sgdisk man page (--largest-new option requires
a partition number).
- Fixed major bug in hybrid MBR creation, which caused incorrect
protective partition end point settings and occasionally other
problems.
0.6.8 (5/23/2010):
------------------
- Added tests to see if the file to be opened is a directory, character
device, FIFO, or socket; program now terminates if any of these
conditions is met. (Linux/FreeBSD/OS X only.) Thanks to Justin Maggard
for this patch.
- Added 'f' option on gdisk's experts' menu (-G/--randomize-guids in
sgdisk). This option randomizes the disk's GUID and all partitions'
GUIDs. Intended for use after cloning a disk with a utility that copies
the GUIDs intact (such as a raw dd copy) if you want each disk copy to
have its own set of GUIDs.
- Added -u/--partition-guid and -U/--disk-guid options to sgdisk. These are
the equivalents of the 'g' and 'c' options, respectively, on the gdisk
experts' menu: They enable adjusting an individual partition's GUID or a
disk's GUID. The GUID may be either a fully specified GUID value or 'R'
or 'r' to set a random GUID value.
- Fixed compile problem for FreeBSD (its math library lacks a log2()
function). Also created separate Makefile.freebsd with a couple of
FreeBSD-specific options.
- Added -N (--largest-new) command to sgdisk. This command creates a single
partition that fills the largest single unpartitioned block of space on
the disk.
- Fixed sgdisk man page error: the --change-name option was incorrectly
listed as --change.
- Added 'h' option to gdisk experts' menu (-C or --recompute-chs in sgdisk)
to recompute all protective/hybrid MBR CHS values. This option is
intended to work around a bug in at least one BIOS that prevents the
computer from booting when the GPT-mandated (but technically illegal)
0xFFFFFF CHS value is used as the end point for a protective MBR. The
recomputed values will be legal (e.g., 0xFEFFFF instead of 0xFFFFFF),
but incorrect in GPT terms, and will therefore enable at least one
BIOS to boot with a GPT disk. See http://www.rodsbooks.com/gdisk/bios.html
for all I know about BIOS/GPT incompatibilities.
0.6.7 (5/1/2010):
-----------------
- Undid earlier change, with version 0.6.4, that wiped the MBR boot loader
when doing MBR-to-GPT conversions. I've now become skeptical that MBR
boot loaders were causing any real problems on GPT disks, so I'm going
back to the philosophy of leaving as much alone as possible.
- Fixed bug that caused incorrect reporting of free space on 0-size disks
(e.g., files of 0 length passed as disk images).
- Fixed bug that caused segfault on some invalid disks
- Fixed bug that caused incorrect partition numbers to be displayed for
some verify problems.
0.6.6 (3/21/2010):
-----------------
- Added support for the "no block IO protocol" (referred to as "hide from
EFI" in GPT fdisk) and "legacy BIOS bootable" attribute bits. See Table
19 of the UEFI 2.3 specification (p. 153) for details.
- Changed the sequence in which GPT data structures are written to disk;
backups are now written first, followed by the main structures. This is
as recommended in the UEFI 2.3 specification, since it's safer in the
extremely unlikely event that a RAID array's size is increased and
there's a power outage mid-write. (If the main structures are written
first in this case, they'll point to data that's not yet been written;
but by writing the backups first, the old main structures will still
point to the valid old backup structures.)
- Protective MBRs now have disk signatures of 0x00000000, to better
conform with GPT as described in the UEFI 2.3 specification.
- Added alignment information to the summary data produced by the
'p' main-menu option in gdisk or the -p option to sgdisk.
- More alignment changes: GPT fdisk now attempts to determine the alignment
value based on alignment of current partitions, if any are defined. If no
partitions are defined, a default value of 2048 is set. If the computed
value is less than 8 on drives over about 596GiB, it's reset to 8, since
the drive might be a WD Advanced Format unit that requires an 8-sector
(or larger power-of-2) alignment value for best performance. The
2048-sector default provides better alignment in some RAID
configurations.
- Changed behavior when a backup restore fails. Previously, GPT fdisk
would create a fresh blank set of partitions. Now it does so only
if the failure occurs when interpreting the backup's contents; if the
user typed the wrong filename, the in-memory data structures aren't
touched.
0.6.5 (3/7/2010):
-----------------
- Added tests to verify ('v') function and to pre-save checks to look for
partitions that end before they begin or that are too big for their
disks.
- Fixed a bug that could cause spurious data to appear in a grown partition
table.
- Added ability to convert some or all partitions to logical partitions in
GPT-to-MBR conversion. This feature is limited by the fact that at least
one free sector must exist immediately prior to each logical partition,
so it won't do much good if partitions are crammed together. It should be
possible to convert back to MBR any disk that started that way, provided
no partitions were added or resized when the disk was in GPT form; and
disks that were partitioned with Apple's Disk Utility or other tools that
insert unpartitioned space should also be convertible. CAUTION: THE
LOGICAL PARTITION CREATION FEATURE DOESN'T TRY TO ALIGN PARTITIONS OR
PARTITION HEADER DATA TO CYLINDER BOUNDARIES! It's conceivable that some
older OSes or utilities will object to these disks, although Linux, OS X,
Windows Vista, and Windows 7 all seem happy with them.
- Fixed bug that caused creation of 0-length file if an incorrect device
filename was typed.
- The gdisk program now prompts for a device filename if it's called with
no options. This enables gdisk to do something useful if it's launched by
double-clicking its icon in a GUI environment.
- Added workaround for bug in some versions of MinGW that caused the
program to garble input sector numbers.
- The Windows version now works on disks with over-512-byte sectors.
Tested on a magneto-optical (MO) drive with 2048-byte sectors.
- Added -D (--display-alignment) option to sgdisk, to display sector
alignment value (by default, 1 for sub-800GiB disks and 8 for disks
over that size).
- Fixed bug in computation of CHS geometries for protective MBR. This is
non-critical, since most modern utilities ignore the CHS geometries.
Concerned users can use the 'n' option on the experts' menu to build new
protective MBRs with the new algorithm, if desired. (Note that GNU
Parted, at least, gets this wrong, too.)
- Fixed memory-allocation bug when reading GPT disks with partition tables
with over 128 entries; could cause program to crash on startup.
0.6.4-2 (2/20/2010):
--------------------
Note: Neither of the following changes affects actual program code, so I've
left the version number in the program at 0.6.4.
- Altered Makefile to pass user's compiler and linker environment
variables through.
- Added #include to gpttext.cc to enable it to compile on the latest
GCC versions (it was failing on at least some 4.4.x compilers).
0.6.4 (2/19/2010):
-------------------
- Added -m (--gpttombr) option to sgdisk, enabling conversion of GPT
disks to MBR format, with a limit of four partitions total, and of course
without overcoming the 2TiB limit.
- Added -h (--hybrid) option to sgdisk, enabling creation of hybrid
MBRs. Fewer options are available in sgdisk than in gdisk, though,
in order to keep the user interface manageable.
- Fixed off-by-one bug in specification of partition when using the
-T (--transform-bsd) option in sgdisk.
- Changed the code to create a new MBR unique disk signature whenever a new
protective MBR is generated (when doing an MBR-to-GPT conversion, when
using the 'n' option on the experts' menu, or when using the 'o' option
on the main menu, for example). Previous versions attempted to preserve
the existing MBR disk signature in most cases, but this resulted in
values of 0x00000000 whenever an empty disk was partitioned, and often in
other cases, too. Better to risk changing this value too often than to
leave multiple disks with 0x00000000 values, I think.
- Added transpose ('t' on experts' menu in gdisk; or -r or --transpose in
sgdisk) command to enable fine-tuning partition order without doing a
full sort.
- Added code to clear the MBR boot loader when doing an MBR-to-GPT
conversion. (This was already done in full-disk BSD-to-GPT conversions.)
This is done because I've seen a few problem reports that make me think
some MBR boot loaders freak out and hang the system when they encounter
GPT disks, and/or they attempt to load a second-stage boot loader stored
in what is now GPT territory, causing a system hang. Since MBR boot
loaders don't work on GPT disks anyhow (even GRUB needs to be
reinstalled), this new wiping behavior shouldn't cause any problems, and
may prevent a few.
- Fixed bug in Windows version that prevented saving backup files.
- Fixed bug that caused second and subsequent partition numbers in
prompts in hybrid MBR conversion procedure to be displayed in
hexadecimal.
- Fixed very obscure potential bug in hybrid MBR/GPT synchronization when
deleting partitions; code wasn't matching partition lengths correctly,
which would only affect partitions that start at the same point but have
different lengths in MBR vs. GPT.
- Fixed bug in the -E option to sgdisk; it was actually returning the
last free sector, not the last free sector in the largest free block.
- Fixed bug in -t option to sgdisk; it was corrupting partition type
codes.
- Fixed minor alignment bug in partition summary list ('p' from any menu)
when partition sizes are between 1000 and 1024 units.
- Backup restore function ('l' on recovery & transformation menu) now
accepts both backups generated by GPT fdisk and backups created by a
direct copy (via dd, etc.) of the MBR, main GPT header, and main GPT
partition table, in that order. ("dd if=/dev/sda of=backup.gpt bs=512
count=34" will do this on Linux for a disk with a typical-sized GPT table
of 128 entries.)
0.6.3 (2/3/2010):
------------------
- Fixed serious data corruption bug on big-endian (PowerPC and similar)
systems.
- Changed several GPT fdisk Solaris type codes to correct a duplicate
- Corrected error in GPT fdisk type codes for NetBSD LFS and NetBSD RAID;
they were identical, but I've now changed NetBSD RAID to A906, which
is unique.
- Added GUID for IBM General Parallel File System (GPFS) partition type
code. Somewhat arbitrarily set it to use the 7501 number (MBR code 0x75
is used by IBM PC/IX, so it's at least the right company, by my loose
numbering rules....).
- Improved GUID generation. Prior versions generated completely random
numbers for GUIDs. This works, but is technically a violation of the
spec. Unix versions now employ libuuid to generate GUIDs in a more
correct way. The Windows version still generates random numbers, though.
- Turned PartTypes class into a derived class of GUIDData, and renamed
it to PartType.
- Created new GUIDData class, to replace the original GUIDData struct.
0.6.2 (1/29/2010):
------------------
- The change-type ('t' on main menu) option now changes the partition's
name *IF* the current name is the generic one for the partition type.
If the current name is not the generic name, it is NOT changed.
- Fixed bug that caused new protective MBR to not be created when the
MBR was invalid and the GPT was damaged and the user opts to try to
use the GPT data.
- Enabled default partition type code of 0700 when creating partitions
or changing their type codes. (Type 0700, Linux/Windows data, is set if