xref: /netbsd-src/sbin/gpt/gpt.8 (revision 5c5a1160462b0449181ca8fdb1ae10d483191515)
1.\" $NetBSD: gpt.8,v 1.85 2025/01/12 20:48:20 christos Exp $
2.\"
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.\"
29.Dd January 12, 2025
30.Dt GPT 8
31.Os
32.Sh NAME
33.Nm gpt
34.Nd GUID partition table maintenance utility
35.Sh SYNOPSIS
36.Nm
37.Op Fl Hnqrv
38.Op Fl m Ar mediasize
39.Op Fl s Ar sectorsize
40.Op Fl T Ar timestamp
41.Ar command
42.Op Ar command_options
43.Ar device
44.Nm
45.Ar set
46.Fl l
47.Nm
48.Ar unset
49.Fl l
50.Nm
51.Ar type
52.Fl l
53.Sh DESCRIPTION
54The
55.Nm
56utility provides the necessary functionality to manipulate GUID partition
57tables
58.Pq GPTs ,
59but see
60.Sx BUGS
61below for how and where functionality is missing.
62The general options are described in the following paragraph.
63The remaining paragraphs describe the individual commands with their options.
64Here we conclude by mentioning that a
65.Ar device
66is either a special file
67corresponding to a disk-like device or a regular file.
68The command is applied to each
69.Ar device
70listed on the command line.
71.Ss General Options
72The general options allow the user to change default settings or otherwise
73change the behaviour that is applicable to all commands.
74Not all commands use all default settings, so some general options may not
75have an effect on all commands.
76.Bl -tag -width XXXX
77.It Fl H
78Ignore existing MBR (Hybrid MBR/GPT mode).
79.It Fl m Ar mediasize
80Override the default media size for the device (obtained
81from the kernel if possible) or defaulting to the file size for
82plain files.
83.It Fl n
84Do not update the wedge information that
85.Nm
86changed.
87You need to use the
88.Xr dkctl 8
89command to manually update the device's wedge configuration if you do that.
90.It Fl q
91Do not print error messages.
92This is not implemented completely yet.
93.It Fl r
94Open the device for reading only.
95.Nm
96Currently this option is primarily useful for the
97.Ic show
98command, but the intent is to use it to implement dry-run behaviour.
99.It Fl s Ar sectorsize
100Override the default sector size for the device (obtained
101from the kernel if possible) or
102.Dv 512
103for plain files.
104.It Fl T Ar timestamp
105Specify a timestamp to be used for uuid generation so that uuids
106are not random and can be consistent for reproducible builds.
107The timestamp can be a pathname, where the timestamps are derived from
108that file, a parseable date for parsedate(3) (this option is not
109yet available in the tools build), or an integer value interpreted
110as the number of seconds from the Epoch.
111.It Fl v
112Controls the verbosity level.
113The level increases with every occurrence of this option.
114There is no formalized definition of the different levels yet.
115.El
116.Ss Commands
117.Bl -tag -width indent
118.\" ==== add ====
119.It Nm Ic add Oo Fl a Ar alignment Oc Oo Fl b Ar blocknr Oc \
120Oo Fl i Ar index Oc Oo Fl l Ar label Oc Oo Fl s Ar size Oc \
121Oo Fl t Ar type Oc
122The
123.Ic add
124command allows the user to add a new partition to an existing table.
125By default, it will create a UFS partition covering the first available block
126of an unused disk space.
127The command-specific options can be used to control this behaviour.
128.Pp
129The
130.Fl a Ar alignment
131option allows the user to specify an alignment for the start and size.
132The alignment is given in bytes and may have a suffix to indicate its
133magnitude.
134.Nm
135will attempt to align the partition.
136.Pp
137The
138.Fl b Ar blocknr
139option allows the user to specify the starting (beginning) sector number of
140the partition.
141The minimum sector number is 1, but has to fall inside an unused region of
142disk space that is covered by the GPT.
143.Pp
144The
145.Fl i Ar index
146option allows the user to specify which (free) entry in the GPT table is to
147be used for the new partition.
148By default, the first free entry is selected.
149.Pp
150The
151.Fl l Ar label
152option allows the user to specify a label for the partition.
153.Pp
154The
155.Fl s Ar size
156option allows the user to specify the size of the partition.
157If there is no suffix, or the suffix is
158.Sq s
159or
160.Sq S
161then size is in sectors, otherwise size is in bytes which must be
162a multiple of the device's sector size.
163Accepted suffix units (case insensitive) are
164.Sq b
165to denote bytes,
166.Sq k
167to denote kilobytes,
168.Sq m
169to denote megabytes and
170.Sq g
171to denote gigabytes,
172.Sq t
173to denote terabytes,
174.Sq p
175to denote petabytes, and
176.Sq e
177to denote exabytes.
178The minimum size is 1 sector.
179.Pp
180The
181.Fl t Ar type
182option allows the user to specify the partition type.
183The type is given as a UUID, but
184.Nm
185accepts
186.Bl -tag -width "windows-reserved" -compact -offset indent
187.It Cm apple
188Apple HFS
189.It Cm apple-ufs
190Apple UFS
191.It Cm bios
192BIOS Boot
193.It Cm efi
194EFI System
195.It Cm fbsd-legacy
196.Fx
197legacy
198.It Cm fbsd-swap
199.Fx
200swap
201.It Cm fbsd-ufs
202.Fx
203UFS/UFS2
204.It Cm fbsd-vinum
205.Fx
206vinum
207.It Cm zfs
208.Fx ,
209.Nx
210ZFS
211.It Cm linux-data
212Linux data
213.It Cm linux-raid
214Linux RAID
215.It Cm linux-swap
216Linux swap
217.It Cm linux-lvm
218Linux LVM
219.It Cm obsd
220OpenBSD data
221.It Cm windows
222Microsoft basic data - NTFS, FAT32 ("msdos"), FAT16, also used for UDF
223.It Cm windows-reserved
224Microsoft reserved
225.It Cm ccd
226.Nx
227ccd component
228.It Cm cgd
229.Nx
230Cryptographic Disk
231.It Cm ffs
232.Nx
233FFSv1/FFSv2
234.It Cm lfs
235.Nx
236LFS
237.It Cm raid
238.Nx
239RAIDFrame component
240.It Cm swap
241.Nx
242swap
243.El
244as aliases for the most commonly used partition types.
245.\" ==== backup ====
246.It Nm Ic backup Oo Fl o Ar outfile Oc
247The
248.Ic backup
249command dumps the MBR or (PMBR) and GPT partition tables to standard
250output or to a file specified by the
251.Ar outfile
252argument in a format to be used by the
253.Ic restore
254command.
255The format is a plist.
256It should not be modified.
257.\" ==== biosboot ====
258.It Nm Ic biosboot Oo Fl A Oc Oo Fl c Ar bootcode Oc Oo Fl b Ar startsec Oc \
259Oo Fl i Ar index Oc Oo Fl L Ar label Oc
260The
261.Ic biosboot
262command allows the user to configure the partition that contains the
263primary bootstrap program, used during
264.Xr boot 8 .
265.Pp
266The
267.Fl A
268options sets the PMBR partition active.
269This should not normally be necessary,
270but some firmware might require it.
271If
272.Fl A
273is omitted, the active flag will be cleared from the PMBR label.
274.Pp
275The
276.Fl c
277option allows the user to specify the filename from which
278.Nm
279should read the bootcode.
280The default is to read from
281.Pa /usr/mdec/gptmbr.bin .
282.Pp
283The partition that should contain the primary bootstrap code,
284.Pq similar to that installed via Xr installboot 8
285is selected using the
286.Fl i ,
287.Fl L
288and
289.Fl b
290options.
291One of these three options is required.
292The
293.Fl i
294option selects the partition given by the
295.Ar index .
296The
297.Fl L
298option selects the partition by
299.Ar label .
300If there are multiple partitions with the same label,
301the first one found will be used.
302The
303.Fl b
304option selects the partition starting at block
305.Ar startsec .
306.\" ==== create ====
307.It Nm Ic create Oo Fl AfP Oc Oo Fl p Ar partitions Oc
308The
309.Ic create
310command allows the user to create a new (empty) GPT.
311By default, one cannot create a GPT when the device contains a MBR,
312however this can be overridden with the
313.Fl f
314option.
315If the
316.Fl f
317option is specified, an existing MBR is destroyed and any partitions
318described by the MBR are lost.
319.Pp
320The
321.Fl A
322options sets the PMBR partition active.
323.Pp
324The
325.Fl P
326option tells
327.Nm
328to create only the primary table and not the backup table.
329This option is only useful for debugging and should not be used otherwise.
330.Pp
331The
332.Fl p
333option changes the default number of partitions the GPT can
334accommodate.
335This is used whenever a new GPT is created.
336By default, the
337.Nm
338utility will create space for 128 partitions (or 32 sectors of 512 bytes).
339.\" ==== destroy ====
340.It Nm Ic destroy Oo Fl r Oc
341The
342.Ic destroy
343command allows the user to destroy an existing, possibly not empty GPT.
344.Pp
345The
346.Fl r
347option instructs
348.Nm
349to destroy the table in a way that it can be recovered.
350.\" ==== header ====
351.It Nm Ic header
352The
353.Ic header
354command displays size information about the media and information from the
355GPT header if it exists.
356.\" ==== label ====
357.It Nm Ic label Oo Fl a Oc Ao Fl f Ar file | Fl l Ar label Ac
358.It Nm Ic label Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \
359Oo Fl L Ar label Oc Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc \
360Ao Fl f Ar file | Fl l Ar label Ac
361The
362.Ic label
363command allows the user to label any partitions that match the selection.
364At least one of the following selection options must be specified.
365.Pp
366The
367.Fl a
368option specifies that all partitions should be labeled.
369It is mutually exclusive with all other selection options.
370.Pp
371The
372.Fl b Ar blocknr
373option selects the partition that starts at the given block number.
374.Pp
375The
376.Fl i Ar index
377option selects the partition with the given partition number.
378.Pp
379The
380.Fl L Ar label
381option selects all partitions that have the given label.
382This can cause multiple partitions to be relabeled.
383.Pp
384The
385.Fl s Ar sectors
386option selects all partitions that have the given size.
387This can cause multiple partitions to be labeled.
388.Pp
389The
390.Fl t Ar type
391option selects all partitions that have the given type.
392The type is given as a UUID or by the aliases that the
393.Ic add
394command accepts.
395This can cause multiple partitions to be labeled.
396.Pp
397The
398.Fl f Ar file
399or
400.Fl l Ar label
401options specify the new label to be assigned to the selected partitions.
402The
403.Fl f Ar file
404option is used to read the label from the specified file.
405Only the first line is read from the file and the trailing newline
406character is stripped.
407If the file name is the dash or minus sign
408.Pq Fl ,
409the label is read from
410the standard input.
411The
412.Fl l Ar label
413option is used to specify the label in the command line.
414The label is assumed to be encoded in UTF-8.
415.\" ==== migrate ====
416.It Nm Ic migrate Oo Fl Afs Oc Oo Fl p Ar partitions Oc
417The
418.Ic migrate
419command allows the user to migrate an MBR-based disk partitioning into a
420GPT-based partitioning.
421By default, the MBR is not migrated when it contains partitions of an unknown
422type.
423This can be overridden with the
424.Fl f
425option.
426Specifying the
427.Fl f
428option will cause unknown partitions to be ignored and any data in it
429to be lost.
430.Pp
431The
432.Fl A
433options sets the PMBR partition active.
434.Pp
435The
436.Fl s
437option prevents migrating
438.Bx
439disk labels into GPT partitions by creating
440the GPT equivalent of a slice.
441Note that the
442.Fl s
443option is not applicable to
444.Nx
445partitions.
446.Pp
447The
448.Fl p
449option changes the default number of partitions the GPT can
450accommodate.
451This is used whenever a new GPT is created.
452By default, the
453.Nm
454utility will create space for 128 partitions (or 32 sectors of 512 bytes).
455.Pp
456The
457.Ic migrate
458command requires space at the beginning and the end of the device outside
459any partitions to store the GPTs.
460Space is required for the GPT header
461.Pq which takes one sector
462and the GPT partition table.
463See the
464.Fl p
465option
466for the size of the GPT partition table.
467By default, just about all devices have a minimum of 62 sectors free at the
468beginning of the device, but do not have any free space at the end.
469For the default GPT partition table size on a 512 byte sector size device,
47033 sectors at the end of the device would need to be freed.
471.\" ==== recover ====
472.It Nm Ic recover
473The
474.Ic recover
475command tries to restore the GPT partition label from the backup
476near the end of the disk.
477It is very useful in case the primary label was deleted.
478.\" ==== remove ====
479.It Nm Ic remove Oo Fl a Oc
480.It Nm Ic remove Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \
481Oo Fl L Ar label Oc Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc
482The
483.Ic remove
484command allows the user to remove any and all partitions that match the
485selection.
486It uses the same selection options as the
487.Ic label
488command.
489See above for a description of these options.
490Partitions are removed by clearing the partition type.
491No other information is changed.
492.\" ==== resize ====
493.It Nm Ic resize Oo Fl i Ar index Oc Oo Fl b Ar startsec Oc Oo Fl a Ar alignment Oc \
494Oo Fl s Ar size Oc Oo Fl q Oc
495The
496.Ic resize
497command allows the user to resize a partition.
498The partition may be shrunk and if there is sufficient free space
499immediately after it then it may be expanded.
500The
501.Fl s
502option allows the new size to be specified, otherwise the partition will
503be increased to the maximum available size.
504If there is no suffix, or the suffix is
505.Sq s
506or
507.Sq S
508then size is in sectors, otherwise size is in bytes which must be
509a multiple of the device's sector size.
510Accepted suffix units are
511.Sq b
512to denote bytes,
513.Sq k
514to denote kilobytes,
515.Sq m
516to denote megabytes and
517.Sq g
518to denote gigabytes.
519The minimum size is 1 sector.
520If the
521.Fl a
522option is specified then the size will be adjusted to be a multiple of
523alignment if possible.
524If the
525.Fl q
526option is specified then the utility will not print output when a
527resize is not required.
528.\" ==== resizedisk ====
529.It Nm Ic resizedisk Oo Fl s Ar size Oc Oo Fl q Oc
530The
531.Ic resizedisk
532command allows the user to resize a disk.
533With GPTs, a backup copy is stored at the end of the disk.
534If the underlying medium changes size
535.Pq or is going to change size ,
536then the backup copy needs to be moved to the new end of the disk,
537and the last sector available for data storage needs to be adjusted.
538This command does that.
539If the backup copy no longer exists due to the medium shrinking, then
540a new backup copy will be created using the primary copy.
541.Pp
542The
543.Fl s
544option allows the new size to be specified, otherwise the backup copy
545will automatically be placed at the current end of the disk.
546If there is no suffix, or the suffix is
547.Sq s
548or
549.Sq S
550then size is in sectors, otherwise size is in bytes which must be
551a multiple of the device's sector size.
552Accepted suffix units are
553.Sq b
554to denote bytes,
555.Sq k
556to denote kilobytes,
557.Sq m
558to denote megabytes and
559.Sq g
560to denote gigabytes.
561Using the
562.Fl s
563option allows you to move the backup copy prior to resizing the medium.
564This is primarily useful when shrinking the medium.
565If the
566.Fl q
567option is specified then the utility will not print output when a
568resize is not required.
569.\" ==== restore ====
570.It Nm Ic restore Oo Fl F Oc Oo Fl i Ar infile Oc
571The
572.Ic restore
573command restores a partition table that was previously saved using the
574.Ic backup
575command.
576The partition table is read from standard input or a file specified in
577the
578.Ar infile
579argument and is expected to be in the format of a plist.
580It assumes an empty disk.
581The
582.Fl F
583option can be used to blank the disk.
584The new disk does not have to be the same size as the old disk as long as all
585the partitions fit, as
586.Ic restore
587will automatically adjust.
588However, the new disk must use the same sector size as the old disk.
589.\" ==== set ====
590.It Nm Ic set Oo Fl a Ar attribute Oc Oo Fl N Oc Oo Fl i Ar index Oc \
591Oo Fl b Ar startsec Oc
592.It Nm Ic set Fl l
593The
594.Ic set
595command sets various partition attributes.
596The
597.Fl l
598flag lists all available attributes.
599The
600.Fl a
601option specifies which attributes to set and may be specified more than once,
602or the attributes can be comma-separated.
603If the
604.Fl N
605option and no
606.Fl a
607option are specified, all attributes are removed.
608The
609.Fl i
610or the
611.Fl b
612option specify which entry to update.
613The possible attributes are
614.Do biosboot Dc ,
615.Do bootme Dc ,
616.Do bootonce Dc ,
617.Do bootfailed Dc ,
618.Do noblockio Dc , and
619.Do required Dc .
620The biosboot flag is used to indicate which partition should be booted
621by legacy BIOS boot code.
622See the
623.Ic biosboot
624command for more information.
625The bootme flag is used to indicate which partition should be booted
626by UEFI boot code.
627The other attributes are for compatibility with
628.Fx
629and are not currently used by
630.Nx .
631They may be used by
632.Nx
633in the future.
634.\" ==== show ====
635.It Nm Ic show Oo Fl aglux Oc Oo Fl i Ar index Oc Oo Fl b Ar startsec Oc
636The
637.Ic show
638command displays the current partitioning on the listed devices and gives
639an overall view of the disk contents.
640With the
641.Fl g
642option the GPT partition GUID will be displayed instead of the GPT partition
643type.
644With the
645.Fl l
646option the GPT partition label will be displayed instead of the GPT partition
647type.
648With the
649.Fl u
650option the GPT partition type is displayed as a UUID instead of in a
651user friendly form.
652With the
653.Fl i
654or the
655.Fl b
656option, all the details of a particular GPT partition will be displayed.
657The format of this display is subject to change.
658With the
659.Fl a
660option, all information for all GPT partitions (just like with
661.Fl i Ar index )
662will be printed.
663The
664.Fl x
665option prints start/size in hex.
666None of the options have any effect on non-GPT partitions.
667The order of precedence for the options is:
668.Fl a ,
669.Fl i ,
670.Fl l ,
671.Fl g ,
672.Fl u ,
673.Fl x .
674.\" ==== type ====
675.It Nm Ic type Oo Fl a Oc Fl T Ar newtype
676.It Nm Ic type Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \
677Oo Fl L Ar label Oc Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc \
678Fl T Ar newtype
679.It Nm Ic type Fl l
680The
681.Ic type
682command allows the user to change the type of any and all partitions
683that match the selection.
684It uses the same selection options as the
685.Ic label
686command.
687See above for a description of these options.
688The
689.Fl l
690flag lists available types.
691.\" ==== unset ====
692.It Nm Ic unset Fl a Ar attribute Oo Fl i Ar index Oc Oo Fl b Ar startsec Oc
693.It Nm Ic unset Fl l
694The
695.Ic unset
696command unsets various partition attributes.
697The
698.Fl l
699flag lists all available attributes.
700The
701.Fl a
702option specifies which attributes to unset and may be specified more than once.
703Alternatively a comma separated list of attributes can be used.
704The
705.Fl i
706or the
707.Fl b
708option specifies which entry to update.
709The possible attributes are
710.Do biosboot Dc ,
711.Do bootme Dc ,
712.Do bootonce Dc ,
713.Do bootfailed Dc ,
714.Do noblockio Dc , and
715.Do required Dc .
716The biosboot flag is used to indicate which partition should be booted
717by legacy BIOS boot code.
718See the
719.Ic biosboot
720command for more information.
721The other attributes are for compatibility with
722.Fx
723and are not currently used by any
724.Nx
725code.
726They may be used by
727.Nx
728code in the future.
729.\" ==== uuid ====
730.It Nm Ic uuid Oo Fl a Oc
731.It Nm Ic uuid Oo Fl b Ar blocknr Oc Oo Fl i Ar index Ar Oc \
732Oo Fl L Ar label Oc Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc \
733Oo Fl U Ar newuuid Oc
734The
735.Ic uuid
736command allows the user to change the UUID of any and all partitions
737that match the selection.
738It uses the same selection options as the
739.Ic label
740command.
741See above for a description of these options.
742If
743.Ar newuuid
744is not specified, a random UUID value is derived from the timestamp
745.Po see the
746.Fl T
747option
748.Pc .
749If
750.Fl a
751is used, then the header UUID is changed as well.
752.Pp
753The primary purpose of this command is for use after cloning a disk to
754prevent collisions when both disks are used in the same system.
755.\" ==== end of commands ====
756.El
757.Sh EXIT STATUS
758The
759.Nm
760command exits with a failure status (1) when the header command
761is used and no GPT header is found.
762This can be used to check for the existence of a GPT in shell scripts.
763.Sh EXAMPLES
764.Bd -literal
765nas# gpt show wd3
766       start        size  index  contents
767           0           1         PMBR
768           1  3907029167
769nas# gpt create wd3
770nas# gpt show wd3
771       start        size  index  contents
772           0           1         PMBR
773           1           1         Pri GPT header
774           2          32         Pri GPT table
775          34  3907029101
776  3907029135          32         Sec GPT table
777  3907029167           1         Sec GPT header
778nas# gpt add -s 10486224 -t swap -i 1 wd3
779nas# gpt label -i 1 -l swap_1 wd3
780partition 1 on rwd3d labeled swap_1
781nas# gpt show wd3
782       start        size  index  contents
783           0           1         PMBR
784           1           1         Pri GPT header
785           2          32         Pri GPT table
786          34    10486224      1  GPT part - NetBSD swap
787    10486258  3896542877
788  3907029135          32         Sec GPT table
789  3907029167           1         Sec GPT header
790nas# gpt show -l wd3
791       start        size  index  contents
792           0           1         PMBR
793           1           1         Pri GPT header
794           2          32         Pri GPT table
795          34    10486224      1  GPT part - "swap_1"
796    10486258  3896542877
797  3907029135          32         Sec GPT table
798  3907029167           1         Sec GPT header
799nas#
800.Ed
801.Pp
802Booting from GPT on a BIOS system: this creates a bootable partition.
803.Bd -literal
804xotica# gpt create wd1
805xotica# gpt add -b 1024 -l bootroot -t ffs -s 1g wd1
806/dev/rwd1: Partition 1 added: 49f48d5a-b10e-11dc-b99b-0019d1879648 1024 2097152
807xotica ~# dmesg | tail -2
808wd1: GPT GUID: 660e0630-0a3f-47c0-bc52-c88bcec79392
809dk0 at wd1: "bootroot", 2097152 blocks at 1024, type: ffs
810xotica# gpt biosboot -L bootroot wd1
811xotica# newfs dk0
812xotica# installboot /dev/rdk0 /usr/mdec/bootxx_ffsv1
813xotica# mount /dev/dk0 /mnt
814xotica# cp /usr/mdec/boot /mnt
815.Ed
816.Pp
817Note that
818.Ic biosboot
819is not needed for UEFI systems.
820.Sh SEE ALSO
821.Xr boot 8 ,
822.Xr dkctl 8 ,
823.Xr fdisk 8 ,
824.Xr installboot 8 ,
825.Xr mount 8 ,
826.Xr newfs 8 ,
827.Xr swapctl 8
828.Sh HISTORY
829The
830.Nm
831utility appeared in
832.Fx 5.0
833for ia64.
834.Nm
835utility first appeared in
836.Nx 5.0 .
837.Sh BUGS
838The development of the
839.Nm
840utility is still work in progress.
841Many necessary features are missing or partially implemented.
842In practice this means that the manual page, supposed to describe these
843features, is farther removed from being complete or useful.
844As such, missing functionality is not even documented as missing.
845However, it is believed that the currently present functionality is reliable
846and stable enough that this tool can be used without bullet-proof footware if
847one thinks one does not make mistakes.
848.Pp
849It is expected that the basic usage model will not change, but it is
850possible that future versions will not be compatible in the strictest sense
851of the word.
852Also, options primarily intended for diagnostic or debug purposes may be
853removed in future versions.
854.Pp
855Another possibility is that the current usage model is accompanied by
856other interfaces to make the tool usable as a back-end.
857This all depends on demand and thus feedback.
858