1.\" Copyright (c) 2007, 2008 Marcel Moolenaar 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\" SUCH DAMAGE. 24.\" 25.\" $FreeBSD$ 26.\" 27.Dd July 26, 2023 28.Dt GPART 8 29.Os 30.Sh NAME 31.Nm gpart 32.Nd "control utility for the disk partitioning GEOM class" 33.Sh SYNOPSIS 34.\" ==== ADD ==== 35.Nm 36.Cm add 37.Fl t Ar type 38.Op Fl a Ar alignment 39.Op Fl b Ar start 40.Op Fl s Ar size 41.Op Fl i Ar index 42.Op Fl l Ar label 43.Op Fl f Ar flags 44.Ar geom 45.\" ==== BACKUP ==== 46.Nm 47.Cm backup 48.Ar geom 49.\" ==== BOOTCODE ==== 50.Nm 51.Cm bootcode 52.Op Fl N 53.Op Fl b Ar bootcode 54.Op Fl p Ar partcode Fl i Ar index 55.Op Fl f Ar flags 56.Ar geom 57.\" ==== COMMIT ==== 58.Nm 59.Cm commit 60.Ar geom 61.\" ==== CREATE ==== 62.Nm 63.Cm create 64.Fl s Ar scheme 65.Op Fl n Ar entries 66.Op Fl f Ar flags 67.Ar provider 68.\" ==== DELETE ==== 69.Nm 70.Cm delete 71.Fl i Ar index 72.Op Fl f Ar flags 73.Ar geom 74.\" ==== DESTROY ==== 75.Nm 76.Cm destroy 77.Op Fl F 78.Op Fl f Ar flags 79.Ar geom 80.\" ==== MODIFY ==== 81.Nm 82.Cm modify 83.Fl i Ar index 84.Op Fl l Ar label 85.Op Fl t Ar type 86.Op Fl f Ar flags 87.Ar geom 88.\" ==== RECOVER ==== 89.Nm 90.Cm recover 91.Op Fl f Ar flags 92.Ar geom 93.\" ==== RESIZE ==== 94.Nm 95.Cm resize 96.Fl i Ar index 97.Op Fl a Ar alignment 98.Op Fl s Ar size 99.Op Fl f Ar flags 100.Ar geom 101.\" ==== RESTORE ==== 102.Nm 103.Cm restore 104.Op Fl lF 105.Op Fl f Ar flags 106.Ar provider 107.Op Ar ... 108.\" ==== SET ==== 109.Nm 110.Cm set 111.Fl a Ar attrib 112.Fl i Ar index 113.Op Fl f Ar flags 114.Ar geom 115.\" ==== SHOW ==== 116.Nm 117.Cm show 118.Op Fl l | r 119.Op Fl p 120.Op Ar geom ... 121.\" ==== UNDO ==== 122.Nm 123.Cm undo 124.Ar geom 125.\" ==== UNSET ==== 126.Nm 127.Cm unset 128.Fl a Ar attrib 129.Fl i Ar index 130.Op Fl f Ar flags 131.Ar geom 132.\" 133.Nm 134.Cm list 135.Nm 136.Cm status 137.Nm 138.Cm load 139.Nm 140.Cm unload 141.Sh DESCRIPTION 142The 143.Nm 144utility is used to partition GEOM providers, normally disks. 145The first argument is the action to be taken: 146.Bl -tag -width ".Cm bootcode" 147.\" ==== ADD ==== 148.It Cm add 149Add a new partition to the partitioning scheme given by 150.Ar geom . 151The partition type must be specified with 152.Fl t Ar type . 153The partition's location, size, and other attributes will be calculated 154automatically if the corresponding options are not specified. 155.Pp 156The 157.Cm add 158command accepts these options: 159.Bl -tag -width 12n 160.It Fl a Ar alignment 161If specified, then the 162.Nm 163utility tries to align 164.Ar start 165offset and partition 166.Ar size 167to be multiple of 168.Ar alignment 169value. 170.It Fl b Ar start 171The logical block address where the partition will begin. 172An SI unit suffix is allowed. 173.It Fl f Ar flags 174Additional operational flags. 175See the section entitled 176.Sx "OPERATIONAL FLAGS" 177below for a discussion 178about its use. 179.It Fl i Ar index 180The index in the partition table at which the new partition is to be 181placed. 182The index determines the name of the device special file used 183to represent the partition. 184.It Fl l Ar label 185The label attached to the partition. 186This option is only valid when used on partitioning schemes that support 187partition labels. 188.It Fl s Ar size 189Create a partition of size 190.Ar size . 191An SI unit suffix is allowed. 192.It Fl t Ar type 193Create a partition of type 194.Ar type . 195Partition types are discussed below in the section entitled 196.Sx "PARTITION TYPES" . 197.El 198.\" ==== BACKUP ==== 199.It Cm backup 200Dump a partition table to standard output in a special format used by the 201.Cm restore 202action. 203.\" ==== BOOTCODE ==== 204.It Cm bootcode 205Embed bootstrap code into the partitioning scheme's metadata on the 206.Ar geom 207(using 208.Fl b Ar bootcode ) 209or write bootstrap code into a partition (using 210.Fl p Ar partcode 211and 212.Fl i Ar index ) . 213.Pp 214The 215.Cm bootcode 216command accepts these options: 217.Bl -tag -width 10n 218.It Fl N 219Do not preserve the Volume Serial Number for MBR. 220MBR bootcode contains Volume Serial Number by default, and 221.Nm 222tries to preserve it when installing new bootstrap code. 223This option skips preservation to help with some versions of 224.Xr boot0cfg 8 225that do not support Volume Serial Number. 226.It Fl b Ar bootcode 227Embed bootstrap code from the file 228.Ar bootcode 229into the partitioning scheme's metadata for 230.Ar geom . 231Not all partitioning schemes have embedded bootstrap code, so the 232.Fl b Ar bootcode 233option is scheme-specific in nature (see the section entitled 234.Sx BOOTSTRAPPING 235below). 236The 237.Ar bootcode 238file must match the partitioning scheme's requirements for file content 239and size. 240.It Fl f Ar flags 241Additional operational flags. 242See the section entitled 243.Sx "OPERATIONAL FLAGS" 244below for a discussion 245about its use. 246.It Fl i Ar index 247Specify the target partition for 248.Fl p Ar partcode . 249.It Fl p Ar partcode 250Write the bootstrap code from the file 251.Ar partcode 252into the 253.Ar geom 254partition specified by 255.Fl i Ar index . 256The size of the file must be smaller than the size of the partition. 257.El 258.\" ==== COMMIT ==== 259.It Cm commit 260Commit any pending changes for geom 261.Ar geom . 262All actions are committed by default and will not result in 263pending changes. 264Actions can be modified with the 265.Fl f Ar flags 266option so that they are not committed, but become pending. 267Pending changes are reflected by the geom and the 268.Nm 269utility, but they are not actually written to disk. 270The 271.Cm commit 272action will write all pending changes to disk. 273.\" ==== CREATE ==== 274.It Cm create 275Create a new partitioning scheme on a provider given by 276.Ar provider . 277The scheme to use must be specified with the 278.Fl s Ar scheme 279option. 280.Pp 281The 282.Cm create 283command accepts these options: 284.Bl -tag -width 10n 285.It Fl f Ar flags 286Additional operational flags. 287See the section entitled 288.Sx "OPERATIONAL FLAGS" 289below for a discussion 290about its use. 291.It Fl n Ar entries 292The number of entries in the partition table. 293Every partitioning scheme has a minimum and maximum number of entries. 294This option allows tables to be created with a number of entries 295that is within the limits. 296Some schemes have a maximum equal to the minimum and some schemes have 297a maximum large enough to be considered unlimited. 298By default, partition tables are created with the minimum number of 299entries. 300.It Fl s Ar scheme 301Specify the partitioning scheme to use. 302The kernel must have support for a particular scheme before 303that scheme can be used to partition a disk. 304.El 305.\" ==== DELETE ==== 306.It Cm delete 307Delete a partition from geom 308.Ar geom 309and further identified by the 310.Fl i Ar index 311option. 312The partition cannot be actively used by the kernel. 313.Pp 314The 315.Cm delete 316command accepts these options: 317.Bl -tag -width 10n 318.It Fl f Ar flags 319Additional operational flags. 320See the section entitled 321.Sx "OPERATIONAL FLAGS" 322below for a discussion 323about its use. 324.It Fl i Ar index 325Specifies the index of the partition to be deleted. 326.El 327.\" ==== DESTROY ==== 328.It Cm destroy 329Destroy the partitioning scheme as implemented by geom 330.Ar geom . 331.Pp 332The 333.Cm destroy 334command accepts these options: 335.Bl -tag -width 10n 336.It Fl F 337Forced destroying of the partition table even if it is not empty. 338.It Fl f Ar flags 339Additional operational flags. 340See the section entitled 341.Sx "OPERATIONAL FLAGS" 342below for a discussion 343about its use. 344.El 345.\" ==== MODIFY ==== 346.It Cm modify 347Modify a partition from geom 348.Ar geom 349and further identified by the 350.Fl i Ar index 351option. 352Only the type and/or label of the partition can be modified. 353Not all partitioning schemes support labels and it is invalid to 354try to change a partition label in such cases. 355.Pp 356The 357.Cm modify 358command accepts these options: 359.Bl -tag -width 10n 360.It Fl f Ar flags 361Additional operational flags. 362See the section entitled 363.Sx "OPERATIONAL FLAGS" 364below for a discussion 365about its use. 366.It Fl i Ar index 367Specifies the index of the partition to be modified. 368.It Fl l Ar label 369Change the partition label to 370.Ar label . 371.It Fl t Ar type 372Change the partition type to 373.Ar type . 374.El 375.\" ==== RECOVER ==== 376.It Cm recover 377Recover a corrupt partition's scheme metadata on the geom 378.Ar geom . 379See the section entitled 380.Sx RECOVERING 381below for the additional information. 382.Pp 383The 384.Cm recover 385command accepts these options: 386.Bl -tag -width 10n 387.It Fl f Ar flags 388Additional operational flags. 389See the section entitled 390.Sx "OPERATIONAL FLAGS" 391below for a discussion 392about its use. 393.El 394.\" ==== RESIZE ==== 395.It Cm resize 396Resize a partition from geom 397.Ar geom 398and further identified by the 399.Fl i Ar index 400option. 401If the new size is not specified it is automatically calculated 402to be the maximum available from 403.Ar geom . 404.Pp 405The 406.Cm resize 407command accepts these options: 408.Bl -tag -width 12n 409.It Fl a Ar alignment 410If specified, then the 411.Nm 412utility tries to align partition 413.Ar size 414to be a multiple of the 415.Ar alignment 416value. 417.It Fl f Ar flags 418Additional operational flags. 419See the section entitled 420.Sx "OPERATIONAL FLAGS" 421below for a discussion 422about its use. 423.It Fl i Ar index 424Specifies the index of the partition to be resized. 425.It Fl s Ar size 426Specifies the new size of the partition, in logical blocks. 427An SI unit suffix is allowed. 428.El 429.\" ==== RESTORE ==== 430.It Cm restore 431Restore the partition table from a backup previously created by the 432.Cm backup 433action and read from standard input. 434Only the partition table is restored. 435This action does not affect the content of partitions. 436After restoring the partition table and writing bootcode if needed, 437user data must be restored from backup. 438.Pp 439The 440.Cm restore 441command accepts these options: 442.Bl -tag -width 10n 443.It Fl F 444Destroy partition table on the given 445.Ar provider 446before doing restore. 447.It Fl f Ar flags 448Additional operational flags. 449See the section entitled 450.Sx "OPERATIONAL FLAGS" 451below for a discussion 452about its use. 453.It Fl l 454Restore partition labels for partitioning schemes that support them. 455.El 456.\" ==== SET ==== 457.It Cm set 458Set the named attribute on the partition entry. 459See the section entitled 460.Sx ATTRIBUTES 461below for a list of available attributes. 462.Pp 463The 464.Cm set 465command accepts these options: 466.Bl -tag -width 10n 467.It Fl a Ar attrib 468Specifies the attribute to set. 469.It Fl f Ar flags 470Additional operational flags. 471See the section entitled 472.Sx "OPERATIONAL FLAGS" 473below for a discussion 474about its use. 475.It Fl i Ar index 476Specifies the index of the partition on which the attribute will be set. 477.El 478.\" ==== SHOW ==== 479.It Cm show 480Show current partition information for the specified geoms, or all 481geoms if none are specified. 482The default output includes the logical starting block of each 483partition, the partition size in blocks, the partition index number, 484the partition type, and a human readable partition size. 485Block sizes and locations are based on the device's Sectorsize 486as shown by 487.Cm gpart list . 488.Pp 489The 490.Cm show 491command accepts these options: 492.Bl -tag -width 10n 493.It Fl l 494For partitioning schemes that support partition labels, print them 495instead of partition type. 496.It Fl p 497Show provider names instead of partition indexes. 498.It Fl r 499Show raw partition type instead of symbolic name. 500.El 501.\" ==== UNDO ==== 502.It Cm undo 503Revert any pending changes for geom 504.Ar geom . 505This action is the opposite of the 506.Cm commit 507action and can be used to undo any changes that have not been committed. 508.\" ==== UNSET ==== 509.It Cm unset 510Clear the named attribute on the partition entry. 511See the section entitled 512.Sx ATTRIBUTES 513below for a list of available attributes. 514.Pp 515The 516.Cm unset 517command accepts these options: 518.Bl -tag -width 10n 519.It Fl a Ar attrib 520Specifies the attribute to clear. 521.It Fl f Ar flags 522Additional operational flags. 523See the section entitled 524.Sx "OPERATIONAL FLAGS" 525below for a discussion 526about its use. 527.It Fl i Ar index 528Specifies the index of the partition on which the attribute will be cleared. 529.El 530.It Cm list 531See 532.Xr geom 8 . 533.It Cm status 534See 535.Xr geom 8 . 536.It Cm load 537See 538.Xr geom 8 . 539.It Cm unload 540See 541.Xr geom 8 . 542.El 543.Sh PARTITIONING SCHEMES 544Several partitioning schemes are supported by the 545.Nm 546utility: 547.Bl -tag -width ".Cm BSD64" 548.It Cm APM 549Apple Partition Map, used by PowerPC(R) Macintosh(R) computers. 550Requires the 551.Cd GEOM_PART_APM 552kernel option. 553.It Cm BSD 554Traditional BSD 555.Xr disklabel 8 , 556usually used to subdivide MBR partitions. 557.Po 558This scheme can also be used as the sole partitioning method, without 559an MBR. 560Partition editing tools from other operating systems often do not 561understand the bare disklabel partition layout, so this is sometimes 562called 563.Dq dangerously dedicated . 564.Pc 565Requires the 566.Cm GEOM_PART_BSD 567kernel option. 568.It Cm BSD64 56964-bit implementation of BSD disklabel used in 570.Dx 571to subdivide MBR 572or GPT partitions. 573Requires the 574.Cm GEOM_PART_BSD64 575kernel option. 576.It Cm LDM 577The Logical Disk Manager is an implementation of volume manager for 578Microsoft Windows NT. 579Requires the 580.Cd GEOM_PART_LDM 581kernel option. 582.It Cm GPT 583GUID Partition Table is used on Intel-based Macintosh computers and 584gradually replacing MBR on most PCs and other systems. 585Requires the 586.Cm GEOM_PART_GPT 587kernel option. 588.It Cm MBR 589Master Boot Record is used on PCs and removable media. 590Requires the 591.Cm GEOM_PART_MBR 592kernel option. 593The 594.Cm GEOM_PART_EBR 595option adds support for the Extended Boot Record (EBR), 596which is used to define a logical partition. 597The 598.Cm GEOM_PART_EBR_COMPAT 599option enables backward compatibility for partition names 600in the EBR scheme. 601It also prevents any type of actions on such partitions. 602.El 603.Pp 604See 605.Xr glabel 8 606for additional information on labelization of devices and partitions. 607.Sh PARTITION TYPES 608Partition types are identified on disk by particular strings or magic 609values. 610The 611.Nm 612utility uses symbolic names for common partition types so the user 613does not need to know these values or other details of the partitioning 614scheme in question. 615The 616.Nm 617utility also allows the user to specify scheme-specific partition types 618for partition types that do not have symbolic names. 619Symbolic names currently understood and used by 620.Fx 621are: 622.Bl -tag -width ".Cm dragonfly-disklabel64" 623.It Cm apple-boot 624The system partition dedicated to storing boot loaders on some Apple 625systems. 626The scheme-specific types are 627.Qq Li "!171" 628for MBR, 629.Qq Li "!Apple_Bootstrap" 630for APM, and 631.Qq Li "!426f6f74-0000-11aa-aa11-00306543ecac" 632for GPT. 633.It Cm bios-boot 634The system partition dedicated to second stage of the boot loader program. 635Usually it is used by the GRUB 2 loader for GPT partitioning schemes. 636The scheme-specific type is 637.Qq Li "!21686148-6449-6E6F-744E-656564454649" . 638.It Cm efi 639The system partition for computers that use the Extensible Firmware 640Interface (EFI). 641The scheme-specific types are 642.Qq Li "!239" 643for MBR, and 644.Qq Li "!c12a7328-f81f-11d2-ba4b-00a0c93ec93b" 645for GPT. 646.It Cm freebsd 647A 648.Fx 649partition subdivided into filesystems with a 650.Bx 651disklabel. 652This is a legacy partition type and should not be used for the APM 653or GPT schemes. 654The scheme-specific types are 655.Qq Li "!165" 656for MBR, 657.Qq Li "!FreeBSD" 658for APM, and 659.Qq Li "!516e7cb4-6ecf-11d6-8ff8-00022d09712b" 660for GPT. 661.It Cm freebsd-boot 662A 663.Fx 664partition dedicated to bootstrap code. 665The scheme-specific type is 666.Qq Li "!83bd6b9d-7f41-11dc-be0b-001560b84f0f" 667for GPT. 668.It Cm freebsd-swap 669A 670.Fx 671partition dedicated to swap space. 672The scheme-specific types are 673.Qq Li "!FreeBSD-swap" 674for APM, and 675.Qq Li "!516e7cb5-6ecf-11d6-8ff8-00022d09712b" 676for GPT. 677.It Cm freebsd-ufs 678A 679.Fx 680partition that contains a UFS or UFS2 filesystem. 681The scheme-specific types are 682.Qq Li "!FreeBSD-UFS" 683for APM, and 684.Qq Li "!516e7cb6-6ecf-11d6-8ff8-00022d09712b" 685for GPT. 686.It Cm freebsd-vinum 687A 688.Fx 689partition that contains a Vinum volume. 690The scheme-specific types are 691.Qq Li "!FreeBSD-Vinum" 692for APM, and 693.Qq Li "!516e7cb8-6ecf-11d6-8ff8-00022d09712b" 694for GPT. 695.It Cm freebsd-zfs 696A 697.Fx 698partition that contains a ZFS volume. 699The scheme-specific types are 700.Qq Li "!FreeBSD-ZFS" 701for APM, and 702.Qq Li "!516e7cba-6ecf-11d6-8ff8-00022d09712b" 703for GPT. 704.El 705.Pp 706Other symbolic names that can be used with the 707.Nm 708utility are: 709.Bl -tag -width ".Cm dragonfly-disklabel64" 710.It Cm apple-apfs 711An Apple macOS partition used for the Apple file system, APFS. 712.It Cm apple-core-storage 713An Apple Mac OS X partition used by logical volume manager known as 714Core Storage. 715The scheme-specific type is 716.Qq Li "!53746f72-6167-11aa-aa11-00306543ecac" 717for GPT. 718.It Cm apple-hfs 719An Apple Mac OS X partition that contains a HFS or HFS+ filesystem. 720The scheme-specific types are 721.Qq Li "!175" 722for MBR, 723.Qq Li "!Apple_HFS" 724for APM and 725.Qq Li "!48465300-0000-11aa-aa11-00306543ecac" 726for GPT. 727.It Cm apple-label 728An Apple Mac OS X partition dedicated to partition metadata that descibes 729disk device. 730The scheme-specific type is 731.Qq Li "!4c616265-6c00-11aa-aa11-00306543ecac" 732for GPT. 733.It Cm apple-raid 734An Apple Mac OS X partition used in a software RAID configuration. 735The scheme-specific type is 736.Qq Li "!52414944-0000-11aa-aa11-00306543ecac" 737for GPT. 738.It Cm apple-raid-offline 739An Apple Mac OS X partition used in a software RAID configuration. 740The scheme-specific type is 741.Qq Li "!52414944-5f4f-11aa-aa11-00306543ecac" 742for GPT. 743.It Cm apple-tv-recovery 744An Apple Mac OS X partition used by Apple TV. 745The scheme-specific type is 746.Qq Li "!5265636f-7665-11aa-aa11-00306543ecac" 747for GPT. 748.It Cm apple-ufs 749An Apple Mac OS X partition that contains a UFS filesystem. 750The scheme-specific types are 751.Qq Li "!168" 752for MBR, 753.Qq Li "!Apple_UNIX_SVR2" 754for APM and 755.Qq Li "!55465300-0000-11aa-aa11-00306543ecac" 756for GPT. 757.It Cm apple-zfs 758An Apple Mac OS X partition that contains a ZFS volume. 759The scheme-specific type is 760.Qq Li "!6a898cc3-1dd2-11b2-99a6-080020736631" 761for GPT. 762The same GUID is being used also for 763.Sy illumos/Solaris /usr partition . 764See 765.Sx CAVEATS 766section below. 767.It Cm dragonfly-label32 768A 769.Dx 770partition subdivided into filesystems with a 771.Bx 772disklabel. 773The scheme-specific type is 774.Qq Li "!9d087404-1ca5-11dc-8817-01301bb8a9f5" 775for GPT. 776.It Cm dragonfly-label64 777A 778.Dx 779partition subdivided into filesystems with a 780disklabel64. 781The scheme-specific type is 782.Qq Li "!3d48ce54-1d16-11dc-8696-01301bb8a9f5" 783for GPT. 784.It Cm dragonfly-legacy 785A legacy partition type used in 786.Dx . 787The scheme-specific type is 788.Qq Li "!bd215ab2-1d16-11dc-8696-01301bb8a9f5" 789for GPT. 790.It Cm dragonfly-ccd 791A 792.Dx 793partition used with Concatenated Disk driver. 794The scheme-specific type is 795.Qq Li "!dbd5211b-1ca5-11dc-8817-01301bb8a9f5" 796for GPT. 797.It Cm dragonfly-hammer 798A 799.Dx 800partition that contains a Hammer filesystem. 801The scheme-specific type is 802.Qq Li "!61dc63ac-6e38-11dc-8513-01301bb8a9f5" 803for GPT. 804.It Cm dragonfly-hammer2 805A 806.Dx 807partition that contains a Hammer2 filesystem. 808The scheme-specific type is 809.Qq Li "!5cbb9ad1-862d-11dc-a94d-01301bb8a9f5" 810for GPT. 811.It Cm dragonfly-swap 812A 813.Dx 814partition dedicated to swap space. 815The scheme-specific type is 816.Qq Li "!9d58fdbd-1ca5-11dc-8817-01301bb8a9f5" 817for GPT. 818.It Cm dragonfly-ufs 819A 820.Dx 821partition that contains an UFS1 filesystem. 822The scheme-specific type is 823.Qq Li "!9d94ce7c-1ca5-11dc-8817-01301bb8a9f5" 824for GPT. 825.It Cm dragonfly-vinum 826A 827.Dx 828partition used with Logical Volume Manager. 829The scheme-specific type is 830.Qq Li "!9dd4478f-1ca5-11dc-8817-01301bb8a9f5" 831for GPT. 832.It Cm ebr 833A partition subdivided into filesystems with a EBR. 834The scheme-specific type is 835.Qq Li "!5" 836for MBR. 837.It Cm fat16 838A partition that contains a FAT16 filesystem. 839The scheme-specific type is 840.Qq Li "!6" 841for MBR. 842.It Cm fat32 843A partition that contains a FAT32 filesystem. 844The scheme-specific type is 845.Qq Li "!11" 846for MBR. 847.It Cm fat32lba 848A partition that contains a FAT32 (LBA) filesystem. 849The scheme-specific type is 850.Qq Li "!12" 851for MBR. 852.It Cm hifive-fsbl 853A raw partition containing a HiFive first stage bootloader. 854The scheme-specific type is 855.Qq Li "!5b193300-fc78-40cd-8002-e86c45580b47" 856for GPT. 857.It Cm hifive-bbl 858A raw partition containing a HiFive second stage bootloader. 859The scheme-specific type is 860.Qq Li "!2e54b353-1271-4842-806f-e436d6af6985" 861for GPT. 862.It Cm linux-data 863A Linux partition that contains some filesystem with data. 864The scheme-specific types are 865.Qq Li "!131" 866for MBR and 867.Qq Li "!0fc63daf-8483-4772-8e79-3d69d8477de4" 868for GPT. 869.It Cm linux-lvm 870A Linux partition dedicated to Logical Volume Manager. 871The scheme-specific types are 872.Qq Li "!142" 873for MBR and 874.Qq Li "!e6d6d379-f507-44c2-a23c-238f2a3df928" 875for GPT. 876.It Cm linux-raid 877A Linux partition used in a software RAID configuration. 878The scheme-specific types are 879.Qq Li "!253" 880for MBR and 881.Qq Li "!a19d880f-05fc-4d3b-a006-743f0f84911e" 882for GPT. 883.It Cm linux-swap 884A Linux partition dedicated to swap space. 885The scheme-specific types are 886.Qq Li "!130" 887for MBR and 888.Qq Li "!0657fd6d-a4ab-43c4-84e5-0933c84b4f4f" 889for GPT. 890.It Cm mbr 891A partition that is sub-partitioned by a Master Boot Record (MBR). 892This type is known as 893.Qq Li "!024dee41-33e7-11d3-9d69-0008c781f39f" 894by GPT. 895.It Cm ms-basic-data 896A basic data partition (BDP) for Microsoft operating systems. 897In the GPT this type is the equivalent to partition types 898.Cm fat16 , fat32 899and 900.Cm ntfs 901in MBR. 902This type is used for GPT exFAT partitions. 903The scheme-specific type is 904.Qq Li "!ebd0a0a2-b9e5-4433-87c0-68b6b72699c7" 905for GPT. 906.It Cm ms-ldm-data 907A partition that contains Logical Disk Manager (LDM) volumes. 908The scheme-specific types are 909.Qq Li "!66" 910for MBR, 911.Qq Li "!af9b60a0-1431-4f62-bc68-3311714a69ad" 912for GPT. 913.It Cm ms-ldm-metadata 914A partition that contains Logical Disk Manager (LDM) database. 915The scheme-specific type is 916.Qq Li "!5808c8aa-7e8f-42e0-85d2-e1e90434cfb3" 917for GPT. 918.It Cm netbsd-ccd 919A 920.Nx 921partition used with Concatenated Disk driver. 922The scheme-specific type is 923.Qq Li "!2db519c4-b10f-11dc-b99b-0019d1879648" 924for GPT. 925.It Cm netbsd-cgd 926An encrypted 927.Nx 928partition. 929The scheme-specific type is 930.Qq Li "!2db519ec-b10f-11dc-b99b-0019d1879648" 931for GPT. 932.It Cm netbsd-ffs 933A 934.Nx 935partition that contains an UFS filesystem. 936The scheme-specific type is 937.Qq Li "!49f48d5a-b10e-11dc-b99b-0019d1879648" 938for GPT. 939.It Cm netbsd-lfs 940A 941.Nx 942partition that contains an LFS filesystem. 943The scheme-specific type is 944.Qq Li "!49f48d82-b10e-11dc-b99b-0019d1879648" 945for GPT. 946.It Cm netbsd-raid 947A 948.Nx 949partition used in a software RAID configuration. 950The scheme-specific type is 951.Qq Li "!49f48daa-b10e-11dc-b99b-0019d1879648" 952for GPT. 953.It Cm netbsd-swap 954A 955.Nx 956partition dedicated to swap space. 957The scheme-specific type is 958.Qq Li "!49f48d32-b10e-11dc-b99b-0019d1879648" 959for GPT. 960.It Cm ntfs 961A partition that contains a NTFS or exFAT filesystem. 962The scheme-specific type is 963.Qq Li "!7" 964for MBR. 965.It Cm prep-boot 966The system partition dedicated to storing boot loaders on some PowerPC systems, 967notably those made by IBM. 968The scheme-specific types are 969.Qq Li "!65" 970for MBR and 971.Qq Li "!9e1a2d38-c612-4316-aa26-8b49521e5a8b" 972for GPT. 973.It Cm solaris-boot 974A illumos/Solaris partition dedicated to boot loader. 975The scheme-specific type is 976.Qq Li "!6a82cb45-1dd2-11b2-99a6-080020736631" 977for GPT. 978.It Cm solaris-root 979A illumos/Solaris partition dedicated to root filesystem. 980The scheme-specific type is 981.Qq Li "!6a85cf4d-1dd2-11b2-99a6-080020736631" 982for GPT. 983.It Cm solaris-swap 984A illumos/Solaris partition dedicated to swap. 985The scheme-specific type is 986.Qq Li "!6a87c46f-1dd2-11b2-99a6-080020736631" 987for GPT. 988.It Cm solaris-backup 989A illumos/Solaris partition dedicated to backup. 990The scheme-specific type is 991.Qq Li "!6a8b642b-1dd2-11b2-99a6-080020736631" 992for GPT. 993.It Cm solaris-var 994A illumos/Solaris partition dedicated to /var filesystem. 995The scheme-specific type is 996.Qq Li "!6a8ef2e9-1dd2-11b2-99a6-080020736631" 997for GPT. 998.It Cm solaris-home 999A illumos/Solaris partition dedicated to /home filesystem. 1000The scheme-specific type is 1001.Qq Li "!6a90ba39-1dd2-11b2-99a6-080020736631" 1002for GPT. 1003.It Cm solaris-altsec 1004A illumos/Solaris partition dedicated to alternate sector. 1005The scheme-specific type is 1006.Qq Li "!6a9283a5-1dd2-11b2-99a6-080020736631" 1007for GPT. 1008.It Cm solaris-reserved 1009A illumos/Solaris partition dedicated to reserved space. 1010The scheme-specific type is 1011.Qq Li "!6a945a3b-1dd2-11b2-99a6-080020736631" 1012for GPT. 1013.It Cm vmware-vmfs 1014A partition that contains a VMware File System (VMFS). 1015The scheme-specific types are 1016.Qq Li "!251" 1017for MBR and 1018.Qq Li "!aa31e02a-400f-11db-9590-000c2911d1b8" 1019for GPT. 1020.It Cm vmware-vmkdiag 1021A partition that contains a VMware diagostic filesystem. 1022The scheme-specific types are 1023.Qq Li "!252" 1024for MBR and 1025.Qq Li "!9d275380-40ad-11db-bf97-000c2911d1b8" 1026for GPT. 1027.It Cm vmware-reserved 1028A VMware reserved partition. 1029The scheme-specific type is 1030.Qq Li "!9198effc-31c0-11db-8f-78-000c2911d1b8" 1031for GPT. 1032.It Cm vmware-vsanhdr 1033A partition claimed by VMware VSAN. 1034The scheme-specific type is 1035.Qq Li "!381cfccc-7288-11e0-92ee-000c2911d0b2" 1036for GPT. 1037.El 1038.Sh ATTRIBUTES 1039The scheme-specific attributes for EBR: 1040.Bl -tag -width ".Cm active" 1041.It Cm active 1042.El 1043.Pp 1044The scheme-specific attributes for GPT: 1045.Bl -tag -width ".Cm bootfailed" 1046.It Cm bootme 1047When set, the 1048.Nm gptboot 1049stage 1 boot loader will try to boot the system from this partition. 1050Multiple partitions can be marked with the 1051.Cm bootme 1052attribute. 1053See 1054.Xr gptboot 8 1055for more details. 1056.It Cm bootonce 1057Setting this attribute automatically sets the 1058.Cm bootme 1059attribute. 1060When set, the 1061.Nm gptboot 1062stage 1 boot loader will try to boot the system from this partition only once. 1063Multiple partitions can be marked with the 1064.Cm bootonce 1065and 1066.Cm bootme 1067attribute pairs. 1068See 1069.Xr gptboot 8 1070for more details. 1071.It Cm bootfailed 1072This attribute should not be manually managed. 1073It is managed by the 1074.Nm gptboot 1075stage 1 boot loader and the 1076.Pa /etc/rc.d/gptboot 1077start-up script. 1078See 1079.Xr gptboot 8 1080for more details. 1081.It Cm lenovofix 1082Setting this attribute overwrites the Protective MBR with a new one where 1083the 0xee partition is the second, rather than the first record. 1084This resolves a BIOS compatibility issue with some Lenovo models including the 1085X220, T420, and T520, allowing them to boot from GPT partitioned disks 1086without using EFI. 1087.El 1088.Pp 1089The scheme-specific attributes for MBR: 1090.Bl -tag -width ".Cm active" 1091.It Cm active 1092.El 1093.Sh BOOTSTRAPPING 1094.Fx 1095supports several partitioning schemes and each scheme uses different 1096bootstrap code. 1097The bootstrap code is located in a specific disk area for each partitioning 1098scheme, and may vary in size for different schemes. 1099.Pp 1100Bootstrap code can be separated into two types. 1101The first type is embedded in the partitioning scheme's metadata, while the 1102second type is located on a specific partition. 1103Embedding bootstrap code should only be done with the 1104.Cm gpart bootcode 1105command with the 1106.Fl b Ar bootcode 1107option. 1108The GEOM PART class knows how to safely embed bootstrap code into 1109specific partitioning scheme metadata without causing any damage. 1110.Pp 1111The Master Boot Record (MBR) uses a 512-byte bootstrap code image, embedded 1112into the partition table's metadata area. 1113There are two variants of this bootstrap code: 1114.Pa /boot/mbr 1115and 1116.Pa /boot/boot0 . 1117.Pa /boot/mbr 1118searches for a partition with the 1119.Cm active 1120attribute (see the 1121.Sx ATTRIBUTES 1122section) in the partition table. 1123Then it runs next bootstrap stage. 1124The 1125.Pa /boot/boot0 1126image contains a boot manager with some additional interactive functions 1127for multi-booting from a user-selected partition. 1128.Pp 1129A BSD disklabel is usually created inside an MBR partition (slice) 1130with type 1131.Cm freebsd 1132(see the 1133.Sx "PARTITION TYPES" 1134section). 1135It uses 8 KB size bootstrap code image 1136.Pa /boot/boot , 1137embedded into the partition table's metadata area. 1138.Pp 1139Both types of bootstrap code are used to boot from the GUID Partition Table. 1140First, a protective MBR is embedded into the first disk sector from the 1141.Pa /boot/pmbr 1142image. 1143It searches through the GPT for a 1144.Cm freebsd-boot 1145partition (see the 1146.Sx "PARTITION TYPES" 1147section) and runs the next bootstrap stage from it. 1148The 1149.Cm freebsd-boot 1150partition should be smaller than 545 KB. 1151It can be located either before or after other 1152.Fx 1153partitions on the disk. 1154There are two variants of bootstrap code to write to this partition: 1155.Pa /boot/gptboot 1156and 1157.Pa /boot/gptzfsboot . 1158.Pp 1159.Pa /boot/gptboot 1160is used to boot from UFS partitions. 1161.Cm gptboot 1162searches through 1163.Cm freebsd-ufs 1164partitions in the GPT and selects one to boot based on the 1165.Cm bootonce 1166and 1167.Cm bootme 1168attributes. 1169If neither attribute is found, 1170.Pa /boot/gptboot 1171boots from the first 1172.Cm freebsd-ufs 1173partition. 1174.Pa /boot/loader 1175.Pq the third bootstrap stage 1176is loaded from the first partition that matches these conditions. 1177See 1178.Xr gptboot 8 1179for more information. 1180.Pp 1181.Pa /boot/gptzfsboot 1182is used to boot from ZFS. 1183It searches through the GPT for 1184.Cm freebsd-zfs 1185partitions, trying to detect ZFS pools. 1186After all pools are detected, 1187.Pa /boot/loader 1188is started from the first one found set as bootable. 1189.Pp 1190The APM scheme also does not support embedding bootstrap code. 1191Instead, the 800 KBytes bootstrap code image 1192.Pa /boot/boot1.hfs 1193should be written with the 1194.Cm gpart bootcode 1195command to a partition of type 1196.Cm apple-boot , 1197which should also be 800 KB in size. 1198.Sh OPERATIONAL FLAGS 1199Actions other than the 1200.Cm commit 1201and 1202.Cm undo 1203actions take an optional 1204.Fl f Ar flags 1205option. 1206This option is used to specify action-specific operational flags. 1207By default, the 1208.Nm 1209utility defines the 1210.Ql C 1211flag so that the action is immediately 1212committed. 1213The user can specify 1214.Dq Fl f Cm x 1215to have the action result in a pending change that can later, with 1216other pending changes, be committed as a single compound change with 1217the 1218.Cm commit 1219action or reverted with the 1220.Cm undo 1221action. 1222.Sh RECOVERING 1223The GEOM PART class supports recovering of partition tables only for GPT. 1224The GPT primary metadata is stored at the beginning of the device. 1225For redundancy, a secondary 1226.Pq backup 1227copy of the metadata is stored at the end of the device. 1228As a result of having two copies, some corruption of metadata is not 1229fatal to the working of GPT. 1230When the kernel detects corrupt metadata, it marks this table as corrupt 1231and reports the problem. 1232.Cm destroy 1233and 1234.Cm recover 1235are the only operations allowed on corrupt tables. 1236.Pp 1237If one GPT header appears to be corrupt but the other copy remains intact, 1238the kernel will log the following: 1239.Bd -literal -offset indent 1240GEOM: provider: the primary GPT table is corrupt or invalid. 1241GEOM: provider: using the secondary instead -- recovery strongly advised. 1242.Ed 1243.Pp 1244or 1245.Bd -literal -offset indent 1246GEOM: provider: the secondary GPT table is corrupt or invalid. 1247GEOM: provider: using the primary only -- recovery suggested. 1248.Ed 1249.Pp 1250Also 1251.Nm 1252commands such as 1253.Cm show , status 1254and 1255.Cm list 1256will report about corrupt tables. 1257.Pp 1258If the size of the device has changed (e.g.,\& volume expansion) the 1259secondary GPT header will no longer be located in the last sector. 1260This is not a metadata corruption, but it is dangerous because any 1261corruption of the primary GPT will lead to loss of the partition table. 1262This problem is reported by the kernel with the message: 1263.Bd -literal -offset indent 1264GEOM: provider: the secondary GPT header is not in the last LBA. 1265.Ed 1266.Pp 1267This situation can be recovered with the 1268.Cm recover 1269command. 1270This command reconstructs the corrupt metadata using known valid 1271metadata and relocates the secondary GPT to the end of the device. 1272.Pp 1273.Em NOTE : 1274The GEOM PART class can detect the same partition table visible through 1275different GEOM providers, and some of them will be marked as corrupt. 1276Be careful when choosing a provider for recovery. 1277If you choose incorrectly you can destroy the metadata of another GEOM class, 1278e.g.,\& GEOM MIRROR or GEOM LABEL. 1279.Sh SYSCTL VARIABLES 1280The following 1281.Xr sysctl 8 1282variables can be used to control the behavior of the 1283.Nm PART 1284GEOM class. 1285The default value is shown next to each variable. 1286.Bl -tag -width indent 1287.It Va kern.geom.part.allow_nesting : No 0 1288By default, some schemes (currently BSD and BSD64) do not permit 1289further nested partitioning. 1290This variable overrides this restriction and allows arbitrary nesting (except 1291within partitions created at offset 0). 1292Some schemes have their own separate checks, for which see below. 1293.It Va kern.geom.part.auto_resize : No 1 1294This variable controls automatic resize behavior of the 1295.Nm PART 1296GEOM class. 1297When this variable is enable and new size of provider is detected, the schema 1298metadata is resized but all changes are not saved to disk, until 1299.Cm gpart commit 1300is run to confirm changes. 1301This behavior is also reported with diagnostic message: 1302.Sy "GEOM_PART: (provider) was automatically resized." 1303.Sy "Use `gpart commit (provider)` to save changes or `gpart undo (provider)`" 1304.Sy "to revert them." 1305.It Va kern.geom.part.check_integrity : No 1 1306This variable controls the behaviour of metadata integrity checks. 1307When integrity checks are enabled, the 1308.Nm PART 1309GEOM class verifies all generic partition parameters obtained from the 1310disk metadata. 1311If some inconsistency is detected, the partition table will be 1312rejected with a diagnostic message: 1313.Sy "GEOM_PART: Integrity check failed (provider, scheme)" . 1314.It Va kern.geom.part.gpt.allow_nesting : No 0 1315By default the GPT scheme is allowed only at the outermost nesting level. 1316This variable allows this restriction to be removed. 1317.It Va kern.geom.part.ldm.debug : No 0 1318Debug level of the Logical Disk Manager (LDM) module. 1319This can be set to a number between 0 and 2 inclusive. 1320If set to 0 minimal debug information is printed, 1321and if set to 2 the maximum amount of debug information is printed. 1322.It Va kern.geom.part.ldm.show_mirrors : No 0 1323This variable controls how the Logical Disk Manager (LDM) module handles 1324mirrored volumes. 1325By default mirrored volumes are shown as partitions with type 1326.Cm ms-ldm-data 1327(see the 1328.Sx "PARTITION TYPES" 1329section). 1330If this variable set to 1 each component of the mirrored volume will be 1331present as independent partition. 1332.Em NOTE : 1333This may break a mirrored volume and lead to data damage. 1334.It Va kern.geom.part.mbr.enforce_chs : No 0 1335Specify how the Master Boot Record (MBR) module does alignment. 1336If this variable is set to a non-zero value, the module will automatically 1337recalculate the user-specified offset and size for alignment with the CHS 1338geometry. 1339Otherwise the values will be left unchanged. 1340.It Va kern.geom.part.separator : No "" 1341Specify an optional separator that will be inserted between the GEOM name 1342and partition name. 1343This variable is a 1344.Xr loader 8 1345tunable. 1346Note that setting this variable may break software which assumes a particular 1347naming scheme. 1348.El 1349.Sh EXIT STATUS 1350Exit status is 0 on success, and 1 if the command fails. 1351.Sh EXAMPLES 1352The examples below assume that the disk's logical block size is 512 1353bytes, regardless of its physical block size. 1354.Ss GPT 1355In this example, we will format 1356.Pa ada0 1357with the GPT scheme and create boot, swap and root partitions. 1358First, we need to create the partition table: 1359.Bd -literal -offset indent 1360/sbin/gpart create -s GPT ada0 1361.Ed 1362.Pp 1363Next, we install a protective MBR with the first-stage bootstrap code. 1364The protective MBR lists a single, bootable partition spanning the 1365entire disk, thus allowing non-GPT-aware BIOSes to boot from the disk 1366and preventing tools which do not understand the GPT scheme from 1367considering the disk to be unformatted. 1368.Bd -literal -offset indent 1369/sbin/gpart bootcode -b /boot/pmbr ada0 1370.Ed 1371.Pp 1372We then create a dedicated 1373.Cm freebsd-boot 1374partition to hold the second-stage boot loader, which will load the 1375.Fx 1376kernel and modules from a UFS or ZFS filesystem. 1377This partition must be larger than the bootstrap code 1378.Po 1379either 1380.Pa /boot/gptboot 1381for UFS or 1382.Pa /boot/gptzfsboot 1383for ZFS 1384.Pc , 1385but smaller than 545 kB since the first-stage loader will load the 1386entire partition into memory during boot, regardless of how much data 1387it actually contains. 1388We create a 472-block (236 kB) boot partition at offset 40, which is 1389the size of the partition table (34 blocks or 17 kB) rounded up to the 1390nearest 4 kB boundary. 1391.Bd -literal -offset indent 1392/sbin/gpart add -b 40 -s 472 -t freebsd-boot ada0 1393/sbin/gpart bootcode -p /boot/gptboot -i 1 ada0 1394.Ed 1395.Pp 1396We now create a 4 GB swap partition at the first available offset, 1397which is 40 + 472 = 512 blocks (256 kB). 1398.Bd -literal -offset indent 1399/sbin/gpart add -s 4G -t freebsd-swap ada0 1400.Ed 1401.Pp 1402Aligning the swap partition and all subsequent partitions on a 256 kB 1403boundary ensures optimal performance on a wide range of media, from 1404plain old disks with 512-byte blocks, through modern 1405.Dq advanced format 1406disks with 4096-byte physical blocks, to RAID volumes with stripe 1407sizes of up to 256 kB. 1408.Pp 1409Finally, we create and format an 8 GB 1410.Cm freebsd-ufs 1411partition for the root filesystem, leaving the rest of the device free 1412for additional filesystems: 1413.Bd -literal -offset indent 1414/sbin/gpart add -s 8G -t freebsd-ufs ada0 1415/sbin/newfs -Uj /dev/ada0p3 1416.Ed 1417.Ss MBR 1418In this example, we will format 1419.Pa ada0 1420with the MBR scheme and create a single partition which we subdivide 1421using a traditional 1422.Bx 1423disklabel. 1424.Pp 1425First, we create the partition table as well as a single partition 64 GB in 1426size and an alignment of 4 kB, then we mark that partition active (bootable) 1427and install the first-stage boot loader: 1428.Bd -literal -offset indent 1429/sbin/gpart create -s MBR ada0 1430/sbin/gpart add -t freebsd -s 64G -a 4k ada0 1431/sbin/gpart set -a active -i 1 ada0 1432/sbin/gpart bootcode -b /boot/boot0 ada0 1433.Ed 1434.Pp 1435Next, we create a disklabel in that partition 1436.Po 1437.Dq slice 1438in disklabel terminology 1439.Pc 1440with room for up to 20 partitions: 1441.Bd -literal -offset indent 1442/sbin/gpart create -s BSD -n 20 ada0s1 1443.Ed 1444.Pp 1445We then create an 8 GB root partition and a 4 GB swap partition: 1446.Bd -literal -offset indent 1447/sbin/gpart add -t freebsd-ufs -s 8G ada0s1 1448/sbin/gpart add -t freebsd-swap -s 4G ada0s1 1449.Ed 1450.Pp 1451Finally, we install the appropriate boot loader for the 1452.Bx 1453label: 1454.Bd -literal -offset indent 1455/sbin/gpart bootcode -b /boot/boot ada0s1 1456.Ed 1457.Ss Deleting Partitions and Destroying the Partitioning Scheme 1458If a 1459.Em "Device busy" 1460error is shown when trying to destroy a partition table, remember that 1461all of the partitions must be deleted first with the 1462.Cm delete 1463action. 1464In this example, 1465.Pa da0 1466has three partitions: 1467.Bd -literal -offset indent 1468/sbin/gpart delete -i 3 da0 1469/sbin/gpart delete -i 2 da0 1470/sbin/gpart delete -i 1 da0 1471/sbin/gpart destroy da0 1472.Ed 1473.Pp 1474Rather than deleting each partition and then destroying the partitioning 1475scheme, the 1476.Fl F 1477option can be given with 1478.Cm destroy 1479to delete all of the partitions before destroying the partitioning scheme. 1480This is equivalent to the previous example: 1481.Bd -literal -offset indent 1482/sbin/gpart destroy -F da0 1483.Ed 1484.Ss Backup and Restore 1485Create a backup of the partition table from 1486.Pa da0 : 1487.Bd -literal -offset indent 1488/sbin/gpart backup da0 > da0.backup 1489.Ed 1490.Pp 1491Restore the partition table from the backup to 1492.Pa da0 : 1493.Bd -literal -offset indent 1494/sbin/gpart restore -l da0 < /mnt/da0.backup 1495.Ed 1496.Pp 1497Clone the partition table from 1498.Pa ada0 1499to 1500.Pa ada1 1501and 1502.Pa ada2 : 1503.Bd -literal -offset indent 1504/sbin/gpart backup ada0 | /sbin/gpart restore -F ada1 ada2 1505.Ed 1506.Sh SEE ALSO 1507.Xr geom 4 , 1508.Xr boot0cfg 8 , 1509.Xr geom 8 , 1510.Xr glabel 8 , 1511.Xr gptboot 8 1512.Sh HISTORY 1513The 1514.Nm 1515utility appeared in 1516.Fx 7.0 . 1517.Sh AUTHORS 1518.An Marcel Moolenaar Aq Mt marcel@FreeBSD.org 1519.Sh CAVEATS 1520Partition type 1521.Em apple-zfs 1522(6a898cc3-1dd2-11b2-99a6-080020736631) is also being used 1523on illumos/Solaris platforms for ZFS volumes. 1524