[BACK]Return to gpt.8 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sbin / gpt

Annotation of src/sbin/gpt/gpt.8, Revision 1.44

1.44    ! martin      1: .\" $NetBSD: gpt.8,v 1.43 2015/12/06 09:36:57 wiz Exp $
1.2       wiz         2: .\"
1.1       christos    3: .\" Copyright (c) 2002 Marcel Moolenaar
                      4: .\" All rights reserved.
                      5: .\"
                      6: .\" Redistribution and use in source and binary forms, with or without
                      7: .\" modification, are permitted provided that the following conditions
                      8: .\" are met:
                      9: .\"
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
                     15: .\"
                     16: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     17: .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     18: .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     19: .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
                     20: .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     21: .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     22: .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     23: .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     24: .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
                     25: .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     26: .\"
                     27: .\" $FreeBSD: src/sbin/gpt/gpt.8,v 1.17 2006/06/22 22:22:32 marcel Exp $
                     28: .\"
1.44    ! martin     29: .Dd December 25, 2015
1.4       joerg      30: .Dt GPT 8
1.1       christos   31: .Os
                     32: .Sh NAME
                     33: .Nm gpt
1.2       wiz        34: .Nd GUID partition table maintenance utility
1.1       christos   35: .Sh SYNOPSIS
                     36: .Nm
1.39      christos   37: .Op Fl nrqv
1.38      christos   38: .Op Fl m Ar mediasize
                     39: .Op Fl s Ar sectorsize
1.1       christos   40: .Ar command
                     41: .Op Ar command_options
1.40      christos   42: .Ar device
1.1       christos   43: .Sh DESCRIPTION
                     44: The
                     45: .Nm
                     46: utility provides the necessary functionality to manipulate GUID partition
1.14      jnemeth    47: tables
                     48: .Pq GPTs ,
                     49: but see
1.1       christos   50: .Sx BUGS
                     51: below for how and where functionality is missing.
                     52: The basic usage model of the
                     53: .Nm
                     54: tool follows that of the
                     55: .Xr cvs 1
                     56: tool.
                     57: The general options are described in the following paragraph.
                     58: The remaining paragraphs describe the individual commands with their options.
                     59: Here we conclude by mentioning that a
                     60: .Ar device
                     61: is either a special file
                     62: corresponding to a disk-like device or a regular file.
                     63: The command is applied to each
                     64: .Ar device
                     65: listed on the command line.
                     66: .Ss General Options
                     67: The general options allow the user to change default settings or otherwise
                     68: change the behaviour that is applicable to all commands.
                     69: Not all commands use all default settings, so some general options may not
                     70: have an effect on all commands.
1.38      christos   71: .Bl -tag -width XXXX
                     72: .It Fl m Ar mediasize
                     73: Override the default media size for the device (obtained
1.33      christos   74: from the kernel if possible) or defaulting to the file size for
                     75: plain files.
1.38      christos   76: .It Fl n
                     77: Don't update the wedge information that
                     78: .Nm
                     79: changed.
                     80: You need to use the
                     81: .Xr dkctl 8
                     82: command manually update the device's wedge configuration if you do that.
                     83: .It Fl r
                     84: Open the device for reading only.
1.1       christos   85: .Nm
                     86: Currently this option is primarily useful for the
                     87: .Ic show
1.38      christos   88: command, but the intent is to use it to implement dry-run behaviour.
                     89: .It Fl q
                     90: Don't print error messages.
                     91: This is not implemented completely yet.
                     92: .It Fl s Ar sectorsize
                     93: Override the default sector size for the device (obtained
1.33      christos   94: from the kernel if possible) or
                     95: .Dv 512
                     96: for plain files.
1.38      christos   97: .It Fl v
                     98: Controls the verbosity level.
1.1       christos   99: The level increases with every occurrence of this option.
                    100: There is no formalized definition of the different levels yet.
1.38      christos  101: .El
1.1       christos  102: .Ss Commands
                    103: .Bl -tag -width indent
                    104: .\" ==== add ====
1.19      jnemeth   105: .It Nm Ic add Oo Fl a Ar alignment Oc Oo Fl b Ar blocknr Oc \
1.23      jnemeth   106: Oo Fl i Ar index Oc Oo Fl l Ar label Oc Oo Fl s Ar size Oc \
1.40      christos  107: Oo Fl t Ar type Oc
1.1       christos  108: The
                    109: .Ic add
                    110: command allows the user to add a new partition to an existing table.
                    111: By default, it will create a UFS partition covering the first available block
                    112: of an unused disk space.
                    113: The command-specific options can be used to control this behaviour.
                    114: .Pp
                    115: The
1.15      jnemeth   116: .Fl a Ar alignment
                    117: option allows the user to specify an alignment for the start and size.
                    118: The alignment may have a suffix to indicate its magnitude.
                    119: .Nm
                    120: will attempt to align the partition.
                    121: .Pp
                    122: The
1.19      jnemeth   123: .Fl b Ar blocknr
1.1       christos  124: option allows the user to specify the starting (beginning) sector number of
                    125: the partition.
                    126: The minimum sector number is 1, but has to fall inside an unused region of
                    127: disk space that is covered by the GPT.
                    128: .Pp
                    129: The
                    130: .Fl i Ar index
                    131: option allows the user to specify which (free) entry in the GPT table is to
                    132: be used for the new partition.
                    133: By default, the first free entry is selected.
                    134: .Pp
                    135: The
1.15      jnemeth   136: .Fl l Ar label
                    137: option allows the user to specify a label for the partition.
                    138: .Pp
                    139: The
1.23      jnemeth   140: .Fl s Ar size
                    141: option allows the user to specify the size of the partition.
                    142: If there is no suffix, or the suffix is
                    143: .Sq s
                    144: or
                    145: .Sq S
                    146: then size is in sectors, otherwise size is in bytes which must be
                    147: a multiple of the device's sector size.
                    148: The minimum size is 1 sector.
1.1       christos  149: .Pp
                    150: The
                    151: .Fl t Ar type
                    152: option allows the user to specify the partition type.
                    153: The type is given as an UUID, but
                    154: .Nm
                    155: accepts
1.35      mlelstv   156: .Bl -tag -width "windows-reserved" -compact -offset indent
                    157: .It Cm apple
                    158: Apple HFS
                    159: .It Cm apple-ufs
                    160: Apple UFS
                    161: .It Cm bios
                    162: BIOS Boot
                    163: .It Cm efi
                    164: EFI System
                    165: .It Cm fbsd-legacy
                    166: FreeBSD legacy
                    167: .It Cm fbsd-swap
                    168: FreeBSD swap
                    169: .It Cm fbsd-ufs
                    170: FreeBSD UFS/UFS2
                    171: .It Cm fbsd-vinum
                    172: FreeBSD vinum
                    173: .It Cm fbsd-zfs
                    174: FreeBSD ZFS
                    175: .It Cm linux-data
                    176: Linux data
                    177: .It Cm linux-raid
                    178: Linux RAID
                    179: .It Cm linux-swap
                    180: Linux swap
                    181: .It Cm linux-lvm
                    182: Linux LVM
                    183: .It Cm windows
                    184: Windows basic data
                    185: .It Cm windows-reserved
                    186: Windows reserved
                    187: .It Cm ccd
                    188: NetBSD ccd component
                    189: .It Cm cgd
                    190: NetBSD Cryptographic Disk
                    191: .It Cm ffs
                    192: NetBSD FFSv1/FFSv2
                    193: .It Cm lfs
                    194: NetBSD LFS
                    195: .It Cm raid
                    196: NetBSD RAIDFrame component
                    197: .It Cm swap
                    198: NetBSD swap
                    199: .El
1.1       christos  200: as aliases for the most commonly used partition types.
1.27      jnemeth   201: .\" ==== backup ====
1.41      christos  202: .It Nm Ic backup Oo Fl o Ar outfile Oc
1.27      jnemeth   203: The
                    204: .Ic backup
                    205: command dumps the MBR or (PMBR) and GPT partition tables to standard
1.41      christos  206: output or to a file specified by the
                    207: .Ar outfile
                    208: argument in a format to be used by the
1.27      jnemeth   209: .Ic restore
                    210: command.
                    211: The format is a plist.
                    212: It should not be modified.
1.7       jym       213: .\" ==== biosboot ====
1.32      jnemeth   214: .It Nm Ic biosboot Oo Fl c Ar bootcode Oc Oo Fl i Ar index Oc \
1.40      christos  215: Oo Fl L Ar label Oc
1.7       jym       216: The
                    217: .Ic biosboot
                    218: command allows the user to configure the partition that contains the
                    219: primary bootstrap program, used during
                    220: .Xr boot 8 .
                    221: .Pp
                    222: The
                    223: .Fl c
                    224: option allows the user to specify the filename that
                    225: .Nm
                    226: should read the bootcode from.
                    227: The default is to read from
1.10      drochner  228: .Pa /usr/mdec/gptmbr.bin .
1.7       jym       229: .Pp
                    230: The
                    231: .Fl i
                    232: option selects the partition that should contain the primary
                    233: bootstrap code, as installed via
                    234: .Xr installboot 8 .
1.32      jnemeth   235: The
                    236: .Fl L
                    237: option selects the partition by label.
                    238: If there are multiple partitions with the same label, it will use the
                    239: first one found.
1.1       christos  240: .\" ==== create ====
1.40      christos  241: .It Nm Ic create Oo Fl fP Oc Oo Fl p Ar partitions Oc
1.1       christos  242: The
                    243: .Ic create
                    244: command allows the user to create a new (empty) GPT.
                    245: By default, one cannot create a GPT when the device contains a MBR,
                    246: however this can be overridden with the
                    247: .Fl f
                    248: option.
                    249: If the
                    250: .Fl f
                    251: option is specified, an existing MBR is destroyed and any partitions
                    252: described by the MBR are lost.
                    253: .Pp
                    254: The
1.39      christos  255: .Fl P
1.1       christos  256: option tells
                    257: .Nm
                    258: to create only the primary table and not the backup table.
                    259: This option is only useful for debugging and should not be used otherwise.
1.39      christos  260: .Pp
                    261: The
                    262: .Fl p
                    263: option changes the default number of partitions the GPT can
                    264: accommodate.
                    265: This is used whenever a new GPT is created.
                    266: By default, the
                    267: .Nm
                    268: utility will create space for 128 partitions (or 32 sectors of 512 bytes).
1.1       christos  269: .\" ==== destroy ====
1.40      christos  270: .It Nm Ic destroy Oo Fl r Oc
1.1       christos  271: The
                    272: .Ic destroy
                    273: command allows the user to destroy an existing, possibly not empty GPT.
                    274: .Pp
                    275: The
                    276: .Fl r
                    277: option instructs
                    278: .Nm
                    279: to destroy the table in a way that it can be recovered.
1.37      jnemeth   280: .\" ==== header ====
1.40      christos  281: .It Nm Ic header
1.37      jnemeth   282: The
                    283: .Ic header
                    284: command displays size information about the media and information from the
                    285: GPT header if it exists.
1.1       christos  286: .\" ==== label ====
1.40      christos  287: .It Nm Ic label Oo Fl a Oc Ao Fl f Ar file | Fl l Ar label Ac
1.19      jnemeth   288: .It Nm Ic label Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \
1.32      jnemeth   289: Oo Fl L Ar label Oc Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc \
1.40      christos  290: Ao Fl f Ar file | Fl l Ar label Ac
1.1       christos  291: The
                    292: .Ic label
                    293: command allows the user to label any partitions that match the selection.
                    294: At least one of the following selection options must be specified.
                    295: .Pp
                    296: The
                    297: .Fl a
                    298: option specifies that all partitions should be labeled.
                    299: It is mutually exclusive with all other selection options.
                    300: .Pp
                    301: The
1.19      jnemeth   302: .Fl b Ar blocknr
1.1       christos  303: option selects the partition that starts at the given block number.
                    304: .Pp
                    305: The
                    306: .Fl i Ar index
                    307: option selects the partition with the given partition number.
                    308: .Pp
                    309: The
1.32      jnemeth   310: .Fl L Ar label
                    311: option selects all partitions that have the given label.
                    312: This can cause multiple partitions to be relabeled.
                    313: .Pp
                    314: The
1.19      jnemeth   315: .Fl s Ar sectors
1.1       christos  316: option selects all partitions that have the given size.
1.14      jnemeth   317: This can cause multiple partitions to be labeled.
1.1       christos  318: .Pp
                    319: The
                    320: .Fl t Ar type
                    321: option selects all partitions that have the given type.
                    322: The type is given as an UUID or by the aliases that the
                    323: .Ic add
                    324: command accepts.
1.14      jnemeth   325: This can cause multiple partitions to be labeled.
1.1       christos  326: .Pp
                    327: The
                    328: .Fl f Ar file
                    329: or
                    330: .Fl l Ar label
                    331: options specify the new label to be assigned to the selected partitions.
                    332: The
                    333: .Fl f Ar file
                    334: option is used to read the label from the specified file.
                    335: Only the first line is read from the file and the trailing newline
                    336: character is stripped.
                    337: If the file name is the dash or minus sign
                    338: .Pq Fl ,
                    339: the label is read from
                    340: the standard input.
                    341: The
                    342: .Fl l Ar label
                    343: option is used to specify the label in the command line.
                    344: The label is assumed to be encoded in UTF-8.
                    345: .\" ==== migrate ====
1.40      christos  346: .It Nm Ic migrate Oo Fl fs Oc Oo Fl p Ar partitions Oc
1.1       christos  347: The
                    348: .Ic migrate
                    349: command allows the user to migrate an MBR-based disk partitioning into a
                    350: GPT-based partitioning.
                    351: By default, the MBR is not migrated when it contains partitions of an unknown
                    352: type.
                    353: This can be overridden with the
                    354: .Fl f
                    355: option.
                    356: Specifying the
                    357: .Fl f
                    358: option will cause unknown partitions to be ignored and any data in it
                    359: to be lost.
                    360: .Pp
                    361: The
                    362: .Fl s
                    363: option prevents migrating
                    364: .Bx
                    365: disk labels into GPT partitions by creating
                    366: the GPT equivalent of a slice.
1.14      jnemeth   367: Note that the
                    368: .Fl s
                    369: option isn't applicable to
                    370: .Nx
                    371: partitions.
                    372: .Pp
                    373: The
1.39      christos  374: .Fl p
                    375: option changes the default number of partitions the GPT can
                    376: accommodate.
                    377: This is used whenever a new GPT is created.
                    378: By default, the
                    379: .Nm
                    380: utility will create space for 128 partitions (or 32 sectors of 512 bytes).
                    381: .Pp
                    382: The
1.14      jnemeth   383: .Ic migrate
                    384: command requires space at the beginning and the end of the device outside
                    385: any partitions to store the GPTs.
                    386: Space is required for the GPT header
                    387: .Pq which takes one sector
                    388: and the GPT partition table.
                    389: See the
                    390: .Fl p
                    391: option
                    392: for the size of the GPT partition table.
                    393: By default, just about all devices have a minimum of 62 sectors free at the
                    394: beginning of the device, but don't have any free space at the end.
                    395: For the default GPT partition table size on a 512 byte sector size device,
                    396: 33 sectors at the end of the device would need to be freed.
1.8       wiz       397: .\" ==== recover ====
1.40      christos  398: .It Nm Ic recover
1.8       wiz       399: The
                    400: .Ic recover
                    401: command tries to restore the GPT partition label from the backup
                    402: near the end of the disk.
                    403: It is very useful in case the primary label was deleted.
1.1       christos  404: .\" ==== remove ====
1.40      christos  405: .It Nm Ic remove Oo Fl a Oc
1.19      jnemeth   406: .It Nm Ic remove Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \
1.40      christos  407: Oo Fl L Ar label Oc Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc
1.1       christos  408: The
                    409: .Ic remove
                    410: command allows the user to remove any and all partitions that match the
                    411: selection.
                    412: It uses the same selection options as the
                    413: .Ic label
                    414: command.
                    415: See above for a description of these options.
                    416: Partitions are removed by clearing the partition type.
                    417: No other information is changed.
1.17      jnemeth   418: .\" ==== resize ====
                    419: .It Nm Ic resize Fl i Ar index Oo Fl a Ar alignment Oc \
1.40      christos  420: Oo Fl s Ar size Oc
1.17      jnemeth   421: The
                    422: .Ic resize
                    423: command allows the user to resize a partition.
1.18      wiz       424: The partition may be shrunk and if there is sufficient free space
1.17      jnemeth   425: immediately after it then it may be expanded.
                    426: The
                    427: .Fl s
                    428: option allows the new size to be specified, otherwise the partition will
                    429: be increased to the maximum available size.
1.23      jnemeth   430: If there is no suffix, or the suffix is
                    431: .Sq s
                    432: or
                    433: .Sq S
                    434: then size is in sectors, otherwise size is in bytes which must be
                    435: a multiple of the device's sector size.
                    436: The minimum size is 1 sector.
1.17      jnemeth   437: If the
                    438: .Fl a
                    439: option is specified then the size will be adjusted to be a multiple of
                    440: alignment if possible.
1.30      jnemeth   441: .\" ==== resizedisk ====
1.40      christos  442: .It Nm Ic resizedisk Oo Fl s Ar size Oc
1.30      jnemeth   443: The
                    444: .Ic resizedisk
                    445: command allows the user to resize a disk.
                    446: With GPTs, a backup copy is stored at the end of the disk.
                    447: If the underlying medium changes size
                    448: .Pq or is going to change size ,
                    449: then the backup copy needs to be moved to the new end of the disk,
                    450: and the last sector available for data storage needs to be adjusted.
                    451: This command does that.
                    452: If the backup copy no longer exists due to the medium shrinking, then
                    453: a new backup copy will be created using the primary copy.
                    454: .Pp
                    455: The
                    456: .Fl s
                    457: option allows the new size to be specified, otherwise the backup copy
                    458: will automatically be placed at the current end of the disk.
                    459: If there is no suffix, or the suffix is
                    460: .Sq s
                    461: or
                    462: .Sq S
                    463: then size is in sectors, otherwise size is in bytes which must be
                    464: a multiple of the device's sector size.
                    465: Using the
                    466: .Fl s
                    467: option allows you to move the backup copy prior to resizing the medium.
                    468: This is primarily useful when shrinking the medium.
1.29      jnemeth   469: .\" ==== restore ====
1.41      christos  470: .It Nm Ic restore Oo Fl F Oc Oo Fl i Ar infile Oc
1.29      jnemeth   471: The
                    472: .Ic restore
                    473: command restores a partition table that was previously saved using the
                    474: .Ic backup
                    475: command.
1.41      christos  476: The partition table is read from standard input or a file specified in
                    477: the
                    478: .Ar infile
                    479: argument and is expected to be in the format of a plist.
1.29      jnemeth   480: It assumes an empty disk.
                    481: The
                    482: .Fl F
                    483: option can be used to blank the disk.
                    484: The new disk does not have to be the same size as the old disk as long as all
                    485: the partitions fit, as
                    486: .Ic restore
                    487: will automatically adjust.
                    488: However, the new disk must use the same sector size as the old disk.
1.25      jnemeth   489: .\" ==== set ====
1.40      christos  490: .It Nm Ic set Fl a Ar attribute Fl i Ar index
1.42      christos  491: .It Nm Ic set Fl l
1.25      jnemeth   492: The
                    493: .Ic set
                    494: command sets various partition attributes.
                    495: The
1.42      christos  496: .Fl l
                    497: flag lists all available attributes.
                    498: The
1.25      jnemeth   499: .Fl a
1.42      christos  500: option specifies which attributes to set and may be specified more than once,
                    501: or the attributes can be comma-separated.
1.25      jnemeth   502: The
                    503: .Fl i
                    504: option specifies which entry to update.
                    505: The possible attributes are
                    506: .Do biosboot Dc ,
                    507: .Do bootme Dc ,
1.42      christos  508: .Do bootonce Dc ,
                    509: .Do bootfailed Dc ,
                    510: .Do noblockio Dc , and
                    511: .Do required Dc .
1.25      jnemeth   512: The biosboot flag is used to indicate which partition should be booted
                    513: by legacy BIOS boot code.
                    514: See the
                    515: .Ic biosboot
                    516: command for more information.
1.42      christos  517: The other attributes are for compatibility with
1.25      jnemeth   518: .Fx
                    519: and are not currently used by any
                    520: .Nx
                    521: code.
                    522: They may be used by
                    523: .Nx
                    524: code in the future.
1.1       christos  525: .\" ==== show ====
1.44    ! martin    526: .It Nm Ic show Oo Fl glu Oc Oo Fl i Ar index Oc Oo Fl a Oc
1.1       christos  527: The
                    528: .Ic show
                    529: command displays the current partitioning on the listed devices and gives
                    530: an overall view of the disk contents.
                    531: With the
1.21      jnemeth   532: .Fl g
                    533: option the GPT partition GUID will be displayed instead of the GPT partition
                    534: type.
                    535: With the
1.1       christos  536: .Fl l
                    537: option the GPT partition label will be displayed instead of the GPT partition
                    538: type.
                    539: With the
                    540: .Fl u
                    541: option the GPT partition type is displayed as an UUID instead of in a
                    542: user friendly form.
1.21      jnemeth   543: With the
                    544: .Fl i
                    545: option, all the details of a particular GPT partition will be displayed.
1.24      jnemeth   546: The format of this display is subject to change.
1.44    ! martin    547: With the
        !           548: .Fl a
        !           549: option, all information for all GPT partitions (just like with
        !           550: .Fl i Ar index )
        !           551: will be printed.
1.21      jnemeth   552: None of the options have any effect on non-GPT partitions.
                    553: The order of precedence for the options are:
1.44    ! martin    554: .Fl a ,
1.21      jnemeth   555: .Fl i ,
                    556: .Fl l ,
                    557: .Fl g ,
                    558: .Fl u .
1.31      jnemeth   559: .\" ==== type ====
1.40      christos  560: .It Nm Ic type Oo Fl a Oc Fl T Ar newtype
1.31      jnemeth   561: .It Nm Ic type Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \
1.42      christos  562: .It Nm Ic type Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \
1.32      jnemeth   563: Oo Fl L Ar label Oc Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc \
1.40      christos  564: Fl T Ar newtype
1.42      christos  565: .It Nm Ic type Fl l
1.31      jnemeth   566: The
                    567: .Ic type
                    568: command allows the user to change the type of any and all partitions
                    569: that match the selection.
                    570: It uses the same selection options as the
                    571: .Ic label
                    572: command.
                    573: See above for a description of these options.
1.42      christos  574: The
                    575: .Fl l
                    576: flag lists available types.
1.25      jnemeth   577: .\" ==== unset ====
1.40      christos  578: .It Nm Ic unset Fl a Ar attribute Fl i Ar index
1.43      wiz       579: .It Nm Ic unset Fl l
1.25      jnemeth   580: The
                    581: .Ic unset
                    582: command unsets various partition attributes.
                    583: The
1.42      christos  584: .Fl l
                    585: flag lists all available attributes.
                    586: The
1.25      jnemeth   587: .Fl a
1.26      wiz       588: option specifies which attributes to unset and may be specified more than once.
1.25      jnemeth   589: The
                    590: .Fl i
                    591: option specifies which entry to update.
                    592: The possible attributes are
                    593: .Do biosboot Dc ,
                    594: .Do bootme Dc ,
1.42      christos  595: .Do bootonce Dc ,
                    596: .Do bootfailed Dc ,
                    597: .Do noblockio Dc , and
                    598: .Do required Dc .
1.25      jnemeth   599: The biosboot flag is used to indicate which partition should be booted
                    600: by legacy BIOS boot code.
                    601: See the
                    602: .Ic biosboot
                    603: command for more information.
1.42      christos  604: The other attributes are for compatibility with
1.25      jnemeth   605: .Fx
                    606: and are not currently used by any
                    607: .Nx
                    608: code.
                    609: They may be used by
                    610: .Nx
                    611: code in the future.
1.1       christos  612: .El
1.9       wiz       613: .Sh EXAMPLES
                    614: .Bd -literal
                    615: nas# gpt show wd3
                    616:        start        size  index  contents
                    617:            0           1         PMBR
                    618:            1  3907029167
                    619: nas# gpt create wd3
                    620: nas# gpt show wd3
                    621:        start        size  index  contents
                    622:            0           1         PMBR
                    623:            1           1         Pri GPT header
                    624:            2          32         Pri GPT table
                    625:           34  3907029101
                    626:   3907029135          32         Sec GPT table
                    627:   3907029167           1         Sec GPT header
                    628: nas# gpt add -s 10486224 -t swap -i 1 wd3
                    629: nas# gpt label -i 1 -l swap_1 wd3
                    630: parition 1 on rwd3d labeled swap_1
                    631: nas# gpt show wd3
                    632:        start        size  index  contents
                    633:            0           1         PMBR
                    634:            1           1         Pri GPT header
                    635:            2          32         Pri GPT table
                    636:           34    10486224      1  GPT part - NetBSD swap
                    637:     10486258  3896542877
                    638:   3907029135          32         Sec GPT table
                    639:   3907029167           1         Sec GPT header
1.14      jnemeth   640: nas# gpt show -l wd3
                    641:        start        size  index  contents
                    642:            0           1         PMBR
                    643:            1           1         Pri GPT header
                    644:            2          32         Pri GPT table
                    645:           34    10486224      1  GPT part - "swap_1"
                    646:     10486258  3896542877
                    647:   3907029135          32         Sec GPT table
                    648:   3907029167           1         Sec GPT header
1.9       wiz       649: nas#
                    650: .Ed
1.1       christos  651: .Sh SEE ALSO
1.7       jym       652: .Xr boot 8 ,
1.38      christos  653: .Xr dkctl 8 ,
1.1       christos  654: .Xr fdisk 8 ,
1.7       jym       655: .Xr installboot 8 ,
1.1       christos  656: .Xr mount 8 ,
                    657: .Xr newfs 8 ,
                    658: .Xr swapon 8
                    659: .Sh HISTORY
                    660: The
                    661: .Nm
                    662: utility appeared in
                    663: .Fx 5.0
                    664: for ia64.
                    665: .Sh BUGS
                    666: The development of the
                    667: .Nm
                    668: utility is still work in progress.
                    669: Many necessary features are missing or partially implemented.
                    670: In practice this means that the manual page, supposed to describe these
                    671: features, is farther removed from being complete or useful.
                    672: As such, missing functionality is not even documented as missing.
                    673: However, it is believed that the currently present functionality is reliable
                    674: and stable enough that this tool can be used without bullet-proof footware if
                    675: one thinks one does not make mistakes.
                    676: .Pp
                    677: It is expected that the basic usage model does not change, but it is
                    678: possible that future versions will not be compatible in the strictest sense
                    679: of the word.
                    680: Also, options primarily intended for diagnostic or debug purposes may be
                    681: removed in future versions.
                    682: .Pp
                    683: Another possibility is that the current usage model is accompanied by
                    684: other interfaces to make the tool usable as a back-end.
                    685: This all depends on demand and thus feedback.

CVSweb <webmaster@jp.NetBSD.org>