1.\" Copyright (c) 1987, 1988, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" Symmetric Computer Systems. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 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.\" 3. All advertising materials mentioning features or use of this software 16.\" must display the following acknowledgment: 17.\" This product includes software developed by the University of 18.\" California, Berkeley and its contributors. 19.\" 4. Neither the name of the University nor the names of its contributors 20.\" may be used to endorse or promote products derived from this software 21.\" without specific prior written permission. 22.\" 23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)disklabel.8 8.2 (Berkeley) 4/19/94 36.\" $FreeBSD$ 37.\" 38.Dd July 30, 1999 39.Dt DISKLABEL 8 40.Os 41.Sh NAME 42.Nm disklabel 43.Nd read and write disk pack label 44.Sh SYNOPSIS 45.Nm 46.Op Fl r 47.Ar disk 48.Nm 49.Fl w 50.Op Fl r 51.Op Fl n 52.Ar disk Ar disktype/auto 53.Oo Ar packid Oc 54.Nm 55.Fl e 56.Op Fl r 57.Op Fl n 58.Ar disk 59.Nm 60.Fl R 61.Op Fl r 62.Op Fl n 63.Ar disk Ar protofile 64.Pp 65.Nm 66.Fl B 67.Oo 68.Fl b Ar boot 69.Oc 70.Ar disk 71.Oo Ar disktype/auto Oc 72.Nm 73.Fl w 74.Fl B 75.Op Fl n 76.Oo 77.Fl b Ar boot 78.Oc 79.Ar disk Ar disktype/auto 80.Oo Ar packid Oc 81.Nm 82.Fl R 83.Fl B 84.Op Fl n 85.Oo 86.Fl b Ar boot 87.Oc 88.Ar disk Ar protofile 89.Sh DESCRIPTION 90The 91.Nm 92utility 93installs, examines or modifies the label on a disk drive or pack. When writing 94the label, it can be used to change the drive identification, the disk 95partitions on the drive, or to replace a damaged label. There are several forms 96of the command that read (display), install or edit the label on a disk. In 97addition, 98.Nm 99can install bootstrap code. 100.Ss Raw or in-core label 101.Pp 102The disk label resides close to or at the beginning of each disk slice. 103For faster access, the kernel maintains a copy in core at all times. By 104default, most 105.Nm 106access the in-core copy of the label. To access the raw (on-disk) copy, use the 107.Fl r 108option. This option allows a label to be installed on a disk without kernel 109support for a label, such as when labels are first installed on a system; it 110must be used when first installing a label on a disk. The specific effect of 111.Fl r 112is described under each command. 113.Pp 114.Ss Disk device name 115.Pp 116All 117.Nm 118forms require a disk device name, which should always be the raw 119device name representing the disk or slice. For example 120.Pa da0 121represents the entire disk regardless of any DOS partitioning, 122and 123.Pa da0s1 124represents a slice. Some devices, most notably 125.Ar ccd , 126require that the 127.Dq whole-disk 128(or 129.Dq c ) 130partition be specified. For example 131.Pa ccd0c . 132You do not have to include the 133.Pa /dev/ 134path prefix when specifying the device. 135The 136.Nm 137utility will automatically prepend it. 138.Ss Reading the disk label 139.Pp 140To examine the label on a disk drive, use 141.Nm 142without options: 143.Pp 144.Nm 145.Op Fl r 146.Ar disk 147.Pp 148.Ar disk 149represents the raw disk in question, and may be in the form 150.Pa da0 151or 152.Pa /dev/da0c . 153It will display all of the parameters associated with the drive and its 154partition layout. Unless the 155.Fl r 156flag is given, 157the kernel's in-core copy of the label is displayed; 158if the disk has no label, or the partition types on the disk are incorrect, 159the kernel may have constructed or modified the label. 160If the 161.Fl r 162flag is given, 163.Nm 164reads the label from the raw disk and displays it. Both versions are usually 165identical except in the case where a label has not yet been initialized or 166is corrupt. 167.Ss Writing a standard label 168.Pp 169To write a standard label, use the form 170.Pp 171.Nm 172.Fl w 173.Op Fl r 174.Op Fl n 175.Ar disk Ar disktype/auto 176.Oo Ar packid Oc 177.Pp 178.Nm 179.Fl w 180.Op Fl r 181.Op Fl n 182.Ar disk 183auto 184.Pp 185The required arguments to 186.Nm 187are the drive to be labeled and the drive type as described in the 188.Xr disktab 5 189file. The drive parameters and partitions are taken from that file. If 190different disks of the same physical type are to have different partitions, it 191will be necessary to have separate disktab entries describing each, or to edit 192the label after installation as described below. The optional argument is a 193pack identification string, up to 16 characters long. The pack id must be 194quoted if it contains blanks. 195.Pp 196If the 197.Fl n 198flag is given, no data will be written to the device, and instead the 199disklabel that would have been written will be printed to stdout. 200.Pp 201If the 202.Fl r 203flag is given, the disk sectors containing the label and bootstrap 204will be written directly. 205A side-effect of this is that any existing bootstrap code will be overwritten 206and the disk rendered unbootable. See the boot options below for a method of 207writing the label and the bootstrap at the same time. 208If 209.Fl r 210is not specified, 211the existing label will be updated via the in-core copy and any bootstrap 212code will be unaffected. 213If the disk does not already have a label, the 214.Fl r 215flag must be used. 216In either case, the kernel's in-core label is replaced. 217.Pp 218For a virgin disk that is not known to 219.Xr disktab 5 , 220.Ar disktype 221can be specified as 222.Dq auto . 223In this case, the driver is requested to produce a virgin label for the 224disk. This might or might not be successful, depending on whether the 225driver for the disk is able to get the required data without reading 226anything from the disk at all. It will likely succeed for all SCSI 227disks, most IDE disks, and vnode devices. Writing a label to the 228disk is the only supported operation, and the 229.Ar disk 230itself must be provided as the canonical name, i.e. not as a full 231path name. 232.Pp 233For most harddisks, a label based on percentages for most partitions (and 234one partition with a size of 235.Ql * ) 236will produce a reasonable configuration. 237.Pp 238PC-based systems have special requirements in order for the BIOS to properly 239recognize a 240.Fx 241disklabel. Older systems may require what is known as a 242.Dq dangerously dedicated 243disklabel, which creates a fake DOS partition to work around problems older 244BIOSes have with modern disk geometries. 245On newer systems you generally want 246to create a normal DOS partition using 247.Ar fdisk 248and then create a 249.Fx 250disklabel within that slice. This is described 251later on in this page. 252.Pp 253Installing a new disklabel does not in of itself allow your system to boot 254a kernel using that label. You must also install boot blocks, which is 255described later on in this manual page. 256.Ss Editing an existing disk label 257.Pp 258To edit an existing disk label, use the form 259.Pp 260.Nm 261.Fl e 262.Op Fl r 263.Op Fl n 264.Ar disk 265.Pp 266This command reads the label from the in-core kernel copy, or directly from the 267disk if the 268.Fl r 269flag is also specified. The label is written to a file in ASCII and then 270supplied to an editor for changes. If no editor is specified in an 271.Ev EDITOR 272environment variable, 273.Xr vi 1 274is used. When the editor terminates, the label file is used to rewrite the disk 275label. Existing bootstrap code is unchanged regardless of whether 276.Fl r 277was specified. If 278.Fl n 279is specified, no data will be written to the device, and instead the 280disklabel that would have been written will be printed to stdout. This is 281useful to see how a partitioning scheme will work out for a specific disk. 282.Ss Restoring a disk label from a file 283.Pp 284To restore a disk label from a file, use the form 285.Pp 286.Nm 287.Fl R 288.Op Fl r 289.Op Fl n 290.Ar disk Ar protofile 291.Pp 292.Nm 293is capable of restoring a disk label that was previously saved in a file in ASCII format. 294The prototype file used to create the label should be in the same format as that 295produced when reading or editing a label. Comments are delimited by 296.Ar \&# 297and newline. As when writing a new label, any existing bootstrap code will be 298clobbered if 299.Fl r 300is specified and will be unaffected otherwise. See the boot options below for a 301method of restoring the label and writing the bootstrap at the same time. 302If 303.Fl n 304is used, no data will be written to the device, and instead the 305disklabel that would have been written will be printed to stdout. This is 306useful to see how a partitioning scheme will work out for a specific disk. 307.Ss Installing bootstraps 308.Pp 309The final three forms of 310.Nm 311are used to install bootstrap code. If you are creating a 312.Dq dangerously-dedicated 313slice for compatibility with older PC systems, 314you generally want to specify the raw disk name such as 315.Pa da0 . 316If you are creating a label within an existing DOS slice, 317you should specify 318the partition name such as 319.Pa da0s1a . 320Making a slice bootable can be tricky. If you are using a normal DOS 321slice you typically install (or leave) a standard MBR on the base disk and 322then install the 323.Fx 324bootblocks in the slice. 325.Pp 326.Nm 327.Fl B 328.Oo 329.Fl b Ar boot 330.Oc 331.Ar disk 332.Oo Ar disktype Oc 333.Pp 334This form installs the bootstrap only. It does not change the disk label. 335You should never use this command on a base disk unless you intend to create a 336.Dq dangerously-dedicated 337disk, such as 338.Ar da0 . 339This command is typically run on a slice such as 340.Ar da0s1 . 341.Pp 342.Nm 343.Fl w 344.Fl B 345.Op Fl n 346.Oo 347.Fl b Ar boot 348.Oc 349.Ar disk Ar disktype 350.Oo Ar packid Oc 351.Pp 352This form corresponds to the 353.Dq write label 354command described above. 355In addition to writing a new volume label, it also installs the bootstrap. 356If run on a base disk this command will create a 357.Dq dangerously-dedicated 358label. This command is normally run on a slice rather than a base disk. 359If 360.Fl n 361is used, no data will be written to the device, and instead the 362disklabel that would have been written will be printed to stdout. 363.Pp 364.Nm 365.Fl R 366.Fl B 367.Op Fl n 368.Oo 369.Fl b Ar boot 370.Oc 371.Ar disk Ar protofile 372.Pp 373This form corresponds to the 374.Dq restore label 375command described above. 376In addition to restoring the volume label, it also installs the bootstrap. 377If run on a base disk this command will create a 378.Dq dangerously-dedicated 379label. This command is normally run on a slice rather than a base disk. 380.Pp 381The bootstrap commands always access the disk directly, so it is not necessary 382to specify the 383.Fl r 384flag. If 385.Fl n 386is used, no data will be written to the device, and instead the 387disklabel that would have been written will be printed to stdout. 388.Pp 389The bootstrap code is comprised of two boot programs, both 390compiled into a single 391.Pa /boot/boot 392image. 393An alternative boot image may be specified with the 394.Fl b 395option. 396.Ss Initializing/Formatting a bootable disk from scratch 397.Pp 398To initialize a disk from scratch the following sequence is recommended. 399Please note that this will wipe everything that was previously on the disk, 400including any 401.No non- Ns Fx 402slices. 403.Bl -enum 404.It 405Use 406.Xr fdisk 8 407to initialize the hard disk, and create a slice table, referred to 408as the partition table in DOS. 409Here you will define disk slices for your system. 410.It 411Use 412.Nm 413to define and write partitions and mount points. 414You are not required to define the mount points here though, 415they can be defined later using 416.Xr mount 8 . 417.It 418Finally use 419.Xr newfs 8 420to create a file system on the new partition. 421A typical partitioning scheme would be to have an 422.Dq a 423partition 424of approximately 128MB to hold the root file system, a 425.Dq b 426partition for 427swap, a 428.Dq d 429partition for /var (usually 128MB), an 430.Dq e 431partition 432for /var/tmp (usually 128MB), an 433.Dq f 434partition for /usr (usually around 2G), 435and finally a 436.Dq g 437partition for /home (usually all remaining space). 438Your mileage may vary. 439.El 440.Pp 441.Nm fdisk Fl BI Ar da0 442.Pp 443.Nm 444.Fl w 445.Fl B 446.Ar da0s1 447auto 448.Pp 449.Pp 450.Nm 451.Fl e 452.Ar da0s1 453.Sh FILES 454.Bl -tag -width ".Pa /etc/disktab" -compact 455.It Pa /boot/boot 456Default boot image. 457.It Pa /etc/disktab 458Disk description file. 459.El 460.Sh SAVED FILE FORMAT 461The 462.Nm 463utility 464uses an ASCII version of the label when examining, editing or restoring a disk 465label. The format is: 466.Bd -literal -offset 4n 467# /dev/da1c: 468type: SCSI 469disk: da0s1 470label: 471flags: 472bytes/sector: 512 473sectors/track: 51 474tracks/cylinder: 19 475sectors/cylinder: 969 476cylinders: 1211 477sectors/unit: 1173930 478rpm: 3600 479interleave: 1 480trackskew: 0 481cylinderskew: 0 482headswitch: 0 # milliseconds 483track-to-track seek: 0 # milliseconds 484drivedata: 0 485 4868 partitions: 487# size offset fstype [fsize bsize bps/cpg] 488 a: 81920 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 84*) 489 b: 160000 81920 swap # (Cyl. 84* - 218*) 490 c: 1173930 0 unused 0 0 # (Cyl. 0 - 1211*) 491 h: 962010 211920 vinum # (Cyl. 218*- 1211*) 492.Ed 493.Pp 494Lines starting with a # mark are comments. Most of the other specifications are 495no longer used. The ones which must still be set correctly are: 496.Pp 497.Bl -hang -width 20n 498.It Nm label 499is an optional label, set by the 500.Ar packid 501option when writing a label. 502.It Nm flags 503Flags may be 504.Ar removable , 505.Ar ecc 506or 507.Ar badsect . 508.Ar removable 509is set for removable media drives, but no current 510.Fx 511driver evaluates this 512flag. 513.Ar ecc 514is no longer supported; 515.Ar badsect 516specifies that the drive can perform bad sector remapping. 517.It Nm sectors/unit 518describes the total size of the disk. This value must be correct. 519.It Nm the partition table 520This is the 521.Ux 522partition table, not the Microsoft partition table described in 523.Xr fdisk 8 . 524.El 525.Pp 526The partition table can have up to 8 entries. It contains the following 527information: 528.Bl -hang -width 10n 529.It identifier 530The partition identifier is a single letter in the range 531.Dq a 532to 533.Dq h . 534By convention, partition 535.Dq c 536is reserved to describe the entire disk. 537.It size 538is the size of the partition in sectors, 539.Cm K 540(kilobytes - 1024), 541.Cm M 542(megabytes - 1024*1024), 543.Cm G 544(gigabytes - 1024*1024*1024), 545.Cm % 546(percentage of free space AFTER removing any fixed-size partitions other 547than partition 548.Dq c) , 549or 550.Cm * 551(all remaining free space AFTER fixed-size and percentage 552partitions). For partition 553.Dq c , 554a size of 555.Cm * 556indicates the entire disk. Lowercase versions of 557.Cm K , M , 558and 559.Cm G 560are allowed. 561Size and type should be specifed without any spaces between them. 562.Pp 563Example: 2097152, 1g, 1024m and 1048576k are all the same size 564(assuming 512-byte sectors). 565.It offset 566is the offset of the start of the partition from the beginning of the 567drive in sectors, or 568.Cm * 569to have 570.Nm 571calculate the correct offset to use (the end of the previous partition plus 572one, ignoring partition 573.Dq c . 574For partition 575.Dq c , 576.Cm * 577will be interpreted as an offset of 0. 578.It fstype 579describes the purpose of the partition. The example shows all currently used 580partition types. 581For UFS file systems and ccd partitions, use type 582.Cm 4.2BSD . 583For Vinum drives, use type 584.Cm vinum . 585Other common types are 586.Cm unused 587and 588.Cm swap . 589By convention, partition 590.Dq c 591represents the entire slice and should be of type 592.Cm unused , 593though 594.Nm 595does not enforce this convention. 596The 597.Nm 598utility 599also knows about a number of other partition types, none of which are in current 600use. 601See the definitions starting with 602.Dv FS_UNUSED 603in 604.Pa /usr/include/sys/disklabel.h 605for more details. 606.It fsize 607For 608.Cm 4.2BSD 609and LFS file systems only, the fragment size. Defaults to 1024 for 610partitions smaller than 1 GB, 4096 for partitions 1GB or larger. 611.It bsize 612For 613.Cm 4.2BSD 614and LFS file systems only, the block size. Defaults to 8192 for 615partitions smaller than 1 GB, 16384 for partitions 1GB or larger. 616.It bps/cpg 617For 618.Cm 4.2BSD 619file systems, the number of cylinders in a cylinder group. For LFS file 620systems, the segment shift value. Defaults to 16 for 621partitions smaller than 1 GB, 64 for partitions 1GB or larger. 622.El 623.Pp 624The remainder of the line is a comment and shows the cylinder allocations based 625on the obsolete (but possibly correct) geometry information about the drive. 626The asterisk (*) indicates that the partition does not begin or end exactly on a 627cylinder boundary. 628.Sh EXAMPLES 629.Dl disklabel da0 630.Pp 631Display the in-core label for 632.Pa da0s1 633as obtained via 634.Pa /dev/da0s1 . 635When reading a label, 636.Fx 637will allow you to specify the base disk name 638even if the label resides on a slice. However, to be proper you should 639specify the base disk name only if you are using a 640.Dq dangerously-dedicated 641label. Normally you specify the slice. 642.Pp 643.Dl disklabel da0s1 > savedlabel 644.Pp 645Save the in-core label for 646.Pa da0s1 647into the file 648.Pa savedlabel . 649This file can be used with the 650.Fl R 651flag to restore the label at a later date. 652.Pp 653.Dl disklabel -w -r /dev/da0s1 da2212 foo 654.Pp 655Create a label for 656.Pa da0s1 657based on information for 658.Dq da2212 659found in 660.Pa /etc/disktab . 661Any existing bootstrap code will be clobbered. 662.Pp 663.Dl disklabel -e -r da0s1 664.Pp 665Read the on-disk label for 666.Pa da0s1 , 667edit it and reinstall in-core as well as on-disk. Existing bootstrap code is 668unaffected. 669.Pp 670.Dl disklabel -e -r -n da0s1 671.Pp 672Read the on-disk label for 673.Pa da0s1 , 674edit it, and display what the new label would be (in sectors). It does 675NOT install the new label either in-core or on-disk. 676.Pp 677.Dl disklabel -r -w da0s1 auto 678.Pp 679Try to auto-detect the required information from 680.Pa da0s1 , 681and write a new label to the disk. Use another disklabel -e command to edit the 682partitioning and file system information. 683.Pp 684.Dl disklabel -R da0s1 savedlabel 685.Pp 686Restore the on-disk and in-core label for 687.Pa da0s1 688from information in 689.Pa savedlabel . 690Existing bootstrap code is unaffected. 691.Pp 692.Dl disklabel -R -n da0s1 label_layout 693.Pp 694Display what the label would be for 695.Pa da0s1 696using the partition layout in 697.Pa label_layout . 698This is useful for determining how much space would be alloted for various 699partitions with a labelling scheme using 700.Cm % Ns -based 701or 702.Cm * 703partition sizes. 704.Pp 705.Dl disklabel -B da0s1 706.Pp 707Install a new bootstrap on 708.Pa da0s1 . 709The boot code comes from 710.Pa /boot/boot . 711On-disk and in-core labels are unchanged. 712.Pp 713.Dl disklabel -w -B /dev/da0s1 -b newboot da2212 714.Pp 715Install a new label and bootstrap. 716The label is derived from disktab information for 717.Dq da2212 718and installed both in-core and on-disk. 719The bootstrap code comes from the files 720.Pa /boot/newboot 721.Pp 722.Dl dd if=/dev/zero of=/dev/da0 bs=512 count=32 723.Dl fdisk -BI da0 724.Dl dd if=/dev/zero of=/dev/da0s1 bs=512 count=32 725.Dl disklabel -w -B da0s1 auto 726.Dl disklabel -e da0s1 727.Pp 728Completely wipe any prior information on the disk, creating a new bootable 729disk with a DOS partition table containing one 730.Dq whole-disk 731slice. Then 732initialize the slice, then edit it to your needs. The 733.Pa dd 734commands are optional, but may be necessary for some BIOSes to properly 735recognize the disk. 736.Pp 737This is an example disklabel that uses some of the new partition size types 738such as 739.Cm % , M , G , 740and 741.Cm * , 742which could be used as a source file for 743.Pp 744.Dl disklabel -R ad0s1c new_label_file 745.Bd -literal -offset 4n 746# /dev/ad0s1c: 747type: ESDI 748disk: ad0s1 749label: 750flags: 751bytes/sector: 512 752sectors/track: 63 753tracks/cylinder: 16 754sectors/cylinder: 1008 755cylinders: 40633 756sectors/unit: 40959009 757rpm: 3600 758interleave: 1 759trackskew: 0 760cylinderskew: 0 761headswitch: 0 # milliseconds 762track-to-track seek: 0 # milliseconds 763drivedata: 0 764 7658 partitions: 766# size offset fstype [fsize bsize bps/cpg] 767 a: 400M 0 4.2BSD 4096 16384 75 # (Cyl. 0 - 812*) 768 b: 1G * swap 769 c: * * unused 770 e: 204800 * 4.2BSD 771 f: 5g * 4.2BSD 772 g: * * 4.2BSD 773.Ed 774.Sh SEE ALSO 775.Xr ccd 4 , 776.Xr disklabel 5 , 777.Xr disktab 5 , 778.Xr boot0cfg 8 , 779.Xr fdisk 8 , 780.Xr vinum 8 781.Sh DIAGNOSTICS 782The kernel device drivers will not allow the size of a disk partition 783to be decreased or the offset of a partition to be changed while it is open. 784Some device drivers create a label containing only a single large partition 785if a disk is unlabeled; thus, the label must be written to the 786.Dq a 787partition of the disk while it is open. This sometimes requires the desired 788label to be set in two steps, the first one creating at least one other 789partition, and the second setting the label on the new partition while shrinking 790the 791.Dq a 792partition. 793.Pp 794On some machines the bootstrap code may not fit entirely in the area 795allocated for it by some file systems. 796As a result, it may not be possible to have file systems on some partitions 797of a 798.Dq bootable 799disk. 800When installing bootstrap code, 801.Nm 802checks for these cases. 803If the installed boot code would overlap a partition of type FS_UNUSED 804it is marked as type FS_BOOT. 805The 806.Xr newfs 8 807utility will disallow creation of file systems on FS_BOOT partitions. 808Conversely, if a partition has a type other than FS_UNUSED or FS_BOOT, 809.Nm 810will not install bootstrap code that overlaps it. 811.Sh BUGS 812When a disk name is given without a full pathname, 813the constructed device name uses the 814.Dq c 815partition. 816.Pp 817For the i386 architecture, the primary bootstrap sector contains 818an embedded 819.Em fdisk 820table. 821The 822.Nm 823utility takes care to not clobber it when installing a bootstrap only 824.Pq Fl B , 825or when editing an existing label 826.Pq Fl e , 827but it unconditionally writes the primary bootstrap program onto 828the disk for 829.Fl w 830or 831.Fl R , 832thus replacing the 833.Em fdisk 834table by the dummy one in the bootstrap program. This is only of 835concern if the disk is fully dedicated, so that the 836.Bx 837disklabel 838starts at absolute block 0 on the disk. 839.Pp 840The 841.Nm 842utility 843does not perform all possible error checking. Warning *is* given if partitions 844overlap; if an absolute offset does not match the expected offset; if the 845.Dq c 846partition does not start at 0 or does not cover the entire slice; if a 847partition runs past the end of the device; and a number of other errors; but 848no warning is given if space remains unused. 849