1cf200d32Sopenharmony_ci1.0.10 (2/19/2024): 2cf200d32Sopenharmony_ci------------------- 3cf200d32Sopenharmony_ci 4cf200d32Sopenharmony_ci- Fixed problem that caused sgdisk to crash with errors about being unable 5cf200d32Sopenharmony_ci to read the disk's partition table when compiled with the latest popt 6cf200d32Sopenharmony_ci (commit 740, which is pre-release as I type; presumably version 1.19 and 7cf200d32Sopenharmony_ci later once released). 8cf200d32Sopenharmony_ci 9cf200d32Sopenharmony_ci- Updated guid.cc to deal with minor change in libuuid. 10cf200d32Sopenharmony_ci 11cf200d32Sopenharmony_ci- Fixed potential NULL derefernce bug in sgdisk. Thanks to Damian Kurek 12cf200d32Sopenharmony_ci for this fix. 13cf200d32Sopenharmony_ci 14cf200d32Sopenharmony_ci- The partition number of "0" can now be used to reference newly-created 15cf200d32Sopenharmony_ci partitions when the --largest-new=0 option to sgdisk is used. Thanks to 16cf200d32Sopenharmony_ci David Joaquín Shourabi Porcel for this improvement. 17cf200d32Sopenharmony_ci 18cf200d32Sopenharmony_ci- Make explicit casts in gptcurses.cc to eliminate compiler warnings about 19cf200d32Sopenharmony_ci mis-matched types in printw() statements. 20cf200d32Sopenharmony_ci 21cf200d32Sopenharmony_ci- Minor code cleanup based on valgrind analysis. 22cf200d32Sopenharmony_ci 23cf200d32Sopenharmony_ci- In previous versions, GPT fdisk accepted only integer values for partition 24cf200d32Sopenharmony_ci start points, end points, and sizes, and it interpreted decimal values 25cf200d32Sopenharmony_ci incorrectly. That is, if you typed "+9.5G" as the partition end point, 26cf200d32Sopenharmony_ci you'd end up with something just 9 sectors in size. This version now 27cf200d32Sopenharmony_ci truncates decimal numbers to their integral values, so you'd get a 9 GiB 28cf200d32Sopenharmony_ci partition instead. 29cf200d32Sopenharmony_ci 30cf200d32Sopenharmony_ci- Changes to optimize disk handling, particularly on Windows, courtesy of 31cf200d32Sopenharmony_ci Frediano Ziglio. 32cf200d32Sopenharmony_ci 33cf200d32Sopenharmony_ci- Added numerous new partition type codes from Discoverable Partitions 34cf200d32Sopenharmony_ci Specification 35cf200d32Sopenharmony_ci (https://uapi-group.org/specifications/specs/discoverable_partitions_specification/). 36cf200d32Sopenharmony_ci 37cf200d32Sopenharmony_ci- Added new sgdisk -k/--move-backup-table and gdisk k (on the experts' menu) 38cf200d32Sopenharmony_ci option to relocate the backup partition table. This is the counterpart of 39cf200d32Sopenharmony_ci the sgdisk -j/--move-main-table and gdisk j (on the experts' menu) option 40cf200d32Sopenharmony_ci to move the main partition table. This code comes from Niklas Gollenstede. 41cf200d32Sopenharmony_ci 42cf200d32Sopenharmony_ci1.0.9 (4/14/2022): 43cf200d32Sopenharmony_ci------------------ 44cf200d32Sopenharmony_ci 45cf200d32Sopenharmony_ci- Removed stray debugging code that caused "partNum is {x}" to be printed 46cf200d32Sopenharmony_ci when changing a partition's name with sgdisk (-c/--change-name). 47cf200d32Sopenharmony_ci 48cf200d32Sopenharmony_ci- Added support for aligning partitions' end points, as well as their start 49cf200d32Sopenharmony_ci points. This support affects the default partition size when using 'n' in 50cf200d32Sopenharmony_ci gdisk; it affects the default partition size in cgdisk; and it's activated 51cf200d32Sopenharmony_ci by the new '-I' option in sgdisk. See the programs' respective man pages 52cf200d32Sopenharmony_ci for details. This feature is intended to help with LUKS2 encryption, which 53cf200d32Sopenharmony_ci reacts badly to partitions that are not sized as exact multiples of the 54cf200d32Sopenharmony_ci encryption block size. 55cf200d32Sopenharmony_ci 56cf200d32Sopenharmony_ci- Added check for too-small disks (most likely to be an issue when trying 57cf200d32Sopenharmony_ci to use a too-small disk image); program now aborts if this happens. 58cf200d32Sopenharmony_ci 59cf200d32Sopenharmony_ci- Added the ability to build sgdisk and cgdisk for Windows. 60cf200d32Sopenharmony_ci 61cf200d32Sopenharmony_ci- Added new type codes: 62cf200d32Sopenharmony_ci * FreeBSD nandfs (0xa506) 63cf200d32Sopenharmony_ci * Apple APFS Pre-Boot (0xaf0b) 64cf200d32Sopenharmony_ci * Apple APFS Recovery (0xaf0c) 65cf200d32Sopenharmony_ci * ChromeOS firmware (0x7f03) 66cf200d32Sopenharmony_ci * ChromeOS mini-OS (0x7f04) 67cf200d32Sopenharmony_ci * ChromeOS hibernate (0x7f05) 68cf200d32Sopenharmony_ci * U-Boot boot loader (0xb000) 69cf200d32Sopenharmony_ci * 27 (!) codes for Fuchsia (0xf100 to 0xf11a) 70cf200d32Sopenharmony_ci 71cf200d32Sopenharmony_ci- Fixed build problems with recent versions of ncurses. 72cf200d32Sopenharmony_ci 73cf200d32Sopenharmony_ci- Fixed bug that caused cgdisk to report incorrect partition attributes. 74cf200d32Sopenharmony_ci 75cf200d32Sopenharmony_ci- Consolidated Makefiles for Linux, FreeBSD, Solaris, macOS, and Windows 76cf200d32Sopenharmony_ci (32- and 64-bit). The old OS-specific Makefiles remain in case the new 77cf200d32Sopenharmony_ci consolidated Makefile has problems, but the old ones are deprecated. 78cf200d32Sopenharmony_ci (The Solaris support in the new Makefile is untested.) 79cf200d32Sopenharmony_ci 80cf200d32Sopenharmony_ci1.0.8 (6/9/2021): 81cf200d32Sopenharmony_ci----------------- 82cf200d32Sopenharmony_ci 83cf200d32Sopenharmony_ci- Fixed double byte swap operation on writes of partition name data on 84cf200d32Sopenharmony_ci big-endian systems; this is in addition to the double byte swap fix on 85cf200d32Sopenharmony_ci reading partition label data fixed in 1.0.7. (Thanks to Erik Larsson for 86cf200d32Sopenharmony_ci both fixes.) 87cf200d32Sopenharmony_ci 88cf200d32Sopenharmony_ci- Added feature to gdisk and sgdisk to enable swapping the byte order of 89cf200d32Sopenharmony_ci partition names, so as to correct disks already affected by the preceding 90cf200d32Sopenharmony_ci bug. This option is 'b' on the experts' menu in gdisk and 91cf200d32Sopenharmony_ci -b/--byte-swap-name in sgdisk. This seems advanced/obscure enough that I 92cf200d32Sopenharmony_ci don't want to clutter cgdisk's menu with this option, so I haven't added 93cf200d32Sopenharmony_ci it there. 94cf200d32Sopenharmony_ci 95cf200d32Sopenharmony_ci- Added type code for the Barebox boot loader (0xbb00; 96cf200d32Sopenharmony_ci 4778ED65-BF42-45FA-9C5B-287A1DC4AAB1). 97cf200d32Sopenharmony_ci 98cf200d32Sopenharmony_ci- Trivial code cleanup. 99cf200d32Sopenharmony_ci 100cf200d32Sopenharmony_ci1.0.7 (3/10/2021): 101cf200d32Sopenharmony_ci------------------ 102cf200d32Sopenharmony_ci 103cf200d32Sopenharmony_ci- Fixed bug that caused spurious warnings about the partition table 104cf200d32Sopenharmony_ci header claiming an invalid size of partition entries when reading 105cf200d32Sopenharmony_ci some MBR disks. 106cf200d32Sopenharmony_ci 107cf200d32Sopenharmony_ci- Added ARM64 as an architecture for the Mac builds of gdisk and fixparts. 108cf200d32Sopenharmony_ci The official GPT fdisk binaries of these files for macOS are now 109cf200d32Sopenharmony_ci "universal" x86-64/ARM64 binaries, so they will run natively on the new M1 110cf200d32Sopenharmony_ci (ARM64) Macs. The sgdisk and cgdisk binaries, though, remain built only 111cf200d32Sopenharmony_ci for x86-64, because they rely on libraries that are not easily built in 112cf200d32Sopenharmony_ci "universal" form. 113cf200d32Sopenharmony_ci 114cf200d32Sopenharmony_ci- Fixed double byte swap operation on partition label data on big-endian 115cf200d32Sopenharmony_ci CPUs. This resulted in partition names becoming gibberish on such CPUs. 116cf200d32Sopenharmony_ci 117cf200d32Sopenharmony_ci- Added three new type codes: 118cf200d32Sopenharmony_ci - 0x0701 - Microsoft Storage Replica 119cf200d32Sopenharmony_ci - 0x0702 - ArcaOS Type 1 120cf200d32Sopenharmony_ci - 0x8401 - Storage Performance Development Kit (SPDK) block device 121cf200d32Sopenharmony_ci 122cf200d32Sopenharmony_ci1.0.6 (1/13/2021): 123cf200d32Sopenharmony_ci------------------ 124cf200d32Sopenharmony_ci 125cf200d32Sopenharmony_ci- Fixed bug that could cause segfault if GPT header claimed partition 126cf200d32Sopenharmony_ci entries are oversized. See: 127cf200d32Sopenharmony_ci https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0256 128cf200d32Sopenharmony_ci 129cf200d32Sopenharmony_ci- Fixed bug that could cause a crash if a badly-formatted MBR disk was 130cf200d32Sopenharmony_ci read. See: 131cf200d32Sopenharmony_ci https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-0308 132cf200d32Sopenharmony_ci 133cf200d32Sopenharmony_ci- Renamed the partition type "Freedesktop $BOOT" to "XBOOTLDR partition". 134cf200d32Sopenharmony_ci 135cf200d32Sopenharmony_ci- Added several more Freedesktop partition table type codes (0x8312 through 136cf200d32Sopenharmony_ci 0x831C). 137cf200d32Sopenharmony_ci 138cf200d32Sopenharmony_ci- Fixed type code definition in diskio-unix.cc that prevented 32-bit builds 139cf200d32Sopenharmony_ci from correctly handling disks over 4 TiB in size. 140cf200d32Sopenharmony_ci 141cf200d32Sopenharmony_ci- Minor tweaks to get the software to compile on FreeBSD; that seems to have 142cf200d32Sopenharmony_ci fallen into disrepair. 143cf200d32Sopenharmony_ci 144cf200d32Sopenharmony_ci1.0.5 (2/17/2020): 145cf200d32Sopenharmony_ci------------------ 146cf200d32Sopenharmony_ci 147cf200d32Sopenharmony_ci- Fixed typos and minor formatting issues in man pages 148cf200d32Sopenharmony_ci 149cf200d32Sopenharmony_ci- Changed number of columns in type code output ("sgdisk -L" and equivalents 150cf200d32Sopenharmony_ci in gdisk and cgdisk) from 3 to 2, since some descriptions are long enough 151cf200d32Sopenharmony_ci that they're ambiguous with three columns. 152cf200d32Sopenharmony_ci 153cf200d32Sopenharmony_ci- Makefile change: Add $(LDLIBS) support to enable clean static builds (for 154cf200d32Sopenharmony_ci libintl). 155cf200d32Sopenharmony_ci 156cf200d32Sopenharmony_ci- You can now put the 0xEE partition last in a hybrid MBR using sgdisk. 157cf200d32Sopenharmony_ci (Previously, this was possible with gdisk but not with sgdisk.) See the 158cf200d32Sopenharmony_ci sgdisk man page for details. 159cf200d32Sopenharmony_ci 160cf200d32Sopenharmony_ci- Added numerous type codes for Container Linux, Veracrypt, and 161cf200d32Sopenharmony_ci Freedesktop.org's Discoverable Partitions Specification 162cf200d32Sopenharmony_ci 163cf200d32Sopenharmony_ci- Partition type name searches are now case-insensitive. 164cf200d32Sopenharmony_ci 165cf200d32Sopenharmony_ci- It's now possible to quit out of partition type name searches by typing 166cf200d32Sopenharmony_ci "q". 167cf200d32Sopenharmony_ci 168cf200d32Sopenharmony_ci- When changing a partition type code, the default is now the current 169cf200d32Sopenharmony_ci type code, not a platform-specific type code. 170cf200d32Sopenharmony_ci 171cf200d32Sopenharmony_ci- The UEFI GPT fdisk project 172cf200d32Sopenharmony_ci (https://sourceforge.net/projects/uefigptfdisk/) hasn't been updated since 173cf200d32Sopenharmony_ci 2016, and is now broken; binaries don't compile with modern GCC 174cf200d32Sopenharmony_ci toolchains, and even when dropping back to Ubuntu 14.04, which worked for 175cf200d32Sopenharmony_ci GPT fdisk 1.0.4, the resulting binary hangs on launch. Therefore, I'm 176cf200d32Sopenharmony_ci dropping support for the EFI build of gdisk, at least unless and until 177cf200d32Sopenharmony_ci UEFI GPT fdisk is fixed. 178cf200d32Sopenharmony_ci 179cf200d32Sopenharmony_ci- Apple no longer supports building i386 or "fat" binaries in XCode (or if 180cf200d32Sopenharmony_ci they do, they're making it hard), so I've removed that support. GPT fdisk 181cf200d32Sopenharmony_ci macOS binaries are now x86-64 only. Similarly, building now seems to 182cf200d32Sopenharmony_ci require macOS 10.9 or later, so that's now the minimum macOS version. I've 183cf200d32Sopenharmony_ci also re-built my Mac build environment and tweaked Makefile.mac 184cf200d32Sopenharmony_ci appropriately. 185cf200d32Sopenharmony_ci 186cf200d32Sopenharmony_ci1.0.4 (7/5/2018): 187cf200d32Sopenharmony_ci----------------- 188cf200d32Sopenharmony_ci 189cf200d32Sopenharmony_ci- Added some explicit copy constructors and made some other tweaks to avoid 190cf200d32Sopenharmony_ci compiler warnings. 191cf200d32Sopenharmony_ci 192cf200d32Sopenharmony_ci- The macOS binary for sgdisk is now a pure 64-bit build; I'm no longer 193cf200d32Sopenharmony_ci supporting 32-bit builds of sgdisk. The gdisk and cgdisk binaries remain 194cf200d32Sopenharmony_ci "fat" 32-/64-bit builds. The reason for dropping the 32-bit support from 195cf200d32Sopenharmony_ci sgdisk is that I've re-built my macOS development system, and I had 196cf200d32Sopenharmony_ci trouble building a "fat" binary with the fresh install of the popt 197cf200d32Sopenharmony_ci libraries upon which sgdisk relies. 32-bit support for the other binaries 198cf200d32Sopenharmony_ci is now officially deprecated, too. 199cf200d32Sopenharmony_ci 200cf200d32Sopenharmony_ci- Added search feature to partition type list functions ("L" on main menu of 201cf200d32Sopenharmony_ci gdisk and "L" when entered in response to the "Hex code or GUID" prompt in 202cf200d32Sopenharmony_ci gdisk and sgdisk). This feature filters the partition type list to those 203cf200d32Sopenharmony_ci which include the search term in their GPT fdisk descriptions. For 204cf200d32Sopenharmony_ci instance, typing "Linux" shows only partitions with "Linux" in their 205cf200d32Sopenharmony_ci descriptions. Note that the search/filter is case-sensitive. If <Enter> is 206cf200d32Sopenharmony_ci pressed, no filter is applied. 207cf200d32Sopenharmony_ci 208cf200d32Sopenharmony_ci- Change to Makefile.mac to use standard libncurses rather than a 3rd-party 209cf200d32Sopenharmony_ci version; should help with cgdisk compatibility. 210cf200d32Sopenharmony_ci 211cf200d32Sopenharmony_ci- Minor bug fix in alignment of internal data structures. 212cf200d32Sopenharmony_ci 213cf200d32Sopenharmony_ci- Minor bug fix in handling of damaged disks. Also, GPT fdisk now reports 214cf200d32Sopenharmony_ci more information on what data structures are damaged when a damaged disk 215cf200d32Sopenharmony_ci is detected. 216cf200d32Sopenharmony_ci 217cf200d32Sopenharmony_ci- Added type code for Apple APFS (7C3457EF-0000-11AA-AA11-00306543ECAC, 218cf200d32Sopenharmony_ci 0xaf0a). 219cf200d32Sopenharmony_ci 220cf200d32Sopenharmony_ci- Added type code for Atari TOS basic data (0xa200, 221cf200d32Sopenharmony_ci 734E5AFE-F61A-11E6-BC64-92361F002671). 222cf200d32Sopenharmony_ci 223cf200d32Sopenharmony_ci- Added type codes for Linux dm-crypt (0x8308, 224cf200d32Sopenharmony_ci 7FFEC5C9-2D00-49B7-8941-3EA10A5586B7) and LUKS (0x8309, 225cf200d32Sopenharmony_ci CA7D7CCB-63ED-4C53-861C-1742536059CC) partitions. 226cf200d32Sopenharmony_ci 227cf200d32Sopenharmony_ci- Added 18 Ceph partition type codes. 228cf200d32Sopenharmony_ci 229cf200d32Sopenharmony_ci- Added 52 (yes, 52!) Android partition type codes. 230cf200d32Sopenharmony_ci 231cf200d32Sopenharmony_ci- Changed "Creating new GPT entries" message to read "Creating new 232cf200d32Sopenharmony_ci GPT entries in memory" because the latter is clearer, particularly when 233cf200d32Sopenharmony_ci using sgdisk with a non-destructive option, like "-p". 234cf200d32Sopenharmony_ci 235cf200d32Sopenharmony_ci1.0.3 (7/27/2017): 236cf200d32Sopenharmony_ci------------------ 237cf200d32Sopenharmony_ci 238cf200d32Sopenharmony_ci- Fixed a major bug that caused invalid partition tables to be generated 239cf200d32Sopenharmony_ci when creating a new partition table (that is, partitioning a blank disk or 240cf200d32Sopenharmony_ci converting from MBR). 241cf200d32Sopenharmony_ci 242cf200d32Sopenharmony_ci1.0.2 (7/26/2017): 243cf200d32Sopenharmony_ci------------------ 244cf200d32Sopenharmony_ci 245cf200d32Sopenharmony_ci- On Linux, the p/-p/--print command now shows the disk's model name, as 246cf200d32Sopenharmony_ci reported in /sys/block/sda/device/model (or equivalent filenames for other 247cf200d32Sopenharmony_ci disks). This feature does not yet work on other platforms, on which the 248cf200d32Sopenharmony_ci model name line is omitted from the output. This line is also not shown 249cf200d32Sopenharmony_ci when accessing disk image files, even on Linux. 250cf200d32Sopenharmony_ci 251cf200d32Sopenharmony_ci- GPT fdisk can now report both the physical and logical sector sizes of 252cf200d32Sopenharmony_ci disks, but only on 2.6.32 and later Linux kernels. The verify feature now 253cf200d32Sopenharmony_ci uses the larger of the set alignment and physical/logical block sizes for 254cf200d32Sopenharmony_ci testing alignment, and setting alignment to something other than an exact 255cf200d32Sopenharmony_ci multiple of the ratio of the physical to logical block size results in a 256cf200d32Sopenharmony_ci warning. 257cf200d32Sopenharmony_ci 258cf200d32Sopenharmony_ci- Addition of new verification checks, mostly (but not exclusively) related 259cf200d32Sopenharmony_ci to the new j/-j/--move-main-table option. 260cf200d32Sopenharmony_ci 261cf200d32Sopenharmony_ci- Added new option: 'j' on the experts' menu in gdisk; 262cf200d32Sopenharmony_ci '-j/--move-main-table={sector}' in sgdisk. This option enables relocating 263cf200d32Sopenharmony_ci the main partition table from sector 2 (the default location) to somewhere 264cf200d32Sopenharmony_ci else on the disk. The main reason I know of to do this is if the disk is 265cf200d32Sopenharmony_ci to be used with a system-on-chip (SoC) computer, some of which require the 266cf200d32Sopenharmony_ci boot loader to be located at sector 2. If you pass this option the default 267cf200d32Sopenharmony_ci value of 2, it has the effect of reducing the padding placed between the 268cf200d32Sopenharmony_ci main partition table and the first usable sector value created by the 269cf200d32Sopenharmony_ci Linux fdisk tool. 270cf200d32Sopenharmony_ci 271cf200d32Sopenharmony_ci- Updated man pages with new recommendations for ESP and BIOS Boot Partition 272cf200d32Sopenharmony_ci sizes. 273cf200d32Sopenharmony_ci 274cf200d32Sopenharmony_ci- Added four type codes (AF06 through AF09) for Apple SoftRAID (Status, 275cf200d32Sopenharmony_ci Scratch, Volume, and Cache). 276cf200d32Sopenharmony_ci 277cf200d32Sopenharmony_ci- Added two type codes for the Open Network Install Environment (ONIE): 278cf200d32Sopenharmony_ci 0xe100 (7412F7D5-A156-4B13-81DC-867174929325) and 0xe101 279cf200d32Sopenharmony_ci (D4E6E2CD-4469-46F3-B5CB-1BFF57AFC149). 280cf200d32Sopenharmony_ci 281cf200d32Sopenharmony_ci- Added thirteen type codes for Android partitions (0xa000 through 282cf200d32Sopenharmony_ci 0xa00c). 283cf200d32Sopenharmony_ci 284cf200d32Sopenharmony_ci- Added type code for QNX6 (aka QNX Power-Safe) filesystem: 0xb300, for 285cf200d32Sopenharmony_ci CEF5A9AD-73BC-4601-89F3-CDEEEEE321A1. 286cf200d32Sopenharmony_ci 287cf200d32Sopenharmony_ci- Removed stray debug message ("REALLY setting name!") from sgdisk, 288cf200d32Sopenharmony_ci when setting new name via -c option. 289cf200d32Sopenharmony_ci 290cf200d32Sopenharmony_ci1.0.1 (10/18/2015): 291cf200d32Sopenharmony_ci------------------- 292cf200d32Sopenharmony_ci 293cf200d32Sopenharmony_ci- Created uninstall-fixparts and uninstall-gdisk scripts for OS X. As the 294cf200d32Sopenharmony_ci names imply, these scripts remove the files installed by the fixparts and 295cf200d32Sopenharmony_ci gdisk packages, respectively. 296cf200d32Sopenharmony_ci 297cf200d32Sopenharmony_ci- Fixed bug that caused -N/--largest-new option to sgdisk to fail when 298cf200d32Sopenharmony_ci fed a "0" option. 299cf200d32Sopenharmony_ci 300cf200d32Sopenharmony_ci- Fixed bug that caused input glitches in EFI version of gdisk. 301cf200d32Sopenharmony_ci 302cf200d32Sopenharmony_ci- Fixed bug that caused sgdisk to not return an appropriate error code 303cf200d32Sopenharmony_ci when it encountered a write error when saving changes. 304cf200d32Sopenharmony_ci 305cf200d32Sopenharmony_ci- Fixed bug that caused cgdisk's "Info" display to under-report the 306cf200d32Sopenharmony_ci partition's size by one sector. 307cf200d32Sopenharmony_ci 308cf200d32Sopenharmony_ci- OS X 10.11 includes new security features that prevent GPT fdisk from 309cf200d32Sopenharmony_ci working unless these features are disabled. To do so, you must boot to a 310cf200d32Sopenharmony_ci Recovery HD system, open a Terminal, type "csrutil disable", and reboot 311cf200d32Sopenharmony_ci into the normal system. You can re-enable the security features by 312cf200d32Sopenharmony_ci repeating the process, but specify "enable" rather than "disable". I've 313cf200d32Sopenharmony_ci added a message pointing users to a Web page explaining how to disable 314cf200d32Sopenharmony_ci this feature when gdisk detects that it can't write to the disk under OS 315cf200d32Sopenharmony_ci X. If you know of a way around this (including code changes to gdisk), 316cf200d32Sopenharmony_ci please contact me. 317cf200d32Sopenharmony_ci 318cf200d32Sopenharmony_ci- I've updated the OS X installation location from the Unix-standard 319cf200d32Sopenharmony_ci /usr/sbin (and related locations for documentation) to /usr/local/bin 320cf200d32Sopenharmony_ci (and related locations for documentation). This is Just Plain Crazy from 321cf200d32Sopenharmony_ci a Unix point of view, but Apple has to be Apple and do things just a 322cf200d32Sopenharmony_ci little bit differently. 323cf200d32Sopenharmony_ci 324cf200d32Sopenharmony_ci- I've updated my OS X environment to OS X 10.11 and LLVM 7.0.0. This has 325cf200d32Sopenharmony_ci also meant installing fresh versions of popt and ncurses from MacPorts, 326cf200d32Sopenharmony_ci which may require upgrading popt to get sgdisk working on some systems. 327cf200d32Sopenharmony_ci (gdisk, cgdisk, and fixparts should continue to work normally on all 328cf200d32Sopenharmony_ci systems.) The OS X binaries are now "fat" (32- and 64-bit) versions, 329cf200d32Sopenharmony_ci which should have no noticeable effect unless you have a Mac with broken 330cf200d32Sopenharmony_ci 32-bit support, in which case the binaries will now work. 331cf200d32Sopenharmony_ci 332cf200d32Sopenharmony_ci- Changed the default name of 0xab00 partitions from "Apple boot" to 333cf200d32Sopenharmony_ci "Recovery HD", since the latter is the name that Apple gives these 334cf200d32Sopenharmony_ci partitions. Also, I discovered through painful experience that OS X 335cf200d32Sopenharmony_ci flakes out and won't boot if the name is something other than "Recovery 336cf200d32Sopenharmony_ci HD", so it really has to have the right name! 337cf200d32Sopenharmony_ci 338cf200d32Sopenharmony_ci- Changed the OpenBSD type codes (0xa600 and 0xa601): 0xa600 is now 339cf200d32Sopenharmony_ci 824CC7A0-36A8-11E3-890A-952519AD3F61 (OpenBSD disklabel) and 0xa601 is 340cf200d32Sopenharmony_ci now gone. Previously, 0xa600 was 516E7CB4-6ECF-11D6-8FF8-00022D09712B, a 341cf200d32Sopenharmony_ci duplicate of the FreeBSD disklabel, and 0xa601 was 342cf200d32Sopenharmony_ci 824CC7A0-36A8-11E3-890A-952519AD3F61. OpenBSD is now officially 343cf200d32Sopenharmony_ci supporting 824CC7A0-36A8-11E3-890A-952519AD3F61 as a disklabel type, 344cf200d32Sopenharmony_ci though. It's unclear what, if anything, OpenBSD will use for 345cf200d32Sopenharmony_ci non-disklabel type codes at the moment. 346cf200d32Sopenharmony_ci 347cf200d32Sopenharmony_ci- Added GUID 0311FC50-01CA-4725-AD77-9ADBB20ACE98 (0xbc00) for 348cf200d32Sopenharmony_ci Acronis Secure Zone backup partitions. 349cf200d32Sopenharmony_ci 350cf200d32Sopenharmony_ci- Fixed bug that caused random crashes on ppc64el systems (and perhaps 351cf200d32Sopenharmony_ci others). 352cf200d32Sopenharmony_ci 353cf200d32Sopenharmony_ci- Added GUID C91818F9-8025-47AF-89D2-F030D7000C2C (0x3900) for Plan 9. 354cf200d32Sopenharmony_ci 355cf200d32Sopenharmony_ci- Added GUID 69DAD710-2CE4-4E3C-B16C-21A1D49ABED3 (0x8307) for 32-bit ARM 356cf200d32Sopenharmony_ci Linux root (/) partition, as per the Freedesktop.org Discoverable 357cf200d32Sopenharmony_ci Partition Spec 358cf200d32Sopenharmony_ci (http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/). 359cf200d32Sopenharmony_ci 360cf200d32Sopenharmony_ci- Edited man pages to clarify that default alignment is to 1MiB boundaries; 361cf200d32Sopenharmony_ci this translates to 2048 sectors on disks with 512-byte sectors, but it 362cf200d32Sopenharmony_ci will be something else on disks with other sector sizes. 363cf200d32Sopenharmony_ci 364cf200d32Sopenharmony_ci- Changed behavior of -z/--zap and -Z/--zap-all options to sgdisk so that 365cf200d32Sopenharmony_ci if a subsequent command causes changes, they'll be written to disk. 366cf200d32Sopenharmony_ci Previously, doing something like "sgdisk --zap-all --clear /dev/sdd" 367cf200d32Sopenharmony_ci would wipe the disk but not create a partition table; to create a blank 368cf200d32Sopenharmony_ci table you'd need to do "sgdisk --zap-all --clear --mbrtogpt /dev/sdd", 369cf200d32Sopenharmony_ci which is a bit odd and counter-intuitive, to the point of arguably being 370cf200d32Sopenharmony_ci a bug. 371cf200d32Sopenharmony_ci 372cf200d32Sopenharmony_ci1.0.0 (3/16/2015): 373cf200d32Sopenharmony_ci------------------ 374cf200d32Sopenharmony_ci 375cf200d32Sopenharmony_ci- I'm now building a binary package of gdisk_x64.efi, using the UEFI GPT 376cf200d32Sopenharmony_ci fdisk package. 377cf200d32Sopenharmony_ci 378cf200d32Sopenharmony_ci- Added partition type for OpenBSD data 379cf200d32Sopenharmony_ci (824CC7A0-36A8-11E3-890A-952519AD3F61/0xa601). Also mapped 0xa600 to the 380cf200d32Sopenharmony_ci FreeBSD disklabel type code (516E7CB4-6ECF-11D6-8FF8-00022D09712B). I'm 381cf200d32Sopenharmony_ci not sure that's 100% correct, but since I can't find references to an 382cf200d32Sopenharmony_ci OpenBSD disklabel GPT type code, it seems the best choice at the moment. 383cf200d32Sopenharmony_ci 384cf200d32Sopenharmony_ci- Added partition type for Windows Storage Spaces 385cf200d32Sopenharmony_ci (E75CAF8F-F680-4CEE-AFA3-B001E56EFC2D/0x4202) 386cf200d32Sopenharmony_ci 387cf200d32Sopenharmony_ci- Added -O/--print-mbr option to sgdisk, enabling easier display of MBR 388cf200d32Sopenharmony_ci data structures without invoking gdisk. 389cf200d32Sopenharmony_ci 390cf200d32Sopenharmony_ci- Updated warning message: "EBR describes a logical partition" now reads 391cf200d32Sopenharmony_ci "EBR points to an EBR," which is more technically correct. 392cf200d32Sopenharmony_ci 393cf200d32Sopenharmony_ci- Altered warning displayed when run from Windows on non-GPT disk, because 394cf200d32Sopenharmony_ci Windows on UEFI-based systems is becoming more common. 395cf200d32Sopenharmony_ci 396cf200d32Sopenharmony_ci- Fixed spurious "1" return value in gdisk. 397cf200d32Sopenharmony_ci 398cf200d32Sopenharmony_ci- Small code changes to support compilation as EFI application with the 399cf200d32Sopenharmony_ci UEFI GPT fdisk library 400cf200d32Sopenharmony_ci (http://sourceforge.net/projects/uefigptfdisk/?source=directory) 401cf200d32Sopenharmony_ci 402cf200d32Sopenharmony_ci- Added new partition type codes for Ceph 403cf200d32Sopenharmony_ci (https://github.com/ceph/ceph/blob/9bcc42a3e6b08521694b5c0228b2c6ed7b3d312e/src/ceph-disk#L76-L81): 404cf200d32Sopenharmony_ci 4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D/0xf800 (Ceph OSD), 405cf200d32Sopenharmony_ci 4FBD7E29-9D25-41B8-AFD0-5EC00CEFF05D/0xf801 (Ceph dm-crypt OSD), 406cf200d32Sopenharmony_ci 45B0969E-9B03-4F30-B4C6-B4B80CEFF106/0xf802 (Ceph journal), 407cf200d32Sopenharmony_ci 45B0969E-9B03-4F30-B4C6-5EC00CEFF106/0xf803 (Ceph dm-crypt journal), 408cf200d32Sopenharmony_ci 89C57F98-2FE5-4DC0-89C1-F3AD0CEFF2BE/0xf804 (Ceph disk in creation), and 409cf200d32Sopenharmony_ci 89C57F98-2FE5-4DC0-89C1-5EC00CEFF2BE/0xf805 (Ceph dm-crypt disk in 410cf200d32Sopenharmony_ci creation) 411cf200d32Sopenharmony_ci 412cf200d32Sopenharmony_ci- Added new partition type codes from 413cf200d32Sopenharmony_ci http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/: 414cf200d32Sopenharmony_ci 44479540-F297-41B2-9AF7-D131D5F0458A/0x8303 (Linux / on x86), 415cf200d32Sopenharmony_ci 4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709/0x8304 (Linux / on x86-64), 416cf200d32Sopenharmony_ci B921B045-1DF0-41C3-AF44-4C6F280D3FAE/0x8305 (Linux / on 64-bit ARM), 417cf200d32Sopenharmony_ci 3B8F8425-20E0-4F3B-907F-1A25A76F98E8/0x8306 (Linux /srv). 418cf200d32Sopenharmony_ci 419cf200d32Sopenharmony_ci0.8.10 (3/2/2014): 420cf200d32Sopenharmony_ci------------------ 421cf200d32Sopenharmony_ci 422cf200d32Sopenharmony_ci- Added feature to sgdisk's -A/--attributes, -c/--change-name, 423cf200d32Sopenharmony_ci -t/--typecode, and -u/--partition-guid commands: If a -n/--new option 424cf200d32Sopenharmony_ci with "0" as the partition number precedes these options on the command 425cf200d32Sopenharmony_ci line, passin "0" as the partition number to the following options causes 426cf200d32Sopenharmony_ci them to use the newly-created partition. For instance, "sgdisk -n 427cf200d32Sopenharmony_ci 0:0:+550M -t 0:EF00 /dev/sda" creates a new partition with a type code of 428cf200d32Sopenharmony_ci EF00. (Previous versions would ignore the "-t 0:EF00" option.) 429cf200d32Sopenharmony_ci 430cf200d32Sopenharmony_ci- Fixed bug that caused incorrect partition number to be displayed by 431cf200d32Sopenharmony_ci sgdisk in error messages when the user specified a non-existent partition 432cf200d32Sopenharmony_ci for inclusion in a hybrid MBR or conversion to a conventional MBR. 433cf200d32Sopenharmony_ci 434cf200d32Sopenharmony_ci- Fixed new (in 0.8.9) bug that caused a failure to create more than one 435cf200d32Sopenharmony_ci hybridized partition when creating a hybrid MBR. 436cf200d32Sopenharmony_ci 437cf200d32Sopenharmony_ci- Fixed bug that caused gdisk and sgdisk to create hybridized partitions 438cf200d32Sopenharmony_ci that ended at or above the 2^32 sector point with incorrect end values. 439cf200d32Sopenharmony_ci The behavior now varies between gdisk and sgdisk: gdisk now creates 440cf200d32Sopenharmony_ci hybrid partitions that begin below 2^32 sectors and that are smaller than 441cf200d32Sopenharmony_ci 2^32 sectors, since this is technically legal; but gdisk displays a 442cf200d32Sopenharmony_ci warning, because some OSes (such as DOS, Windows XP, OS/2, and BeOS) 443cf200d32Sopenharmony_ci misbehave with such partitions. AFAIK, only Linux, FreeBSD, and Windows 7 444cf200d32Sopenharmony_ci work properly with such partitions. Because of this fact and because 445cf200d32Sopenharmony_ci sgdisk is a more automated tool, it's stricter in how it handles things: 446cf200d32Sopenharmony_ci It refuses to create a hybrid partition if the original ends at or above 447cf200d32Sopenharmony_ci the 2^32 sector mark. 448cf200d32Sopenharmony_ci 449cf200d32Sopenharmony_ci0.8.9 (2/17/2014): 450cf200d32Sopenharmony_ci------------------ 451cf200d32Sopenharmony_ci 452cf200d32Sopenharmony_ci- Removed dependency on libicu for UTF-16 support. 453cf200d32Sopenharmony_ci 454cf200d32Sopenharmony_ci- Fixed spurious "0xEE partition doesn't start on sector 1" warning in 455cf200d32Sopenharmony_ci FixParts (and perhaps in other programs under some circumstances). 456cf200d32Sopenharmony_ci 457cf200d32Sopenharmony_ci- Added GPT regeneration command to GPT-destruction options ('z' in gdisk, 458cf200d32Sopenharmony_ci -z and -Z options to sgdisk). This is done to avoid wiping out data 459cf200d32Sopenharmony_ci mid-disk that might not be backup GPT data structures, which could 460cf200d32Sopenharmony_ci otherwise occur if a RAID array was resized in certain ways. 461cf200d32Sopenharmony_ci 462cf200d32Sopenharmony_ci- Added check for an oversized 0xEE protective partition. The program now 463cf200d32Sopenharmony_ci auto-repairs this condition on loading if the GPT data seem otherwise 464cf200d32Sopenharmony_ci valid. This is done because I've been receiving reports of some disks 465cf200d32Sopenharmony_ci (possibly from some OEM Windows 8 loads) that violate the GPT spec in 466cf200d32Sopenharmony_ci this way, and gdisk was reporting write errors when saving data. 467cf200d32Sopenharmony_ci 468cf200d32Sopenharmony_ci- If the GPT data seem to be damaged in some way or if the disk seems to 469cf200d32Sopenharmony_ci be a hybrid MBR and if the MBR partition(s) don't fit on the disk, the 470cf200d32Sopenharmony_ci verify (v) function now warns of this condition, and writing the disk if 471cf200d32Sopenharmony_ci it exists also displays a more specific error message about the problem. 472cf200d32Sopenharmony_ci 473cf200d32Sopenharmony_ci- Added new type codes (3000, 7412F7D5-A156-4B13-81DC-867174929325 and 474cf200d32Sopenharmony_ci 3001, D4E6E2CD-4469-46F3-B5CB-1BFF57AFC149) for Open Network Install 475cf200d32Sopenharmony_ci Environment (ONIE) boot and config partitions, respectively. 476cf200d32Sopenharmony_ci 477cf200d32Sopenharmony_ci- Added new type ccde (ED01, BFBFAFE7-A34F-448A-9A5B-6213EB736C22), for 478cf200d32Sopenharmony_ci Lenovo's ESP-like partition. 479cf200d32Sopenharmony_ci 480cf200d32Sopenharmony_ci0.8.8 (10/14/2013): 481cf200d32Sopenharmony_ci------------------- 482cf200d32Sopenharmony_ci 483cf200d32Sopenharmony_ci- Fixed bug that could cause segfault when passing an invalid partition 484cf200d32Sopenharmony_ci number to sgdisk's -i/--info command. 485cf200d32Sopenharmony_ci 486cf200d32Sopenharmony_ci- Added new type code: 933AC7E1-2EB4-4F13-B844-0E14E2AEF915, or gdisk code 487cf200d32Sopenharmony_ci 8302, for Linux /home partitions. This type code is used by recent 488cf200d32Sopenharmony_ci versions of systemd to permit /home to be auto-mounted; see 489cf200d32Sopenharmony_ci http://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html 490cf200d32Sopenharmony_ci for details. 491cf200d32Sopenharmony_ci 492cf200d32Sopenharmony_ci- Added new type code: 9E1A2D38-C612-4316-AA26-8B49521E5A8B, or gdisk code 493cf200d32Sopenharmony_ci 4100, for PowerPC PReP (PowerPC reference platform) boot. 494cf200d32Sopenharmony_ci 495cf200d32Sopenharmony_ci- The number of partition type codes has grown large enough that it fills 496cf200d32Sopenharmony_ci an 80x24 display. I've therefore added a pause (with a prompt to hit 497cf200d32Sopenharmony_ci <Enter>) to display more items after showing 21 lines in gdisk or after 498cf200d32Sopenharmony_ci the screen has nearly filled with entries in cgdisk. There's no such 499cf200d32Sopenharmony_ci pause/prompt in sgdisk, though. 500cf200d32Sopenharmony_ci 501cf200d32Sopenharmony_ci- Fine-tuned verification ('v') check for 0xEE partition that doesn't begin 502cf200d32Sopenharmony_ci on sector 1: Previously, a disk with multiple 0xEE partitions would 503cf200d32Sopenharmony_ci always trigger this warning. Now, the warning occurs only if NONE of the 504cf200d32Sopenharmony_ci 0xEE partitions begins on sector 1. 505cf200d32Sopenharmony_ci 506cf200d32Sopenharmony_ci- Fixed hybrid MBR creation on disks larger than 2TiB: Previously, if one 507cf200d32Sopenharmony_ci opted to create an extra partition to cover unused space following 508cf200d32Sopenharmony_ci hybridized partitions, gdisk would hang. 509cf200d32Sopenharmony_ci 510cf200d32Sopenharmony_ci- Added check for an active/bootable 0xEE protective partition to the 511cf200d32Sopenharmony_ci verify ('v') function. If found, this is not counted as an error, but 512cf200d32Sopenharmony_ci it is called out to the user, since it can cause some EFIs (such as 513cf200d32Sopenharmony_ci VirtualBox's EFI) to ignore the disk. 514cf200d32Sopenharmony_ci 515cf200d32Sopenharmony_ci0.8.7 (7/8/2013): 516cf200d32Sopenharmony_ci----------------- 517cf200d32Sopenharmony_ci 518cf200d32Sopenharmony_ci- Modified Mac version so that it can work on /dev/rdisk* devices as well 519cf200d32Sopenharmony_ci as /dev/disk* devices. The result is that, when using the /dev/rdisk* 520cf200d32Sopenharmony_ci devices, the partition table can sometimes be re-read without removing 521cf200d32Sopenharmony_ci the disk or rebooting. 522cf200d32Sopenharmony_ci 523cf200d32Sopenharmony_ci- Added "-a" option to cgdisk to use a ">" symbol to the left of the 524cf200d32Sopenharmony_ci selected partition rather than ncurses highlighting. 525cf200d32Sopenharmony_ci 526cf200d32Sopenharmony_ci- Modified "converting MBR to GPT" message to clarify that the conversion 527cf200d32Sopenharmony_ci is being held in memory, since some people have mistakenly assumed that a 528cf200d32Sopenharmony_ci "gdisk -l" operation will change an MBR disk to a GPT disk without 529cf200d32Sopenharmony_ci prompting. 530cf200d32Sopenharmony_ci 531cf200d32Sopenharmony_ci- Added partition type code for freedesktop.org's proposed $BOOT partition 532cf200d32Sopenharmony_ci (bc13c2ff-59e6-4262-a352-b275fd6f7172; GPT fdisk type code EA00) 533cf200d32Sopenharmony_ci 534cf200d32Sopenharmony_ci- Adjusted alignment code when using -n or -N in sgdisk to keep the 535cf200d32Sopenharmony_ci requested partition size (if specified using +###{MGT} terminology) 536cf200d32Sopenharmony_ci as the requested value rather than relative to the requested start 537cf200d32Sopenharmony_ci point. This gives you the requested partition size rather than be 538cf200d32Sopenharmony_ci slightly smaller if sgdisk needs to adjust the start point up a bit and 539cf200d32Sopenharmony_ci it prevents gaps from appearing between partitions if several are created 540cf200d32Sopenharmony_ci in succession using automatic placement of the start point. 541cf200d32Sopenharmony_ci 542cf200d32Sopenharmony_ci- Fixed small bugs in gdisk_test.sh script. 543cf200d32Sopenharmony_ci 544cf200d32Sopenharmony_ci- Removed stray debug message that would appear when reading MBR disks. 545cf200d32Sopenharmony_ci 546cf200d32Sopenharmony_ci- Added partition type code for Intel Rapid Start partition (GUID 547cf200d32Sopenharmony_ci D3BFE2DE-3DAF-11DF-BA40-E3A556D89593, code 8400), used by systems that 548cf200d32Sopenharmony_ci implement Intel's Rapid Start technology. See 549cf200d32Sopenharmony_ci http://blog.adios.tw/2012/10/funtoo-linux-and-intel-rapid-start.html or 550cf200d32Sopenharmony_ci http://mjg59.dreamwidth.org/26022.html. 551cf200d32Sopenharmony_ci 552cf200d32Sopenharmony_ci- Added partition type code for Haiku BFS (GUID 553cf200d32Sopenharmony_ci 42465331-3BA3-10F1-802A-4861696B7521; code EB00). 554cf200d32Sopenharmony_ci 555cf200d32Sopenharmony_ci0.8.6 (1/9/2013): 556cf200d32Sopenharmony_ci----------------- 557cf200d32Sopenharmony_ci 558cf200d32Sopenharmony_ci- Fixed a bug that could cause sgdisk to crash when passing a partition 559cf200d32Sopenharmony_ci number of 0 to the -t option. 560cf200d32Sopenharmony_ci 561cf200d32Sopenharmony_ci- Added support for building under Solaris. 562cf200d32Sopenharmony_ci 563cf200d32Sopenharmony_ci- Added a new check to the verification code. 564cf200d32Sopenharmony_ci 565cf200d32Sopenharmony_ci- Added partition type code for Sony system partition 566cf200d32Sopenharmony_ci (F4019732-066E-4E12-8273-346C5641494F). I'm not entirely clear what this 567cf200d32Sopenharmony_ci is used for, but it's appearing on some new Sony computers. 568cf200d32Sopenharmony_ci 569cf200d32Sopenharmony_ci- Tweaked hybrid MBR creation options to fix a problem that caused the main 570cf200d32Sopenharmony_ci 0xEE MBR partition to NOT be created if the user told gdisk to NOT place 571cf200d32Sopenharmony_ci it at the start of the disk AND IF fewer than three partitions are 572cf200d32Sopenharmony_ci hybridize AND IF the user opted to create a second protective partition. 573cf200d32Sopenharmony_ci 574cf200d32Sopenharmony_ci- Changed default build options for Mac OS X to *NOT* use libicu, 575cf200d32Sopenharmony_ci since it seems to have broken somewhere along the line. It still 576cf200d32Sopenharmony_ci works on Linux, though. 577cf200d32Sopenharmony_ci 578cf200d32Sopenharmony_ci- Added partition type codes for VMWare ESX (FB00, FB01, and FC00). 579cf200d32Sopenharmony_ci 580cf200d32Sopenharmony_ci0.8.5 (5/30/2012): 581cf200d32Sopenharmony_ci------------------ 582cf200d32Sopenharmony_ci 583cf200d32Sopenharmony_ci- Changed code that writes the partition table so that a disk sync 584cf200d32Sopenharmony_ci operation occurs even if one or more write operations failed (but not if 585cf200d32Sopenharmony_ci they all failed). This is intended to work around a bug that a user 586cf200d32Sopenharmony_ci reported on a Windows system on which the write of the protective MBR 587cf200d32Sopenharmony_ci failed, although everything else worked. (I suspect anti-virus software 588cf200d32Sopenharmony_ci may have been blocking write access to the MBR.) 589cf200d32Sopenharmony_ci 590cf200d32Sopenharmony_ci- Added type codes for Midnight BSD (0xA580 - 0xA585). I used these codes 591cf200d32Sopenharmony_ci because Midnight BSD uses the same 0xA5 type code as FreeBSD on MBR 592cf200d32Sopenharmony_ci disks, so I'm starting Midnight BSD's numbering halfway through the 593cf200d32Sopenharmony_ci 0xA5## range. 594cf200d32Sopenharmony_ci 595cf200d32Sopenharmony_ci0.8.4 (3/25/2012): 596cf200d32Sopenharmony_ci------------------ 597cf200d32Sopenharmony_ci 598cf200d32Sopenharmony_ci- REALLY fixed Ctrl+D problems! Now gdisk terminates upon receiving a 599cf200d32Sopenharmony_ci Ctrl+D. In all previous versions, it could lock itself into a CPU-hogging 600cf200d32Sopenharmony_ci loop if launched via "sudo" from a terminal window that was then closed 601cf200d32Sopenharmony_ci or if Ctrl+D was pressed at certain input prompts (for a partition name 602cf200d32Sopenharmony_ci or sector number, for instance). 603cf200d32Sopenharmony_ci 604cf200d32Sopenharmony_ci0.8.3 (3/23/2012): 605cf200d32Sopenharmony_ci------------------ 606cf200d32Sopenharmony_ci 607cf200d32Sopenharmony_ci- Fixed compilation problem on GCC 4.7. 608cf200d32Sopenharmony_ci 609cf200d32Sopenharmony_ci- Improved handling of Ctrl+D on some systems. 610cf200d32Sopenharmony_ci 611cf200d32Sopenharmony_ci- Added disk's name to message stating that a disk write was successful. 612cf200d32Sopenharmony_ci 613cf200d32Sopenharmony_ci- Fixed bug that caused creation of >2TiB partitions on 32-bit systems to 614cf200d32Sopenharmony_ci be truncated in sgdisk. 615cf200d32Sopenharmony_ci 616cf200d32Sopenharmony_ci0.8.2 (1/22/2012): 617cf200d32Sopenharmony_ci------------------ 618cf200d32Sopenharmony_ci 619cf200d32Sopenharmony_ci- Adjusted the code to support a number of partitions that's not a multiple 620cf200d32Sopenharmony_ci of the number of partition table entries that fits in a sector (normally 621cf200d32Sopenharmony_ci 4 per sector). The program still rounds up, when necessary, when resizing 622cf200d32Sopenharmony_ci the partition table manually, but not when loading a partition table that 623cf200d32Sopenharmony_ci contains a peculiar number of partitions. This helps prevent spurious 624cf200d32Sopenharmony_ci error messages about CRC problems when loading some Solaris partition 625cf200d32Sopenharmony_ci tables. 626cf200d32Sopenharmony_ci 627cf200d32Sopenharmony_ci- Fixed bugs relating to the handling of empty partitions; Solaris's ZFS 628cf200d32Sopenharmony_ci tools create weird empty partitions that are legal but that gdisk wasn't 629cf200d32Sopenharmony_ci handling properly. (Specifically, they sometimes have non-zero end 630cf200d32Sopenharmony_ci points; gdisk assumed empty partitions had end points of 0.) 631cf200d32Sopenharmony_ci 632cf200d32Sopenharmony_ci- Fixed a bug that caused an infinite loop of input prompts if the user 633cf200d32Sopenharmony_ci pressed Ctrl+D. 634cf200d32Sopenharmony_ci 635cf200d32Sopenharmony_ci- Changed gdisk's first-sector input operation to specify a sector number 636cf200d32Sopenharmony_ci that's properly aligned as the default value. This eliminates the need 637cf200d32Sopenharmony_ci to alter that value and notify the user of the change when the user 638cf200d32Sopenharmony_ci hits "Enter" for the default value as the first partition on an empty 639cf200d32Sopenharmony_ci disk (as well as in some other situations). 640cf200d32Sopenharmony_ci 641cf200d32Sopenharmony_ci0.8.1 (10/1/2011): 642cf200d32Sopenharmony_ci------------------ 643cf200d32Sopenharmony_ci 644cf200d32Sopenharmony_ci- Fixed bug that could cause FixParts to keep a partition's assignment 645cf200d32Sopenharmony_ci as logical when FixPart could not actually do so. This could happen 646cf200d32Sopenharmony_ci when there are no gaps between two logical partitions. Some partitioning 647cf200d32Sopenharmony_ci tools can create such configurations, but FixParts can't. Such 648cf200d32Sopenharmony_ci configurations are extremely rare. I've only encountered them when 649cf200d32Sopenharmony_ci logical partitions are out of order. 650cf200d32Sopenharmony_ci 651cf200d32Sopenharmony_ci- Added code to detect infinite loops of logical partitions when reading 652cf200d32Sopenharmony_ci MBR data. When detected, the program now stops reading after the first 653cf200d32Sopenharmony_ci loop, so no duplicates appear in the partition list. 654cf200d32Sopenharmony_ci 655cf200d32Sopenharmony_ci- Fixed bug in partition overlap detection in MBR code. 656cf200d32Sopenharmony_ci 657cf200d32Sopenharmony_ci- Changed GPT reading code to use the size encoded in GPT headers to 658cf200d32Sopenharmony_ci determine how much of the header to use in computing a CRC, with the 659cf200d32Sopenharmony_ci restriction that the size be equal to or less than the disk's sector 660cf200d32Sopenharmony_ci size. This should work around problems with libefi in ZFS, which sets the 661cf200d32Sopenharmony_ci header size to 512 rather than the more common 92. A caveat: If the 662cf200d32Sopenharmony_ci disk's sector size is larger than the GPTHeader data structure size (512 663cf200d32Sopenharmony_ci bytes), then the rest of the sector's contents are ignored and replaced 664cf200d32Sopenharmony_ci with 0 values. This could produce false positives on CRC checks on disks 665cf200d32Sopenharmony_ci with over-512-byte sector sizes if the header sector is padded with 666cf200d32Sopenharmony_ci something other than 0 values. 667cf200d32Sopenharmony_ci 668cf200d32Sopenharmony_ci- Fixed bug in new (as of 0.8.0) check that main and backup partition 669cf200d32Sopenharmony_ci tables are identical on big-endian (PowerPC, etc.) hardware. 670cf200d32Sopenharmony_ci 671cf200d32Sopenharmony_ci0.8.0 (9/10/2011): 672cf200d32Sopenharmony_ci------------------ 673cf200d32Sopenharmony_ci 674cf200d32Sopenharmony_ci- Added new return option for sgdisk: 8, which means that a replication 675cf200d32Sopenharmony_ci operation (-R or --replicate) failed. Note that other operations on 676cf200d32Sopenharmony_ci the same command line might still have succeeded. 677cf200d32Sopenharmony_ci 678cf200d32Sopenharmony_ci- Added gdisk_test.sh shell script, contributed by Guillaume Delacour. 679cf200d32Sopenharmony_ci This script tests some common gdisk and sgdisk operations to be sure 680cf200d32Sopenharmony_ci they're working correctly. 681cf200d32Sopenharmony_ci 682cf200d32Sopenharmony_ci- Enable sgdisk's -l (--load-backup) and -o (--clear) options to work 683cf200d32Sopenharmony_ci even on disks that are damaged. Most other options will still be ignored, 684cf200d32Sopenharmony_ci though, so if you suspect a disk may be bad and want to use one of these 685cf200d32Sopenharmony_ci options, you should do so on a line by itself, followed by a separate 686cf200d32Sopenharmony_ci command to perform other actions (such as adding new partitions). 687cf200d32Sopenharmony_ci 688cf200d32Sopenharmony_ci- Added check for mis-matched primary and backup partition tables. 689cf200d32Sopenharmony_ci A mismatch is reported as a CRC error. 690cf200d32Sopenharmony_ci 691cf200d32Sopenharmony_ci- Added Apple Core Storage partition type code (hex code AF05, GUID 692cf200d32Sopenharmony_ci 53746F72-6167-11AA-AA11-00306543ECAC). 693cf200d32Sopenharmony_ci 694cf200d32Sopenharmony_ci- Added cgdisk program to the family. This program is a rough workalike 695cf200d32Sopenharmony_ci to cfdisk, much as gdisk is a rough workalike to fdisk. See the cgdisk 696cf200d32Sopenharmony_ci man page or http://www.rodsbooks.com/gdisk/cgdisk-walkthrough.html for 697cf200d32Sopenharmony_ci details about its operation. 698cf200d32Sopenharmony_ci 699cf200d32Sopenharmony_ci- Fixed bug that caused CHS end point for protective MBR to be set to 700cf200d32Sopenharmony_ci 0xfeffff rather than the spec-mandated 0xffffff on disks over ~8GB. This 701cf200d32Sopenharmony_ci is a very minor bug, since not much cares about this, and most other GPT 702cf200d32Sopenharmony_ci tools get it wrong in the same way, too. 703cf200d32Sopenharmony_ci 704cf200d32Sopenharmony_ci0.7.2 (6/26/2011): 705cf200d32Sopenharmony_ci------------------ 706cf200d32Sopenharmony_ci 707cf200d32Sopenharmony_ci- The Windows version now (finally!) generates proper GUIDs rather than a 708cf200d32Sopenharmony_ci purely random number. This fixes a bug that caused Windows 7 to crash 709cf200d32Sopenharmony_ci when converting a disk from MBR format (but, oddly, not when creating a 710cf200d32Sopenharmony_ci fresh partition table or doing various other things). 711cf200d32Sopenharmony_ci 712cf200d32Sopenharmony_ci- Added a warning when an MBR partition is discarded because it's too 713cf200d32Sopenharmony_ci big for the disk. 714cf200d32Sopenharmony_ci 715cf200d32Sopenharmony_ci- Changed warning to Windows users about the dangers of converting to GPT 716cf200d32Sopenharmony_ci so that it appears only on disks that aren't already in GPT form. 717cf200d32Sopenharmony_ci 718cf200d32Sopenharmony_ci- Fixed bug that caused bogus "3" values to pad the ends of partition names 719cf200d32Sopenharmony_ci on some disks (particularly those created by Microsoft's disk 720cf200d32Sopenharmony_ci partitioning tools). 721cf200d32Sopenharmony_ci 722cf200d32Sopenharmony_ci- Made compilation without Unicode support possible (see README file) 723cf200d32Sopenharmony_ci 724cf200d32Sopenharmony_ci- Made default filesystem type code OS-dependent (based on the compilation 725cf200d32Sopenharmony_ci platform). 726cf200d32Sopenharmony_ci 727cf200d32Sopenharmony_ci- Added new Linux-only filesystem partition type GUID code, 728cf200d32Sopenharmony_ci 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (8300 entry code). Also changed name 729cf200d32Sopenharmony_ci of the EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (0700 entry code) to 730cf200d32Sopenharmony_ci "Microsoft basic data"). 731cf200d32Sopenharmony_ci 732cf200d32Sopenharmony_ci- Fixed a bug that caused an incorrect code to be set for active/bootable 733cf200d32Sopenharmony_ci partitions when generating a hybrid MBR. 734cf200d32Sopenharmony_ci 735cf200d32Sopenharmony_ci- Enable entry of hex codes that begin with "0x" for both GPT and MBR 736cf200d32Sopenharmony_ci partitions. 737cf200d32Sopenharmony_ci 738cf200d32Sopenharmony_ci- Fixed bug that caused the boot loader code to be lost when creating a 739cf200d32Sopenharmony_ci hybrid MBR. 740cf200d32Sopenharmony_ci 741cf200d32Sopenharmony_ci- Fixed bug in sector input code that could produce improper values 742cf200d32Sopenharmony_ci if the user inputs ridiculously large "+" values. 743cf200d32Sopenharmony_ci 744cf200d32Sopenharmony_ci0.7.1 (3/21/2011): 745cf200d32Sopenharmony_ci------------------ 746cf200d32Sopenharmony_ci 747cf200d32Sopenharmony_ci- Added support for proper UTF-16LE partition names rather than the 748cf200d32Sopenharmony_ci "shortcut" that properly encoded only ASCII names. This support works 749cf200d32Sopenharmony_ci only in Linux, FreeBSD, and OS X, though, at least for the moment. 750cf200d32Sopenharmony_ci Although it's possible to compile this support into Windows when using 751cf200d32Sopenharmony_ci Visual C++, it doesn't seem to work properly. Since using this feature 752cf200d32Sopenharmony_ci would require distributing the ICU libraries with the Windows binary, 753cf200d32Sopenharmony_ci thus bloating the binary package's size to no effect, I've disabled it in 754cf200d32Sopenharmony_ci my standard Windows build, at least for now. 755cf200d32Sopenharmony_ci 756cf200d32Sopenharmony_ci- Added check to fixparts to keep it from operating on devices that 757cf200d32Sopenharmony_ci lack an existing MBR signature. (In 0.7.0, it could write an empty 758cf200d32Sopenharmony_ci MBR data structure to a device on which it was mistakenly launched.) 759cf200d32Sopenharmony_ci 760cf200d32Sopenharmony_ci- Fixed bug that caused the protective MBR to not be written when 761cf200d32Sopenharmony_ci restoring a backup of the GPT data. 762cf200d32Sopenharmony_ci 763cf200d32Sopenharmony_ci- Fixed bug that caused second protective MBR partition, when created 764cf200d32Sopenharmony_ci as part of a hybrid MBR, to always be of type 0xEE, even when the 765cf200d32Sopenharmony_ci user specified something else. 766cf200d32Sopenharmony_ci 767cf200d32Sopenharmony_ci- Integrated a number of code cleanups contributed by Florian Zumbiehl. 768cf200d32Sopenharmony_ci 769cf200d32Sopenharmony_ci0.7.0 (3/11/2011): 770cf200d32Sopenharmony_ci------------------ 771cf200d32Sopenharmony_ci 772cf200d32Sopenharmony_ci- Fixed bug that caused some types of logical partitions to be misread. 773cf200d32Sopenharmony_ci 774cf200d32Sopenharmony_ci- Created FixParts program, to fix problems on MBR-partitioned disks. 775cf200d32Sopenharmony_ci Although this program is part of the GPT fdisk family, it is NOT used on 776cf200d32Sopenharmony_ci GPT disks. 777cf200d32Sopenharmony_ci 778cf200d32Sopenharmony_ci- Completely redid the GPT-to-MBR code, used both for converting to MBR 779cf200d32Sopenharmony_ci form and for creating hybrid MBRs. 780cf200d32Sopenharmony_ci 781cf200d32Sopenharmony_ci- Fixed a bug that caused gdisk to "forget" some partitions if there were 782cf200d32Sopenharmony_ci numbering gaps when a conversion to MBR was aborted. 783cf200d32Sopenharmony_ci 784cf200d32Sopenharmony_ci- Improved CHS value creation on small (<~8GB) disks for protective MBR 785cf200d32Sopenharmony_ci and when creating hybrid MBRs or converting to MBR format. Linux-only, 786cf200d32Sopenharmony_ci for the moment; other platforms still produce bad CHS values on sub-~8GB 787cf200d32Sopenharmony_ci disks (but few OSes care these days). 788cf200d32Sopenharmony_ci 789cf200d32Sopenharmony_ci- Enhanced disk replication features ('u' on the experts' menu in gdisk; -R 790cf200d32Sopenharmony_ci or --replicate in sgdisk). It's now possible to replicate the partition 791cf200d32Sopenharmony_ci table from a larger to a smaller disk, so long as all the partitions fit 792cf200d32Sopenharmony_ci on the smaller disk. In sgdisk, the secondary GPT data are moved 793cf200d32Sopenharmony_ci automatically if disk sizes don't match. In gdisk, the secondary GPT data 794cf200d32Sopenharmony_ci are moved automatically if the target disk is smaller than the source 795cf200d32Sopenharmony_ci disk; if the target disk is larger than the source disk, the user is 796cf200d32Sopenharmony_ci given the option of making this adjustment. 797cf200d32Sopenharmony_ci 798cf200d32Sopenharmony_ci- Fixed --load-backup (-l) option to sgdisk, which was broken. 799cf200d32Sopenharmony_ci 800cf200d32Sopenharmony_ci- Changed largest drive that's not given a minimum 4 KiB alignment even 801cf200d32Sopenharmony_ci when smaller alignment is detected on the disk to 300 GB. 802cf200d32Sopenharmony_ci 803cf200d32Sopenharmony_ci- Fixed bug that prevented aborting a partition table backup ('u' on the 804cf200d32Sopenharmony_ci experts' menu) by hitting the Enter key for the device filename. 805cf200d32Sopenharmony_ci 806cf200d32Sopenharmony_ci- Implemented a number of code cleanups provided by Florian Zumbiehl. 807cf200d32Sopenharmony_ci 808cf200d32Sopenharmony_ci0.6.14 (1/8/2011): 809cf200d32Sopenharmony_ci------------------ 810cf200d32Sopenharmony_ci 811cf200d32Sopenharmony_ci- Made small change to the way the start sector is interpreted if you use a 812cf200d32Sopenharmony_ci "+" specification, as in "+2G" to locate a partition 2 GiB into the 813cf200d32Sopenharmony_ci default range. This change makes adjustments for sector alignment less 814cf200d32Sopenharmony_ci likely. 815cf200d32Sopenharmony_ci 816cf200d32Sopenharmony_ci- Modified sgdisk's -n (--new) option to work with relative start and end 817cf200d32Sopenharmony_ci values (which the man page incorrectly stated it already did). Values of 818cf200d32Sopenharmony_ci 0 for the start and end sectors refer to the first and last available 819cf200d32Sopenharmony_ci sectors in the largest free block, and a partition number of 0 refers to 820cf200d32Sopenharmony_ci the first available partition. 821cf200d32Sopenharmony_ci 822cf200d32Sopenharmony_ci- Added ChromeOS GUID values to list of recognized partition type GUIDs. 823cf200d32Sopenharmony_ci 7F00 = ChromeOS kernel, 7501 = ChromeOS root, 7502 = ChromeOS reserved. 824cf200d32Sopenharmony_ci Untested on actual ChromeOS system. 825cf200d32Sopenharmony_ci 826cf200d32Sopenharmony_ci- Tweaked APM detection to look for APM signature even if an MBR 827cf200d32Sopenharmony_ci signature has already been found. Helps in diagnosis of cases 828cf200d32Sopenharmony_ci in which an MBR has overwritten an APM disk. 829cf200d32Sopenharmony_ci 830cf200d32Sopenharmony_ci0.6.13 (10/12/2010): 831cf200d32Sopenharmony_ci-------------------- 832cf200d32Sopenharmony_ci 833cf200d32Sopenharmony_ci- Added notification about nonexistent partitions to hybrid MBR creation 834cf200d32Sopenharmony_ci in gdisk. 835cf200d32Sopenharmony_ci 836cf200d32Sopenharmony_ci- Fixed bug in GPT-to-MBR conversion that could sometimes enable creation 837cf200d32Sopenharmony_ci of an extended partition that overlaps a preceding partition. 838cf200d32Sopenharmony_ci 839cf200d32Sopenharmony_ci- Fixed bug in GPT-to-MBR conversion that prevented creation of an MBR 840cf200d32Sopenharmony_ci table with logical partitions if there were four or fewer partitions. 841cf200d32Sopenharmony_ci 842cf200d32Sopenharmony_ci0.6.12 (10/7/2010): 843cf200d32Sopenharmony_ci------------------- 844cf200d32Sopenharmony_ci 845cf200d32Sopenharmony_ci- Adjusted alignment code to use 1 MiB alignment by default for drives with 846cf200d32Sopenharmony_ci other than 512-byte sector sizes. (Previous versions increased this -- 847cf200d32Sopenharmony_ci for instance, to 4 MiB for drives with 2048-byte logical sector size.) 848cf200d32Sopenharmony_ci 849cf200d32Sopenharmony_ci- Entry of non-hexadecimal value for partition type code now causes 850cf200d32Sopenharmony_ci re-prompting for a new value, fixing a recently-introduced minor bug. 851cf200d32Sopenharmony_ci 852cf200d32Sopenharmony_ci- Fixed bug in sector entry using K/M/G/T/P suffixes on disks with 853cf200d32Sopenharmony_ci other-than-512-byte sector numbers. 854cf200d32Sopenharmony_ci 855cf200d32Sopenharmony_ci- Added "P" (PiB, pebibyte) suffix to suffixes accepted in entering 856cf200d32Sopenharmony_ci partition sizes. 857cf200d32Sopenharmony_ci 858cf200d32Sopenharmony_ci- Fixed bug that caused sgdisk to segfault if fed the (invalid) 859cf200d32Sopenharmony_ci "-A show" parameter. Now it terminates with a complaint about an invalid 860cf200d32Sopenharmony_ci partition number 0. 861cf200d32Sopenharmony_ci 862cf200d32Sopenharmony_ci- Removed warning when running on big-endian hardware, since this 863cf200d32Sopenharmony_ci support has been present for quite a while with no bug reports. 864cf200d32Sopenharmony_ci 865cf200d32Sopenharmony_ci0.6.11 (9/25/2010): 866cf200d32Sopenharmony_ci------------------- 867cf200d32Sopenharmony_ci 868cf200d32Sopenharmony_ci- Added -F (--first-aligned-in-largest) option to sgdisk. This option is a 869cf200d32Sopenharmony_ci variant on -f (--first-in-largest); it returns the number of the first 870cf200d32Sopenharmony_ci sector that will be used in the largest free area, given the current 871cf200d32Sopenharmony_ci alignment value (set via -a/--set-alignment). 872cf200d32Sopenharmony_ci 873cf200d32Sopenharmony_ci- Streamlined GUID code entry in gdisk; it no longer offers the option 874cf200d32Sopenharmony_ci to enter GUIDs in separate segments. 875cf200d32Sopenharmony_ci 876cf200d32Sopenharmony_ci- The -t option to sgdisk now accepts GUID values as well as the 877cf200d32Sopenharmony_ci sgdisk/gdisk-specific two-byte hex codes. 878cf200d32Sopenharmony_ci 879cf200d32Sopenharmony_ci- Added check that the protective 0xEE MBR partition begins on sector 1 880cf200d32Sopenharmony_ci to the verify function. If it doesn't, a warning message is displayed, 881cf200d32Sopenharmony_ci but it doesn't count as an error. 882cf200d32Sopenharmony_ci 883cf200d32Sopenharmony_ci- Added check for overlapping MBR partitions to verify function (gdisk "v" 884cf200d32Sopenharmony_ci function on all menus; sgdisk -v/--verify function). Also warns about 885cf200d32Sopenharmony_ci multiple MBR 0xEE partitions (causes problems in some OSes). 886cf200d32Sopenharmony_ci 887cf200d32Sopenharmony_ci- Added check to GPT-to-MBR and hybrid MBR creation options to prevent 888cf200d32Sopenharmony_ci creation of disks with duplicate partitions. When told to create a disk 889cf200d32Sopenharmony_ci with duplicates, sgdisk now aborts with the error message "Problem 890cf200d32Sopenharmony_ci creating MBR!" When attempting to create a hybrid MBR with duplicates, 891cf200d32Sopenharmony_ci gdisk silently drops duplicate partitions, leaving fewer than requested. 892cf200d32Sopenharmony_ci Creating duplicates should not be possible in sgdisk when converting to 893cf200d32Sopenharmony_ci MBR form. 894cf200d32Sopenharmony_ci 895cf200d32Sopenharmony_ci0.6.10 (8/22/2010): 896cf200d32Sopenharmony_ci------------------- 897cf200d32Sopenharmony_ci 898cf200d32Sopenharmony_ci- Enable disk-wipe (-z and -Z) and verification (-v) operations in 899cf200d32Sopenharmony_ci sgdisk even if the disk is badly damaged. 900cf200d32Sopenharmony_ci 901cf200d32Sopenharmony_ci- Added support for setting attributes in sgdisk (-A/--attributes option) 902cf200d32Sopenharmony_ci in sgdisk. 903cf200d32Sopenharmony_ci 904cf200d32Sopenharmony_ci- Fixed bug that created backwards attribute field values (bit #2 was 905cf200d32Sopenharmony_ci entered as bit #61, etc.). 906cf200d32Sopenharmony_ci 907cf200d32Sopenharmony_ci- Fixed bug that caused creation of hybrid MBR to wipe out the MBR's boot 908cf200d32Sopenharmony_ci code. 909cf200d32Sopenharmony_ci 910cf200d32Sopenharmony_ci- Added ability to save partition table from one device to another (gdisk: 911cf200d32Sopenharmony_ci 'u' on experts' menu; sgdisk: -R or --replicate option). 912cf200d32Sopenharmony_ci 913cf200d32Sopenharmony_ci- Fixed inaccessible -C/--recompute-chs option in sgdisk. 914cf200d32Sopenharmony_ci 915cf200d32Sopenharmony_ci0.6.9 (7/4/2010): 916cf200d32Sopenharmony_ci------------------ 917cf200d32Sopenharmony_ci 918cf200d32Sopenharmony_ci- Fixed minor error in sgdisk man page (--largest-new option requires 919cf200d32Sopenharmony_ci a partition number). 920cf200d32Sopenharmony_ci 921cf200d32Sopenharmony_ci- Fixed major bug in hybrid MBR creation, which caused incorrect 922cf200d32Sopenharmony_ci protective partition end point settings and occasionally other 923cf200d32Sopenharmony_ci problems. 924cf200d32Sopenharmony_ci 925cf200d32Sopenharmony_ci0.6.8 (5/23/2010): 926cf200d32Sopenharmony_ci------------------ 927cf200d32Sopenharmony_ci 928cf200d32Sopenharmony_ci- Added tests to see if the file to be opened is a directory, character 929cf200d32Sopenharmony_ci device, FIFO, or socket; program now terminates if any of these 930cf200d32Sopenharmony_ci conditions is met. (Linux/FreeBSD/OS X only.) Thanks to Justin Maggard 931cf200d32Sopenharmony_ci for this patch. 932cf200d32Sopenharmony_ci 933cf200d32Sopenharmony_ci- Added 'f' option on gdisk's experts' menu (-G/--randomize-guids in 934cf200d32Sopenharmony_ci sgdisk). This option randomizes the disk's GUID and all partitions' 935cf200d32Sopenharmony_ci GUIDs. Intended for use after cloning a disk with a utility that copies 936cf200d32Sopenharmony_ci the GUIDs intact (such as a raw dd copy) if you want each disk copy to 937cf200d32Sopenharmony_ci have its own set of GUIDs. 938cf200d32Sopenharmony_ci 939cf200d32Sopenharmony_ci- Added -u/--partition-guid and -U/--disk-guid options to sgdisk. These are 940cf200d32Sopenharmony_ci the equivalents of the 'g' and 'c' options, respectively, on the gdisk 941cf200d32Sopenharmony_ci experts' menu: They enable adjusting an individual partition's GUID or a 942cf200d32Sopenharmony_ci disk's GUID. The GUID may be either a fully specified GUID value or 'R' 943cf200d32Sopenharmony_ci or 'r' to set a random GUID value. 944cf200d32Sopenharmony_ci 945cf200d32Sopenharmony_ci- Fixed compile problem for FreeBSD (its math library lacks a log2() 946cf200d32Sopenharmony_ci function). Also created separate Makefile.freebsd with a couple of 947cf200d32Sopenharmony_ci FreeBSD-specific options. 948cf200d32Sopenharmony_ci 949cf200d32Sopenharmony_ci- Added -N (--largest-new) command to sgdisk. This command creates a single 950cf200d32Sopenharmony_ci partition that fills the largest single unpartitioned block of space on 951cf200d32Sopenharmony_ci the disk. 952cf200d32Sopenharmony_ci 953cf200d32Sopenharmony_ci- Fixed sgdisk man page error: the --change-name option was incorrectly 954cf200d32Sopenharmony_ci listed as --change. 955cf200d32Sopenharmony_ci 956cf200d32Sopenharmony_ci- Added 'h' option to gdisk experts' menu (-C or --recompute-chs in sgdisk) 957cf200d32Sopenharmony_ci to recompute all protective/hybrid MBR CHS values. This option is 958cf200d32Sopenharmony_ci intended to work around a bug in at least one BIOS that prevents the 959cf200d32Sopenharmony_ci computer from booting when the GPT-mandated (but technically illegal) 960cf200d32Sopenharmony_ci 0xFFFFFF CHS value is used as the end point for a protective MBR. The 961cf200d32Sopenharmony_ci recomputed values will be legal (e.g., 0xFEFFFF instead of 0xFFFFFF), 962cf200d32Sopenharmony_ci but incorrect in GPT terms, and will therefore enable at least one 963cf200d32Sopenharmony_ci BIOS to boot with a GPT disk. See http://www.rodsbooks.com/gdisk/bios.html 964cf200d32Sopenharmony_ci for all I know about BIOS/GPT incompatibilities. 965cf200d32Sopenharmony_ci 966cf200d32Sopenharmony_ci0.6.7 (5/1/2010): 967cf200d32Sopenharmony_ci----------------- 968cf200d32Sopenharmony_ci 969cf200d32Sopenharmony_ci- Undid earlier change, with version 0.6.4, that wiped the MBR boot loader 970cf200d32Sopenharmony_ci when doing MBR-to-GPT conversions. I've now become skeptical that MBR 971cf200d32Sopenharmony_ci boot loaders were causing any real problems on GPT disks, so I'm going 972cf200d32Sopenharmony_ci back to the philosophy of leaving as much alone as possible. 973cf200d32Sopenharmony_ci 974cf200d32Sopenharmony_ci- Fixed bug that caused incorrect reporting of free space on 0-size disks 975cf200d32Sopenharmony_ci (e.g., files of 0 length passed as disk images). 976cf200d32Sopenharmony_ci 977cf200d32Sopenharmony_ci- Fixed bug that caused segfault on some invalid disks 978cf200d32Sopenharmony_ci 979cf200d32Sopenharmony_ci- Fixed bug that caused incorrect partition numbers to be displayed for 980cf200d32Sopenharmony_ci some verify problems. 981cf200d32Sopenharmony_ci 982cf200d32Sopenharmony_ci 983cf200d32Sopenharmony_ci0.6.6 (3/21/2010): 984cf200d32Sopenharmony_ci----------------- 985cf200d32Sopenharmony_ci 986cf200d32Sopenharmony_ci- Added support for the "no block IO protocol" (referred to as "hide from 987cf200d32Sopenharmony_ci EFI" in GPT fdisk) and "legacy BIOS bootable" attribute bits. See Table 988cf200d32Sopenharmony_ci 19 of the UEFI 2.3 specification (p. 153) for details. 989cf200d32Sopenharmony_ci 990cf200d32Sopenharmony_ci- Changed the sequence in which GPT data structures are written to disk; 991cf200d32Sopenharmony_ci backups are now written first, followed by the main structures. This is 992cf200d32Sopenharmony_ci as recommended in the UEFI 2.3 specification, since it's safer in the 993cf200d32Sopenharmony_ci extremely unlikely event that a RAID array's size is increased and 994cf200d32Sopenharmony_ci there's a power outage mid-write. (If the main structures are written 995cf200d32Sopenharmony_ci first in this case, they'll point to data that's not yet been written; 996cf200d32Sopenharmony_ci but by writing the backups first, the old main structures will still 997cf200d32Sopenharmony_ci point to the valid old backup structures.) 998cf200d32Sopenharmony_ci 999cf200d32Sopenharmony_ci- Protective MBRs now have disk signatures of 0x00000000, to better 1000cf200d32Sopenharmony_ci conform with GPT as described in the UEFI 2.3 specification. 1001cf200d32Sopenharmony_ci 1002cf200d32Sopenharmony_ci- Added alignment information to the summary data produced by the 1003cf200d32Sopenharmony_ci 'p' main-menu option in gdisk or the -p option to sgdisk. 1004cf200d32Sopenharmony_ci 1005cf200d32Sopenharmony_ci- More alignment changes: GPT fdisk now attempts to determine the alignment 1006cf200d32Sopenharmony_ci value based on alignment of current partitions, if any are defined. If no 1007cf200d32Sopenharmony_ci partitions are defined, a default value of 2048 is set. If the computed 1008cf200d32Sopenharmony_ci value is less than 8 on drives over about 596GiB, it's reset to 8, since 1009cf200d32Sopenharmony_ci the drive might be a WD Advanced Format unit that requires an 8-sector 1010cf200d32Sopenharmony_ci (or larger power-of-2) alignment value for best performance. The 1011cf200d32Sopenharmony_ci 2048-sector default provides better alignment in some RAID 1012cf200d32Sopenharmony_ci configurations. 1013cf200d32Sopenharmony_ci 1014cf200d32Sopenharmony_ci- Changed behavior when a backup restore fails. Previously, GPT fdisk 1015cf200d32Sopenharmony_ci would create a fresh blank set of partitions. Now it does so only 1016cf200d32Sopenharmony_ci if the failure occurs when interpreting the backup's contents; if the 1017cf200d32Sopenharmony_ci user typed the wrong filename, the in-memory data structures aren't 1018cf200d32Sopenharmony_ci touched. 1019cf200d32Sopenharmony_ci 1020cf200d32Sopenharmony_ci 1021cf200d32Sopenharmony_ci0.6.5 (3/7/2010): 1022cf200d32Sopenharmony_ci----------------- 1023cf200d32Sopenharmony_ci 1024cf200d32Sopenharmony_ci- Added tests to verify ('v') function and to pre-save checks to look for 1025cf200d32Sopenharmony_ci partitions that end before they begin or that are too big for their 1026cf200d32Sopenharmony_ci disks. 1027cf200d32Sopenharmony_ci 1028cf200d32Sopenharmony_ci- Fixed a bug that could cause spurious data to appear in a grown partition 1029cf200d32Sopenharmony_ci table. 1030cf200d32Sopenharmony_ci 1031cf200d32Sopenharmony_ci- Added ability to convert some or all partitions to logical partitions in 1032cf200d32Sopenharmony_ci GPT-to-MBR conversion. This feature is limited by the fact that at least 1033cf200d32Sopenharmony_ci one free sector must exist immediately prior to each logical partition, 1034cf200d32Sopenharmony_ci so it won't do much good if partitions are crammed together. It should be 1035cf200d32Sopenharmony_ci possible to convert back to MBR any disk that started that way, provided 1036cf200d32Sopenharmony_ci no partitions were added or resized when the disk was in GPT form; and 1037cf200d32Sopenharmony_ci disks that were partitioned with Apple's Disk Utility or other tools that 1038cf200d32Sopenharmony_ci insert unpartitioned space should also be convertible. CAUTION: THE 1039cf200d32Sopenharmony_ci LOGICAL PARTITION CREATION FEATURE DOESN'T TRY TO ALIGN PARTITIONS OR 1040cf200d32Sopenharmony_ci PARTITION HEADER DATA TO CYLINDER BOUNDARIES! It's conceivable that some 1041cf200d32Sopenharmony_ci older OSes or utilities will object to these disks, although Linux, OS X, 1042cf200d32Sopenharmony_ci Windows Vista, and Windows 7 all seem happy with them. 1043cf200d32Sopenharmony_ci 1044cf200d32Sopenharmony_ci- Fixed bug that caused creation of 0-length file if an incorrect device 1045cf200d32Sopenharmony_ci filename was typed. 1046cf200d32Sopenharmony_ci 1047cf200d32Sopenharmony_ci- The gdisk program now prompts for a device filename if it's called with 1048cf200d32Sopenharmony_ci no options. This enables gdisk to do something useful if it's launched by 1049cf200d32Sopenharmony_ci double-clicking its icon in a GUI environment. 1050cf200d32Sopenharmony_ci 1051cf200d32Sopenharmony_ci- Added workaround for bug in some versions of MinGW that caused the 1052cf200d32Sopenharmony_ci program to garble input sector numbers. 1053cf200d32Sopenharmony_ci 1054cf200d32Sopenharmony_ci- The Windows version now works on disks with over-512-byte sectors. 1055cf200d32Sopenharmony_ci Tested on a magneto-optical (MO) drive with 2048-byte sectors. 1056cf200d32Sopenharmony_ci 1057cf200d32Sopenharmony_ci- Added -D (--display-alignment) option to sgdisk, to display sector 1058cf200d32Sopenharmony_ci alignment value (by default, 1 for sub-800GiB disks and 8 for disks 1059cf200d32Sopenharmony_ci over that size). 1060cf200d32Sopenharmony_ci 1061cf200d32Sopenharmony_ci- Fixed bug in computation of CHS geometries for protective MBR. This is 1062cf200d32Sopenharmony_ci non-critical, since most modern utilities ignore the CHS geometries. 1063cf200d32Sopenharmony_ci Concerned users can use the 'n' option on the experts' menu to build new 1064cf200d32Sopenharmony_ci protective MBRs with the new algorithm, if desired. (Note that GNU 1065cf200d32Sopenharmony_ci Parted, at least, gets this wrong, too.) 1066cf200d32Sopenharmony_ci 1067cf200d32Sopenharmony_ci- Fixed memory-allocation bug when reading GPT disks with partition tables 1068cf200d32Sopenharmony_ci with over 128 entries; could cause program to crash on startup. 1069cf200d32Sopenharmony_ci 1070cf200d32Sopenharmony_ci0.6.4-2 (2/20/2010): 1071cf200d32Sopenharmony_ci-------------------- 1072cf200d32Sopenharmony_ci 1073cf200d32Sopenharmony_ciNote: Neither of the following changes affects actual program code, so I've 1074cf200d32Sopenharmony_cileft the version number in the program at 0.6.4. 1075cf200d32Sopenharmony_ci 1076cf200d32Sopenharmony_ci- Altered Makefile to pass user's compiler and linker environment 1077cf200d32Sopenharmony_ci variables through. 1078cf200d32Sopenharmony_ci 1079cf200d32Sopenharmony_ci- Added #include to gpttext.cc to enable it to compile on the latest 1080cf200d32Sopenharmony_ci GCC versions (it was failing on at least some 4.4.x compilers). 1081cf200d32Sopenharmony_ci 1082cf200d32Sopenharmony_ci0.6.4 (2/19/2010): 1083cf200d32Sopenharmony_ci------------------- 1084cf200d32Sopenharmony_ci 1085cf200d32Sopenharmony_ci- Added -m (--gpttombr) option to sgdisk, enabling conversion of GPT 1086cf200d32Sopenharmony_ci disks to MBR format, with a limit of four partitions total, and of course 1087cf200d32Sopenharmony_ci without overcoming the 2TiB limit. 1088cf200d32Sopenharmony_ci 1089cf200d32Sopenharmony_ci- Added -h (--hybrid) option to sgdisk, enabling creation of hybrid 1090cf200d32Sopenharmony_ci MBRs. Fewer options are available in sgdisk than in gdisk, though, 1091cf200d32Sopenharmony_ci in order to keep the user interface manageable. 1092cf200d32Sopenharmony_ci 1093cf200d32Sopenharmony_ci- Fixed off-by-one bug in specification of partition when using the 1094cf200d32Sopenharmony_ci -T (--transform-bsd) option in sgdisk. 1095cf200d32Sopenharmony_ci 1096cf200d32Sopenharmony_ci- Changed the code to create a new MBR unique disk signature whenever a new 1097cf200d32Sopenharmony_ci protective MBR is generated (when doing an MBR-to-GPT conversion, when 1098cf200d32Sopenharmony_ci using the 'n' option on the experts' menu, or when using the 'o' option 1099cf200d32Sopenharmony_ci on the main menu, for example). Previous versions attempted to preserve 1100cf200d32Sopenharmony_ci the existing MBR disk signature in most cases, but this resulted in 1101cf200d32Sopenharmony_ci values of 0x00000000 whenever an empty disk was partitioned, and often in 1102cf200d32Sopenharmony_ci other cases, too. Better to risk changing this value too often than to 1103cf200d32Sopenharmony_ci leave multiple disks with 0x00000000 values, I think. 1104cf200d32Sopenharmony_ci 1105cf200d32Sopenharmony_ci- Added transpose ('t' on experts' menu in gdisk; or -r or --transpose in 1106cf200d32Sopenharmony_ci sgdisk) command to enable fine-tuning partition order without doing a 1107cf200d32Sopenharmony_ci full sort. 1108cf200d32Sopenharmony_ci 1109cf200d32Sopenharmony_ci- Added code to clear the MBR boot loader when doing an MBR-to-GPT 1110cf200d32Sopenharmony_ci conversion. (This was already done in full-disk BSD-to-GPT conversions.) 1111cf200d32Sopenharmony_ci This is done because I've seen a few problem reports that make me think 1112cf200d32Sopenharmony_ci some MBR boot loaders freak out and hang the system when they encounter 1113cf200d32Sopenharmony_ci GPT disks, and/or they attempt to load a second-stage boot loader stored 1114cf200d32Sopenharmony_ci in what is now GPT territory, causing a system hang. Since MBR boot 1115cf200d32Sopenharmony_ci loaders don't work on GPT disks anyhow (even GRUB needs to be 1116cf200d32Sopenharmony_ci reinstalled), this new wiping behavior shouldn't cause any problems, and 1117cf200d32Sopenharmony_ci may prevent a few. 1118cf200d32Sopenharmony_ci 1119cf200d32Sopenharmony_ci- Fixed bug in Windows version that prevented saving backup files. 1120cf200d32Sopenharmony_ci 1121cf200d32Sopenharmony_ci- Fixed bug that caused second and subsequent partition numbers in 1122cf200d32Sopenharmony_ci prompts in hybrid MBR conversion procedure to be displayed in 1123cf200d32Sopenharmony_ci hexadecimal. 1124cf200d32Sopenharmony_ci 1125cf200d32Sopenharmony_ci- Fixed very obscure potential bug in hybrid MBR/GPT synchronization when 1126cf200d32Sopenharmony_ci deleting partitions; code wasn't matching partition lengths correctly, 1127cf200d32Sopenharmony_ci which would only affect partitions that start at the same point but have 1128cf200d32Sopenharmony_ci different lengths in MBR vs. GPT. 1129cf200d32Sopenharmony_ci 1130cf200d32Sopenharmony_ci- Fixed bug in the -E option to sgdisk; it was actually returning the 1131cf200d32Sopenharmony_ci last free sector, not the last free sector in the largest free block. 1132cf200d32Sopenharmony_ci 1133cf200d32Sopenharmony_ci- Fixed bug in -t option to sgdisk; it was corrupting partition type 1134cf200d32Sopenharmony_ci codes. 1135cf200d32Sopenharmony_ci 1136cf200d32Sopenharmony_ci- Fixed minor alignment bug in partition summary list ('p' from any menu) 1137cf200d32Sopenharmony_ci when partition sizes are between 1000 and 1024 units. 1138cf200d32Sopenharmony_ci 1139cf200d32Sopenharmony_ci- Backup restore function ('l' on recovery & transformation menu) now 1140cf200d32Sopenharmony_ci accepts both backups generated by GPT fdisk and backups created by a 1141cf200d32Sopenharmony_ci direct copy (via dd, etc.) of the MBR, main GPT header, and main GPT 1142cf200d32Sopenharmony_ci partition table, in that order. ("dd if=/dev/sda of=backup.gpt bs=512 1143cf200d32Sopenharmony_ci count=34" will do this on Linux for a disk with a typical-sized GPT table 1144cf200d32Sopenharmony_ci of 128 entries.) 1145cf200d32Sopenharmony_ci 1146cf200d32Sopenharmony_ci0.6.3 (2/3/2010): 1147cf200d32Sopenharmony_ci------------------ 1148cf200d32Sopenharmony_ci 1149cf200d32Sopenharmony_ci- Fixed serious data corruption bug on big-endian (PowerPC and similar) 1150cf200d32Sopenharmony_ci systems. 1151cf200d32Sopenharmony_ci 1152cf200d32Sopenharmony_ci- Changed several GPT fdisk Solaris type codes to correct a duplicate 1153cf200d32Sopenharmony_ci 1154cf200d32Sopenharmony_ci- Corrected error in GPT fdisk type codes for NetBSD LFS and NetBSD RAID; 1155cf200d32Sopenharmony_ci they were identical, but I've now changed NetBSD RAID to A906, which 1156cf200d32Sopenharmony_ci is unique. 1157cf200d32Sopenharmony_ci 1158cf200d32Sopenharmony_ci- Added GUID for IBM General Parallel File System (GPFS) partition type 1159cf200d32Sopenharmony_ci code. Somewhat arbitrarily set it to use the 7501 number (MBR code 0x75 1160cf200d32Sopenharmony_ci is used by IBM PC/IX, so it's at least the right company, by my loose 1161cf200d32Sopenharmony_ci numbering rules....). 1162cf200d32Sopenharmony_ci 1163cf200d32Sopenharmony_ci- Improved GUID generation. Prior versions generated completely random 1164cf200d32Sopenharmony_ci numbers for GUIDs. This works, but is technically a violation of the 1165cf200d32Sopenharmony_ci spec. Unix versions now employ libuuid to generate GUIDs in a more 1166cf200d32Sopenharmony_ci correct way. The Windows version still generates random numbers, though. 1167cf200d32Sopenharmony_ci 1168cf200d32Sopenharmony_ci- Turned PartTypes class into a derived class of GUIDData, and renamed 1169cf200d32Sopenharmony_ci it to PartType. 1170cf200d32Sopenharmony_ci 1171cf200d32Sopenharmony_ci- Created new GUIDData class, to replace the original GUIDData struct. 1172cf200d32Sopenharmony_ci 1173cf200d32Sopenharmony_ci0.6.2 (1/29/2010): 1174cf200d32Sopenharmony_ci------------------ 1175cf200d32Sopenharmony_ci 1176cf200d32Sopenharmony_ci- The change-type ('t' on main menu) option now changes the partition's 1177cf200d32Sopenharmony_ci name *IF* the current name is the generic one for the partition type. 1178cf200d32Sopenharmony_ci If the current name is not the generic name, it is NOT changed. 1179cf200d32Sopenharmony_ci 1180cf200d32Sopenharmony_ci- Fixed bug that caused new protective MBR to not be created when the 1181cf200d32Sopenharmony_ci MBR was invalid and the GPT was damaged and the user opts to try to 1182cf200d32Sopenharmony_ci use the GPT data. 1183cf200d32Sopenharmony_ci 1184cf200d32Sopenharmony_ci- Enabled default partition type code of 0700 when creating partitions 1185cf200d32Sopenharmony_ci or changing their type codes. (Type 0700, Linux/Windows data, is set if 1186cf200d32Sopenharmony_ci the user hits the Enter key alone.) 1187cf200d32Sopenharmony_ci 1188cf200d32Sopenharmony_ci- Fixed bug in sort ('s' on main menu) option that caused partition 1189cf200d32Sopenharmony_ci numbers to begin at more than 1 if the original partition list had 1190cf200d32Sopenharmony_ci too many empty partitions before the last one defined. 1191cf200d32Sopenharmony_ci 1192cf200d32Sopenharmony_ci- Improved code to determine which partition table to load in case of 1193cf200d32Sopenharmony_ci CRC mismatches between the partition tables and the stored CRC values 1194cf200d32Sopenharmony_ci in the headers. 1195cf200d32Sopenharmony_ci 1196cf200d32Sopenharmony_ci- Compiles using MinGW (http://www.mingw.org) to create a Windows binary. 1197cf200d32Sopenharmony_ci 1198cf200d32Sopenharmony_ci- Moved all disk I/O functions to the new DiskIO class. This helps with the 1199cf200d32Sopenharmony_ci Windows port; it uses diskio-windows.cc for Windows-specific code, 1200cf200d32Sopenharmony_ci diskio-unix.cc for the Linux, FreeBSD, and OS X code, and diskio.cc for 1201cf200d32Sopenharmony_ci cross-platform disk I/O code. 1202cf200d32Sopenharmony_ci 1203cf200d32Sopenharmony_ci- Changed BSD disklabel detection code to be more correct (I think). 1204cf200d32Sopenharmony_ci This change has no effect on my test disks, but I hope it'll work 1205cf200d32Sopenharmony_ci better on disks with sector sizes other than 512 or 2048. 1206cf200d32Sopenharmony_ci 1207cf200d32Sopenharmony_ci0.6.1 (1/20/2010): 1208cf200d32Sopenharmony_ci------------------ 1209cf200d32Sopenharmony_ci 1210cf200d32Sopenharmony_ci- Fixed bug that returned incorrect disk size on 32-bit versions of 1211cf200d32Sopenharmony_ci FreeBSD. 1212cf200d32Sopenharmony_ci 1213cf200d32Sopenharmony_ci- Fixed bug that prevented FreeBSD version from working on disk image 1214cf200d32Sopenharmony_ci files. 1215cf200d32Sopenharmony_ci 1216cf200d32Sopenharmony_ci- Fixed bug that caused BSD disklabel conversion to fail. 1217cf200d32Sopenharmony_ci 1218cf200d32Sopenharmony_ci0.6.0 (1/15/2010): 1219cf200d32Sopenharmony_ci------------------ 1220cf200d32Sopenharmony_ci 1221cf200d32Sopenharmony_ci- Fixed bug that caused the convert to MBR function to fail. 1222cf200d32Sopenharmony_ci 1223cf200d32Sopenharmony_ci- Added support for disks with other than 512-byte sectors. 1224cf200d32Sopenharmony_ci 1225cf200d32Sopenharmony_ci- Created embryonic sgdisk program. 1226cf200d32Sopenharmony_ci 1227cf200d32Sopenharmony_ci- Fixed bug that caused relative sector numbers entered by users (e.g, 1228cf200d32Sopenharmony_ci "+128M") to be misinterpreted as from the start of the range rather than 1229cf200d32Sopenharmony_ci from the default value. 1230cf200d32Sopenharmony_ci 1231cf200d32Sopenharmony_ci0.5.3 (1/4/2010): 1232cf200d32Sopenharmony_ci----------------- 1233cf200d32Sopenharmony_ci 1234cf200d32Sopenharmony_ci- Fixed bug in display of GUIDs when compiled with some versions of GCC. 1235cf200d32Sopenharmony_ci 1236cf200d32Sopenharmony_ci- Eliminated warnings caused by additional checks in latest versions of 1237cf200d32Sopenharmony_ci GCC. These warnings were harmless, but to eliminate them I've added 1238cf200d32Sopenharmony_ci more error checking on disk I/O. 1239cf200d32Sopenharmony_ci 1240cf200d32Sopenharmony_ci- Eliminated unnecessary warnings about potential data loss if the program 1241cf200d32Sopenharmony_ci was launched with the -l option or if writes aren't possible. 1242cf200d32Sopenharmony_ci 1243cf200d32Sopenharmony_ci- Added code to set the partition boundary value based on the physical 1244cf200d32Sopenharmony_ci sector size. (FindAlignment() function.) This function, however, works 1245cf200d32Sopenharmony_ci only on Linux, and then only if the BLKPBSZGET ioctl is defined. This 1246cf200d32Sopenharmony_ci ioctl is new in kernel 2.6.32 or thereabouts. 1247cf200d32Sopenharmony_ci 1248cf200d32Sopenharmony_ci0.5.2 (12/31/2009): 1249cf200d32Sopenharmony_ci------------------- 1250cf200d32Sopenharmony_ci 1251cf200d32Sopenharmony_ci- Modified partition creation function to begin partitions on 8-sector 1252cf200d32Sopenharmony_ci boundaries by default. This improves performance on the new Western 1253cf200d32Sopenharmony_ci Digital Advanced Format drives. The new 'd' and 'l' options on the 1254cf200d32Sopenharmony_ci experts' menu display and change, respectively, the boundary size. 1255cf200d32Sopenharmony_ci 1256cf200d32Sopenharmony_ci- Tweaked code to produce fewer warnings on the latest versions of 1257cf200d32Sopenharmony_ci GCC. 1258cf200d32Sopenharmony_ci 1259cf200d32Sopenharmony_ci0.5.1: 1260cf200d32Sopenharmony_ci------ 1261cf200d32Sopenharmony_ci 1262cf200d32Sopenharmony_ci- Made some minor edits to the man page. 1263cf200d32Sopenharmony_ci 1264cf200d32Sopenharmony_ci- Incorporated RPM .spec file changes contributed by Scott Collier 1265cf200d32Sopenharmony_ci (boodle11@gmail.com). 1266cf200d32Sopenharmony_ci 1267cf200d32Sopenharmony_ci- Changed method of locating and loading backup GPT data, to use the 1268cf200d32Sopenharmony_ci main header's pointer, if it's valid, rather than seeking to the 1269cf200d32Sopenharmony_ci end of the disk. 1270cf200d32Sopenharmony_ci 1271cf200d32Sopenharmony_ci- Added 'e' option (relocate backup GPT data structures) to the experts' 1272cf200d32Sopenharmony_ci menu. 1273cf200d32Sopenharmony_ci 1274cf200d32Sopenharmony_ci- Fixed bug that prevented recovery of partitions in case of partially 1275cf200d32Sopenharmony_ci damaged GPT data (bad main and good backup or bad backup and good 1276cf200d32Sopenharmony_ci main header, for instance). 1277cf200d32Sopenharmony_ci 1278cf200d32Sopenharmony_ci0.5.0: 1279cf200d32Sopenharmony_ci------ 1280cf200d32Sopenharmony_ci 1281cf200d32Sopenharmony_ci- Added GPT-to-MBR conversion function. It's very limited, but potentially 1282cf200d32Sopenharmony_ci useful in some cases. 1283cf200d32Sopenharmony_ci 1284cf200d32Sopenharmony_ci- Fixed bug that caused incorrect file sizes to be reported on 32-bit 1285cf200d32Sopenharmony_ci Linux, thus causing problems when editing partition tables in disk images 1286cf200d32Sopenharmony_ci or when loading GPT backup files. 1287cf200d32Sopenharmony_ci 1288cf200d32Sopenharmony_ci- Fixed bug that caused bogus CRC error reports when loading backup GPT 1289cf200d32Sopenharmony_ci data. 1290cf200d32Sopenharmony_ci 1291cf200d32Sopenharmony_ci- Reorganized menus. There are now three: the main menu, the experts' menu, 1292cf200d32Sopenharmony_ci and the recovery & transformation menu. The last of these has most of the 1293cf200d32Sopenharmony_ci items that had been on the earlier versions' experts' menu. 1294cf200d32Sopenharmony_ci 1295cf200d32Sopenharmony_ci- Added ability to re-load the MBR and generate a fresh GPT from it. This 1296cf200d32Sopenharmony_ci is normally identical to quitting and re-running the program, but it 1297cf200d32Sopenharmony_ci could be handy if, say, the GPT partitions on a hybrid configuration are 1298cf200d32Sopenharmony_ci badly messed up; this will enable using the hybridized partitions as the 1299cf200d32Sopenharmony_ci starting point for a new GPT setup. 1300cf200d32Sopenharmony_ci 1301cf200d32Sopenharmony_ci- The program now generates CHS values for hybrid and GPT-to-MBR conversion 1302cf200d32Sopenharmony_ci MBRs. For the moment, the assumption is the maximum number of heads and 1303cf200d32Sopenharmony_ci sectors per track (255 and 63, respectively), although the bulk of the 1304cf200d32Sopenharmony_ci code supports other values -- it'd just be awkward to enter the data in 1305cf200d32Sopenharmony_ci the user interface. 1306cf200d32Sopenharmony_ci 1307cf200d32Sopenharmony_ci- Fixed minor display bug that caused number of sectors on the disk to be 1308cf200d32Sopenharmony_ci shown as 0 on large disks when running 32-bit binaries. 1309cf200d32Sopenharmony_ci 1310cf200d32Sopenharmony_ci- Reverted 0.4.2's zap (destroy GPT) changes, since I don't want to wipe 1311cf200d32Sopenharmony_ci out a valid MBR if the user created that MBR over an older GPT without 1312cf200d32Sopenharmony_ci first properly wiping out the GPT, and the user now wants to wipe out 1313cf200d32Sopenharmony_ci the GPT. 1314cf200d32Sopenharmony_ci 1315cf200d32Sopenharmony_ci- Reformatted and edited the man page. Aside from edits related to the 1316cf200d32Sopenharmony_ci preceding program changes, I've altered the markup slightly and trimmed 1317cf200d32Sopenharmony_ci much of the more tutorial information from the man page to better 1318cf200d32Sopenharmony_ci conform to typical terse man page style. 1319cf200d32Sopenharmony_ci 1320cf200d32Sopenharmony_ci0.4.2: 1321cf200d32Sopenharmony_ci------ 1322cf200d32Sopenharmony_ci 1323cf200d32Sopenharmony_ci- Code cleanup. 1324cf200d32Sopenharmony_ci 1325cf200d32Sopenharmony_ci- Fixed very small formatting bug in display of hex code when a match isn't 1326cf200d32Sopenharmony_ci found when converting from an MBR/gdisk hex code to a GUID type code. 1327cf200d32Sopenharmony_ci 1328cf200d32Sopenharmony_ci- Added the ability to work on disk image files (raw files for virtual 1329cf200d32Sopenharmony_ci machines, backup images, etc.). The program assumes that all such disk 1330cf200d32Sopenharmony_ci image files have 512-byte sectors. 1331cf200d32Sopenharmony_ci 1332cf200d32Sopenharmony_ci- Added verification prompt to 'o' main-menu option to avoid accidental 1333cf200d32Sopenharmony_ci erasures of all partitions. 1334cf200d32Sopenharmony_ci 1335cf200d32Sopenharmony_ci- The "destroy GPT data structures" option ('z' on the experts' menu) now 1336cf200d32Sopenharmony_ci also destroys all EFI GPT (0xEE) partitions in the MBR. 1337cf200d32Sopenharmony_ci 1338cf200d32Sopenharmony_ci- Added an extra warning to the "destroy GPT data structures" option if an APM 1339cf200d32Sopenharmony_ci or BSD disklabel was detected on the disk. 1340cf200d32Sopenharmony_ci 1341cf200d32Sopenharmony_ci- Added a buffer flush after destroying GPT data structures, to get the OS 1342cf200d32Sopenharmony_ci to read the new (empty or MBR-only) partition table. 1343cf200d32Sopenharmony_ci 1344cf200d32Sopenharmony_ci- Fixed bug that allowed entry of nonexistent partition numbers when creating 1345cf200d32Sopenharmony_ci a hybrid MBR. 1346cf200d32Sopenharmony_ci 1347cf200d32Sopenharmony_ci0.4.1: 1348cf200d32Sopenharmony_ci------ 1349cf200d32Sopenharmony_ci 1350cf200d32Sopenharmony_ci- Code cleanup/re-organization 1351cf200d32Sopenharmony_ci 1352cf200d32Sopenharmony_ci- Partition creation function ('n' on main menu) now uses the start of the 1353cf200d32Sopenharmony_ci largest available chunk of free space rather than the first available 1354cf200d32Sopenharmony_ci sector as the default starting sector number. This should enable easier 1355cf200d32Sopenharmony_ci partition creation if there are small bits of free space on the disk. 1356cf200d32Sopenharmony_ci 1357cf200d32Sopenharmony_ci- You can now specify the end point of a partition by using a minus sign, 1358cf200d32Sopenharmony_ci in which case the end point is the default value minus the specified 1359cf200d32Sopenharmony_ci size. For instance, "-200M" creates a partition that ends 200MiB before 1360cf200d32Sopenharmony_ci the default end point. 1361cf200d32Sopenharmony_ci 1362cf200d32Sopenharmony_ci- You can now specify the start point of a partition by using a plus or 1363cf200d32Sopenharmony_ci minus sign, in which case the start point is the specified distance from 1364cf200d32Sopenharmony_ci the start (+) or end (-) of free space. This is exactly the same as the 1365cf200d32Sopenharmony_ci new rules for entry of the end point, except that the default value is 1366cf200d32Sopenharmony_ci set differently. 1367cf200d32Sopenharmony_ci 1368cf200d32Sopenharmony_ci- Deleting a partition now checks for a matching hybrid MBR partition, and 1369cf200d32Sopenharmony_ci if one is found, it's deleted. Any empty space that then surrounds the 1370cf200d32Sopenharmony_ci 0xEE (EFI GPT) MBR partitions is then added to the nearby 0xEE partition. 1371cf200d32Sopenharmony_ci If no non-0xEE partitions are left, a fresh protective MBR is generated. 1372cf200d32Sopenharmony_ci 1373cf200d32Sopenharmony_ci- Added hybrid MBR consistency check to the verify ('v') option and to 1374cf200d32Sopenharmony_ci pre-write checks. If non-0xEE/non-0x00 MBR partitions without 1375cf200d32Sopenharmony_ci corresponding GPT partitions are found, the user is warned. This finding 1376cf200d32Sopenharmony_ci does NOT prevent writing the partition table, though. 1377cf200d32Sopenharmony_ci 1378cf200d32Sopenharmony_ci- Added non-destructive write test when opening the device file, in order 1379cf200d32Sopenharmony_ci to detect the problem with FreeBSD being unable to write to disks with 1380cf200d32Sopenharmony_ci mounted partitions (or other potential problems). 1381cf200d32Sopenharmony_ci 1382cf200d32Sopenharmony_ci0.4.0: 1383cf200d32Sopenharmony_ci------ 1384cf200d32Sopenharmony_ci 1385cf200d32Sopenharmony_ci- Added support for BSD disklabels. The program can now convert disks that 1386cf200d32Sopenharmony_ci use "raw" disklabels, with the caveat that the first partition will 1387cf200d32Sopenharmony_ci almost certainly need to be deleted because it'll overlap the main GPT 1388cf200d32Sopenharmony_ci header; and convert disklabels contained within a GPT (or a former MBR, 1389cf200d32Sopenharmony_ci converted to GPT) partition. In the latter case, the 'b' main menu option 1390cf200d32Sopenharmony_ci is used. 1391cf200d32Sopenharmony_ci 1392cf200d32Sopenharmony_ci- Added support for compiling on FreeBSD. 1393cf200d32Sopenharmony_ci 1394cf200d32Sopenharmony_ci- Fixed bug that could cause crashes or incomplete sorts when sorting 1395cf200d32Sopenharmony_ci the partition table. 1396cf200d32Sopenharmony_ci 1397cf200d32Sopenharmony_ci- New partitions, including converted ones, now take on the name of the 1398cf200d32Sopenharmony_ci partition type as a default name. 1399cf200d32Sopenharmony_ci 1400cf200d32Sopenharmony_ci- Reorganized some code; created a separate C++ class for GPT partitions 1401cf200d32Sopenharmony_ci (GPTPart), which replaced a struct and enabled moving code from the 1402cf200d32Sopenharmony_ci bloated GPTData class into GPTPart. 1403cf200d32Sopenharmony_ci 1404cf200d32Sopenharmony_ci- Fixed a bug that produced spurious warnings about unknown sector sizes 1405cf200d32Sopenharmony_ci when loading a backup file. 1406cf200d32Sopenharmony_ci 1407cf200d32Sopenharmony_ci0.3.5: 1408cf200d32Sopenharmony_ci------ 1409cf200d32Sopenharmony_ci 1410cf200d32Sopenharmony_ciNote: This version was not officially publicly released; I wanted to test 1411cf200d32Sopenharmony_cithe big-endian support while developing 0.4.0. 1412cf200d32Sopenharmony_ci 1413cf200d32Sopenharmony_ci- Tweaked the disk type identification code to warn users to re-sync their 1414cf200d32Sopenharmony_ci hybrid MBRs when one is detected. 1415cf200d32Sopenharmony_ci 1416cf200d32Sopenharmony_ci- Tweaked MBR-reading code to ignore 0xEE (EFI GPT) partitions. This will 1417cf200d32Sopenharmony_ci only have an effect on a poorly partitioned MBR disk that contains an 1418cf200d32Sopenharmony_ci inappropriate EFI GPT partition, or when attempting to recover a 1419cf200d32Sopenharmony_ci corrupted disk by using the hybrid MBR for data recovery. 1420cf200d32Sopenharmony_ci 1421cf200d32Sopenharmony_ci- Added big-endian (PowerPC, etc.) support! 1422cf200d32Sopenharmony_ci 1423cf200d32Sopenharmony_ci- Added code to identify and warn of the presence of an Apple Partition 1424cf200d32Sopenharmony_ci Map (APM) on the disk. 1425cf200d32Sopenharmony_ci 1426cf200d32Sopenharmony_ci- Enabled MBR conversion code to handle multiple logical partitions. 1427cf200d32Sopenharmony_ci 1428cf200d32Sopenharmony_ci0.3.4: 1429cf200d32Sopenharmony_ci------ 1430cf200d32Sopenharmony_ci 1431cf200d32Sopenharmony_ci- Fixed bug that enabled (possibly accidental) entry of MBR type codes of 1432cf200d32Sopenharmony_ci 0x00 in GPTData::MakeHybrid(). The fix also enables entry of default 1433cf200d32Sopenharmony_ci type code by pressing the Enter key when prompted. Applied a similar 1434cf200d32Sopenharmony_ci fix to the entry of the type code for the second protective partition, 1435cf200d32Sopenharmony_ci if one is used. 1436cf200d32Sopenharmony_ci 1437cf200d32Sopenharmony_ci- Fixed a typo: "sectors" was spelled "sectprs" in one spot! 1438cf200d32Sopenharmony_ci 1439cf200d32Sopenharmony_ci- Fixed bug that caused default entry for end sector to be refused if an 1440cf200d32Sopenharmony_ci initial value using a plus sign (e.g., "+20G") was also refused. 1441cf200d32Sopenharmony_ci 1442cf200d32Sopenharmony_ci0.3.3: 1443cf200d32Sopenharmony_ci------ 1444cf200d32Sopenharmony_ci 1445cf200d32Sopenharmony_ci- Gave users control over the way MBR partitions are assigned to slots in a 1446cf200d32Sopenharmony_ci hybrid MBR setup; the original method (putting the 0xEE partition after 1447cf200d32Sopenharmony_ci the real partitions) works well for non-boot disks, but both GRUB and 1448cf200d32Sopenharmony_ci GRUB2 become confused by this type of setup, so it needs changing. 1449cf200d32Sopenharmony_ci 1450cf200d32Sopenharmony_ci- Changed "blocks" to "sectors" in GPT and MBR table displays. 1451cf200d32Sopenharmony_ci 1452cf200d32Sopenharmony_ci- Added "Boot" column to MBR table display; shows an asterisk (*) when the 1453cf200d32Sopenharmony_ci partition's status is bootable. 1454cf200d32Sopenharmony_ci 1455cf200d32Sopenharmony_ci0.3.2: 1456cf200d32Sopenharmony_ci------ 1457cf200d32Sopenharmony_ci 1458cf200d32Sopenharmony_ci- Changed __DARWIN_UNIX03 to __APPLE__ as code to enable MacOS X support. 1459cf200d32Sopenharmony_ci 1460cf200d32Sopenharmony_ci- Added the ability to create a hybrid MBR ('h' on experts' menu). This was 1461cf200d32Sopenharmony_ci motivated by my discovery that Windows 7 remains brain-dead when it comes 1462cf200d32Sopenharmony_ci to the ability to boot from a GPT disk, at least on BIOS-based machines. 1463cf200d32Sopenharmony_ci 1464cf200d32Sopenharmony_ci- Added 'z' option to experts' menu, to destroy GPT data structures and 1465cf200d32Sopenharmony_ci exit. The intent is to use this feature to enable subsequent partitioning 1466cf200d32Sopenharmony_ci of the disk using fdisk or other GPT-unaware tools. (GNU Parted will wipe 1467cf200d32Sopenharmony_ci the GPT data structures itself when you create a new MBR ["msdos 1468cf200d32Sopenharmony_ci disklabel," in Parted parlance], so using Parted is another option.) 1469cf200d32Sopenharmony_ci 1470cf200d32Sopenharmony_ci- Slightly altered the effect of the 'o' command on the main menu. It now 1471cf200d32Sopenharmony_ci blanks out the protective MBR, as well as the GPT data. 1472cf200d32Sopenharmony_ci 1473cf200d32Sopenharmony_ci0.3.1: 1474cf200d32Sopenharmony_ci------ 1475cf200d32Sopenharmony_ci 1476cf200d32Sopenharmony_ci- Added Mac OS X support, provided as a patch by David Hubbard 1477cf200d32Sopenharmony_ci (david.c.hubbard@gmail.com). 1478cf200d32Sopenharmony_ci 1479cf200d32Sopenharmony_ci- Fixed bug in disksize() function on Mac OS. (Possibly dependent on the 1480cf200d32Sopenharmony_ci kernel and/or GCC version.) The disk size, of type uint64_t, was not 1481cf200d32Sopenharmony_ci being passed correctly, so I reorganized the function to return it as 1482cf200d32Sopenharmony_ci the function's return value rather than as a parameter. This seems to 1483cf200d32Sopenharmony_ci work OK on my Mac OS test system and on both 32- and 64-bit Linux 1484cf200d32Sopenharmony_ci systems. 1485cf200d32Sopenharmony_ci 1486cf200d32Sopenharmony_ci- Fixed off-by-one bug in GPTData::FindLastAvailable(). 1487cf200d32Sopenharmony_ci 1488cf200d32Sopenharmony_ci- Fixed bug that caused display of options after a disk-write error. 1489cf200d32Sopenharmony_ci 1490cf200d32Sopenharmony_ci- Fixed several incorrect MacOS X partition type GUIDs, thanks to Yves 1491cf200d32Sopenharmony_ci Blusseau (1otnwmz02@sneakemail.com). 1492cf200d32Sopenharmony_ci 1493cf200d32Sopenharmony_ci0.3.0: 1494cf200d32Sopenharmony_ci------ 1495cf200d32Sopenharmony_ci 1496cf200d32Sopenharmony_ci- Changed version number to 0.3.0, reflecting the fact that I've received 1497cf200d32Sopenharmony_ci no significant bug reports and so am elevating the program to "beta" 1498cf200d32Sopenharmony_ci status. This change also entailed altering the warning the program 1499cf200d32Sopenharmony_ci displays when saving partition table changes. 1500cf200d32Sopenharmony_ci 1501cf200d32Sopenharmony_ci- Fixed minor bug in CHS geometry of the protective MBR's type EE partition 1502cf200d32Sopenharmony_ci (was producing 0x000200 as the start value, but should be 0x000100). 1503cf200d32Sopenharmony_ci Should be a non-critical bug since the protective MBR partition 1504cf200d32Sopenharmony_ci definition is only there to keep MBR-only disk utilities from messing 1505cf200d32Sopenharmony_ci with the disk. 1506cf200d32Sopenharmony_ci 1507cf200d32Sopenharmony_ci- Added ability to enter GUIDs as single massive strings rather than in 1508cf200d32Sopenharmony_ci chunks. 1509cf200d32Sopenharmony_ci 1510cf200d32Sopenharmony_ci0.2.2: 1511cf200d32Sopenharmony_ci------ 1512cf200d32Sopenharmony_ci 1513cf200d32Sopenharmony_ci- Added #include directives required to compile the program using GCC 1514cf200d32Sopenharmony_ci 4.4.0. 1515cf200d32Sopenharmony_ci 1516cf200d32Sopenharmony_ci0.2.1: 1517cf200d32Sopenharmony_ci------ 1518cf200d32Sopenharmony_ci 1519cf200d32Sopenharmony_ci- Fixed partition numbering problem in reports of partition overlaps in 1520cf200d32Sopenharmony_ci verification function. 1521cf200d32Sopenharmony_ci 1522cf200d32Sopenharmony_ci- Fixed 1-sector partition size problem when creating new partitions 1523cf200d32Sopenharmony_ci (partitions were 1 sector too big when using the +size option). 1524cf200d32Sopenharmony_ci 1525cf200d32Sopenharmony_ci- Changed BytesToSI() to display values in bytes without decimal points 1526cf200d32Sopenharmony_ci (e.g., "512 bytes" rather than "512.0 bytes"). 1527cf200d32Sopenharmony_ci 1528cf200d32Sopenharmony_ci- Added GPTData class member functions to retrieve GPT data structure 1529cf200d32Sopenharmony_ci locations on disk; used in my internal-use-only GPT-wiping program. 1530cf200d32Sopenharmony_ci 1531cf200d32Sopenharmony_ci- Eliminated the "a reboot is recommended" notice after writing the 1532cf200d32Sopenharmony_ci partition table. 1533cf200d32Sopenharmony_ci 1534cf200d32Sopenharmony_ci- Added notice after sorting the partition table to the effect that 1535cf200d32Sopenharmony_ci editing /etc/fstab and/or the boot loader files may be required. 1536cf200d32Sopenharmony_ci 1537cf200d32Sopenharmony_ci- Fixed bug in MBR-reading function that caused 0x0f (Win95 LBA) and 0x85 1538cf200d32Sopenharmony_ci (Linux extended) extended partitions to not be read. 1539cf200d32Sopenharmony_ci 1540cf200d32Sopenharmony_ci- Fixed bug in GetLastSector() (in support.cc) that would have prevented 1541cf200d32Sopenharmony_ci correct user entry of over-32-bit sector numbers on 32-bit systems. 1542cf200d32Sopenharmony_ci 1543cf200d32Sopenharmony_ci- Made some changes/corrections to the partition type list in 1544cf200d32Sopenharmony_ci parttypes.cc. Most of these were based on newly-discovered MBR type 1545cf200d32Sopenharmony_ci codes for Apple (Mac OS X) filesystems. 1546cf200d32Sopenharmony_ci 1547cf200d32Sopenharmony_ci- General code cleanup (setting explicit casts, etc.) 1548cf200d32Sopenharmony_ci 1549cf200d32Sopenharmony_ci0.2.0: 1550cf200d32Sopenharmony_ci------ 1551cf200d32Sopenharmony_ci 1552cf200d32Sopenharmony_ci- Initial semi-public release 1553