18fae3551SRodney W. Grimes.\" Copyright (c) 1987, 1988, 1991, 1993 28fae3551SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 38fae3551SRodney W. Grimes.\" 48fae3551SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by 58fae3551SRodney W. Grimes.\" Symmetric Computer Systems. 68fae3551SRodney W. Grimes.\" 78fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 88fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions 98fae3551SRodney W. Grimes.\" are met: 108fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 118fae3551SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 128fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 138fae3551SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 148fae3551SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 158fae3551SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software 166bd343a9SPhilippe Charnier.\" must display the following acknowledgment: 178fae3551SRodney W. Grimes.\" This product includes software developed by the University of 188fae3551SRodney W. Grimes.\" California, Berkeley and its contributors. 198fae3551SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 208fae3551SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 218fae3551SRodney W. Grimes.\" without specific prior written permission. 228fae3551SRodney W. Grimes.\" 238fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 248fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 258fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 268fae3551SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 278fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 288fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 298fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 308fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 318fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 328fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 338fae3551SRodney W. Grimes.\" SUCH DAMAGE. 348fae3551SRodney W. Grimes.\" 358fae3551SRodney W. Grimes.\" @(#)disklabel.8 8.2 (Berkeley) 4/19/94 366bd343a9SPhilippe Charnier.\" $Id: disklabel.8,v 1.7 1997/06/23 04:02:17 steve Exp $ 378fae3551SRodney W. Grimes.\" 38681e5e7aSSteve Price.Dd April 19, 1994 398fae3551SRodney W. Grimes.Dt DISKLABEL 8 408fae3551SRodney W. Grimes.Os BSD 4.2 418fae3551SRodney W. Grimes.Sh NAME 428fae3551SRodney W. Grimes.Nm disklabel 438fae3551SRodney W. Grimes.Nd read and write disk pack label 448fae3551SRodney W. Grimes.Sh SYNOPSIS 458fae3551SRodney W. Grimes.Nm disklabel 468fae3551SRodney W. Grimes.Op Fl r 478fae3551SRodney W. Grimes.Ar disk 488fae3551SRodney W. Grimes.Nm disklabel 498fae3551SRodney W. Grimes.Fl w 508fae3551SRodney W. Grimes.Op Fl r 518fae3551SRodney W. Grimes.Ar disk Ar disktype 528fae3551SRodney W. Grimes.Oo Ar packid Oc 538fae3551SRodney W. Grimes.Nm disklabel 548fae3551SRodney W. Grimes.Fl e 558fae3551SRodney W. Grimes.Op Fl r 568fae3551SRodney W. Grimes.Ar disk 578fae3551SRodney W. Grimes.Nm disklabel 588fae3551SRodney W. Grimes.Fl R 598fae3551SRodney W. Grimes.Op Fl r 608fae3551SRodney W. Grimes.Ar disk Ar protofile 618fae3551SRodney W. Grimes.Nm disklabel 628fae3551SRodney W. Grimes.Op Fl NW 638fae3551SRodney W. Grimes.Ar disk 648fae3551SRodney W. Grimes.sp 658fae3551SRodney W. Grimes.Nm disklabel 668fae3551SRodney W. Grimes.Fl B 678fae3551SRodney W. Grimes.Oo 688fae3551SRodney W. Grimes.Fl b Ar boot1 698fae3551SRodney W. Grimes.Op Fl s Ar boot2 708fae3551SRodney W. Grimes.Oc 718fae3551SRodney W. Grimes.Ar disk 728fae3551SRodney W. Grimes.Oo Ar disktype Oc 738fae3551SRodney W. Grimes.Nm disklabel 748fae3551SRodney W. Grimes.Fl w 758fae3551SRodney W. Grimes.Fl B 768fae3551SRodney W. Grimes.Oo 778fae3551SRodney W. Grimes.Fl b Ar boot1 788fae3551SRodney W. Grimes.Op Fl s Ar boot2 798fae3551SRodney W. Grimes.Oc 808fae3551SRodney W. Grimes.Ar disk Ar disktype 818fae3551SRodney W. Grimes.Oo Ar packid Oc 828fae3551SRodney W. Grimes.Nm disklabel 838fae3551SRodney W. Grimes.Fl R 848fae3551SRodney W. Grimes.Fl B 858fae3551SRodney W. Grimes.Oo 868fae3551SRodney W. Grimes.Fl b Ar boot1 878fae3551SRodney W. Grimes.Op Fl s Ar boot2 888fae3551SRodney W. Grimes.Oc 898fae3551SRodney W. Grimes.Ar disk Ar protofile 908fae3551SRodney W. Grimes.Oo Ar disktype Oc 918fae3551SRodney W. Grimes.Sh DESCRIPTION 928fae3551SRodney W. Grimes.Nm Disklabel 938fae3551SRodney W. Grimescan be used to install, examine or modify the label on a disk drive or pack. 948fae3551SRodney W. GrimesWhen writing the label, it can be used 958fae3551SRodney W. Grimesto change the drive identification, 968fae3551SRodney W. Grimesthe disk partitions on the drive, 978fae3551SRodney W. Grimesor to replace a damaged label. 988fae3551SRodney W. GrimesOn some systems, 996bd343a9SPhilippe Charnier.Nm 1008fae3551SRodney W. Grimescan be used to install bootstrap code as well. 1018fae3551SRodney W. GrimesThere are several forms of the command that read (display), install or edit 1028fae3551SRodney W. Grimesthe label on a disk. 1038fae3551SRodney W. GrimesEach form has an additional option, 1048fae3551SRodney W. Grimes.Fl r , 1058fae3551SRodney W. Grimeswhich causes the label to be read from or written to the disk directly, 1068fae3551SRodney W. Grimesrather than going through the system's in-core copy of the label. 1078fae3551SRodney W. GrimesThis option may allow a label to be installed on a disk 1088fae3551SRodney W. Grimeswithout kernel support for a label, such as when labels are first installed 1098fae3551SRodney W. Grimeson a system; it must be used when first installing a label on a disk. 1108fae3551SRodney W. GrimesThe specific effect of 1118fae3551SRodney W. Grimes.Fl r 1128fae3551SRodney W. Grimesis described under each command. 1138fae3551SRodney W. GrimesThe read and install forms also support the 1148fae3551SRodney W. Grimes.Fl B 1158fae3551SRodney W. Grimesoption to install bootstrap code. 1168fae3551SRodney W. GrimesThese variants are described later. 1178fae3551SRodney W. Grimes.Pp 1188fae3551SRodney W. GrimesThe first form of the command (read) is used to examine the label on the named 1198fae3551SRodney W. Grimesdisk drive (e.g. sd0 or /dev/rsd0c). 1208fae3551SRodney W. GrimesIt will display all of the parameters associated with the drive 1218fae3551SRodney W. Grimesand its partition layout. 1228fae3551SRodney W. GrimesUnless the 1238fae3551SRodney W. Grimes.Fl r 1248fae3551SRodney W. Grimesflag is given, 1258fae3551SRodney W. Grimesthe kernel's in-core copy of the label is displayed; 1268fae3551SRodney W. Grimesif the disk has no label, or the partition types on the disk are incorrect, 1278fae3551SRodney W. Grimesthe kernel may have constructed or modified the label. 1288fae3551SRodney W. GrimesIf the 1298fae3551SRodney W. Grimes.Fl r 1308fae3551SRodney W. Grimesflag is given, the label from the raw disk will be displayed rather 1318fae3551SRodney W. Grimesthan the in-core label. 1328fae3551SRodney W. Grimes.Pp 1338fae3551SRodney W. GrimesThe second form of the command, with the 1348fae3551SRodney W. Grimes.Fl w 1358fae3551SRodney W. Grimesflag, is used to write a standard label on the designated drive. 1368fae3551SRodney W. GrimesThe required arguments to 1376bd343a9SPhilippe Charnier.Nm 1386bd343a9SPhilippe Charnierare the drive to be labeled (e.g. sd0), and 1398fae3551SRodney W. Grimesthe drive type as described in the 1408fae3551SRodney W. Grimes.Xr disktab 5 1418fae3551SRodney W. Grimesfile. 1428fae3551SRodney W. GrimesThe drive parameters and partitions are taken from that file. 1438fae3551SRodney W. GrimesIf different disks of the same physical type are to have different 1448fae3551SRodney W. Grimespartitions, it will be necessary to have separate disktab entries 1458fae3551SRodney W. Grimesdescribing each, or to edit the label after installation as described below. 1468fae3551SRodney W. GrimesThe optional argument is a pack identification string, 1478fae3551SRodney W. Grimesup to 16 characters long. 1488fae3551SRodney W. GrimesThe pack id must be quoted if it contains blanks. 1498fae3551SRodney W. GrimesIf the 1508fae3551SRodney W. Grimes.Fl r 1518fae3551SRodney W. Grimesflag is given, the disk sectors containing the label and bootstrap 1528fae3551SRodney W. Grimeswill be written directly. 1538fae3551SRodney W. GrimesA side-effect of this is that any existing bootstrap code will be overwritten 1548fae3551SRodney W. Grimesand the disk rendered unbootable. 1558fae3551SRodney W. GrimesIf 1568fae3551SRodney W. Grimes.Fl r 1578fae3551SRodney W. Grimesis not specified, 1588fae3551SRodney W. Grimesthe existing label will be updated via the in-core copy and any bootstrap 1598fae3551SRodney W. Grimescode will be unaffected. 1608fae3551SRodney W. GrimesIf the disk does not already have a label, the 1618fae3551SRodney W. Grimes.Fl r 1628fae3551SRodney W. Grimesflag must be used. 1638fae3551SRodney W. GrimesIn either case, the kernel's in-core label is replaced. 1648fae3551SRodney W. Grimes.Pp 165425bed3aSJoerg WunschFor a virgin disk that is not known to 166425bed3aSJoerg Wunsch.Xr disktab 5 , 167425bed3aSJoerg Wunsch.Ar disktype 168425bed3aSJoerg Wunschcan be specified as 169425bed3aSJoerg Wunsch.Dq auto . 170425bed3aSJoerg WunschIn this case, the driver is requested to produce a virgin label for the 171425bed3aSJoerg Wunschdisk. This might or might not be successful, depending on whether the 172425bed3aSJoerg Wunschdriver for the disk is able to get the required data without reading 173425bed3aSJoerg Wunschanything from the disk at all. It will likely succeed for all SCSI 174425bed3aSJoerg Wunschdisks, most IDE disks, and vnode devices. Writing a label to the 175425bed3aSJoerg Wunschdisk is the only supported operation, and the 176425bed3aSJoerg Wunsch.Ar disk 177425bed3aSJoerg Wunschitself must be provided as the canonical name, i.e. not as a full 178425bed3aSJoerg Wunschpath name. 179425bed3aSJoerg Wunsch.Pp 1808fae3551SRodney W. GrimesAn existing disk label may be edited by using the 1818fae3551SRodney W. Grimes.Fl e 1828fae3551SRodney W. Grimesflag. 1838fae3551SRodney W. GrimesThe label is read from the in-core kernel copy, 1848fae3551SRodney W. Grimesor directly from the disk if the 1858fae3551SRodney W. Grimes.Fl r 1868fae3551SRodney W. Grimesflag is also given. 1878fae3551SRodney W. GrimesThe label is formatted and then supplied to an editor for changes. 1888fae3551SRodney W. GrimesIf no editor is specified in an 1898fae3551SRodney W. Grimes.Ev EDITOR 1908fae3551SRodney W. Grimesenvironment variable, 1918fae3551SRodney W. Grimes.Xr vi 1 1928fae3551SRodney W. Grimesis used. 1938fae3551SRodney W. GrimesWhen the editor terminates, the formatted label is reread 1948fae3551SRodney W. Grimesand used to rewrite the disk label. 1958fae3551SRodney W. GrimesExisting bootstrap code is unchanged regardless of whether 1968fae3551SRodney W. Grimes.Fl r 1978fae3551SRodney W. Grimeswas specified. 1988fae3551SRodney W. Grimes.Pp 1998fae3551SRodney W. GrimesWith the 2008fae3551SRodney W. Grimes.Fl R 2018fae3551SRodney W. Grimesflag, 2026bd343a9SPhilippe Charnier.Nm 2038fae3551SRodney W. Grimesis capable of restoring a disk label that was formatted 2048fae3551SRodney W. Grimesin a prior operation and saved in an ascii file. 2058fae3551SRodney W. GrimesThe prototype file used to create the label should be in the same format 2068fae3551SRodney W. Grimesas that produced when reading or editing a label. 2078fae3551SRodney W. GrimesComments are delimited by 2088fae3551SRodney W. Grimes.Ar \&# 2098fae3551SRodney W. Grimesand newline. 2108fae3551SRodney W. GrimesAs with 2118fae3551SRodney W. Grimes.Fl w , 2128fae3551SRodney W. Grimesany existing bootstrap code will be clobbered if 2138fae3551SRodney W. Grimes.Fl r 2148fae3551SRodney W. Grimesis specified and will be unaffected otherwise. 2158fae3551SRodney W. Grimes.Pp 2168fae3551SRodney W. GrimesThe 2178fae3551SRodney W. Grimes.Fl NW 2188fae3551SRodney W. Grimesflags for 2196bd343a9SPhilippe Charnier.Nm 2208fae3551SRodney W. Grimesexplicitly disallow and 2218fae3551SRodney W. Grimesallow, respectively, writing of the pack label area on the selected disk. 2228fae3551SRodney W. Grimes.Pp 2238fae3551SRodney W. GrimesThe final three forms of 2246bd343a9SPhilippe Charnier.Nm 2256bd343a9SPhilippe Charnierare used to install bootstrap code on machines where the bootstrap is part 2268fae3551SRodney W. Grimesof the label. 2278fae3551SRodney W. GrimesThe bootstrap code is comprised of one or two boot programs depending on 2288fae3551SRodney W. Grimesthe machine. 2298fae3551SRodney W. GrimesThe 2308fae3551SRodney W. Grimes.Fl B 2318fae3551SRodney W. Grimesoption is used to denote that bootstrap code is to be installed. 2328fae3551SRodney W. GrimesThe 2338fae3551SRodney W. Grimes.Fl r 2348fae3551SRodney W. Grimesflag is implied by 2358fae3551SRodney W. Grimes.Fl B 2368fae3551SRodney W. Grimesand never needs to be specified. 2378fae3551SRodney W. GrimesThe name of the boot program(s) to be installed can be selected in a 2388fae3551SRodney W. Grimesvariety of ways. 2398fae3551SRodney W. GrimesFirst, the names can be specified explicitly via the 2408fae3551SRodney W. Grimes.Fl b 2418fae3551SRodney W. Grimesand 2428fae3551SRodney W. Grimes.Fl s 2438fae3551SRodney W. Grimesflags. 2448fae3551SRodney W. GrimesOn machines with only a single level of boot program, 2458fae3551SRodney W. Grimes.Fl b 2468fae3551SRodney W. Grimesis the name of that program. 2478fae3551SRodney W. GrimesFor machines with a two-level bootstrap, 2488fae3551SRodney W. Grimes.Fl b 2498fae3551SRodney W. Grimesindicates the primary boot program and 2508fae3551SRodney W. Grimes.Fl s 2518fae3551SRodney W. Grimesthe secondary boot program. 2528fae3551SRodney W. GrimesIf the names are not explicitly given, standard boot programs will be used. 2538fae3551SRodney W. GrimesThe boot programs are located in 2548fae3551SRodney W. Grimes.Pa /usr/mdec . 2558fae3551SRodney W. GrimesThe names of the programs are taken from the ``b0'' and ``b1'' parameters 2568fae3551SRodney W. Grimesof the 2578fae3551SRodney W. Grimes.Xr disktab 5 2588fae3551SRodney W. Grimesentry for the disk if 2598fae3551SRodney W. Grimes.Ar disktype 2608fae3551SRodney W. Grimeswas given and its disktab entry exists and includes those parameters. 2618fae3551SRodney W. GrimesOtherwise, boot program names are derived from the name of the disk. 2628fae3551SRodney W. GrimesThese names are of the form 2638fae3551SRodney W. Grimes.Pa basename Ns boot 2648fae3551SRodney W. Grimesfor the primary (or only) bootstrap, and 2658fae3551SRodney W. Grimes.Pf boot Pa basename 2668fae3551SRodney W. Grimesfor the secondary bootstrap; 2678fae3551SRodney W. Grimesfor example, 2688fae3551SRodney W. Grimes.Pa /usr/mdec/sdboot 2698fae3551SRodney W. Grimesand 2708fae3551SRodney W. Grimes.Pa /usr/mdec/bootsd 2718fae3551SRodney W. Grimesif the disk device is 2728fae3551SRodney W. Grimes.Em sd0 . 2738fae3551SRodney W. Grimes.Pp 2748fae3551SRodney W. GrimesThe first of the three boot-installation forms is used to install 2758fae3551SRodney W. Grimesbootstrap code without changing the existing label. 2768fae3551SRodney W. GrimesIt is essentially a read command with respect to the disk label 2778fae3551SRodney W. Grimesitself and all options are related to the specification of the boot 2788fae3551SRodney W. Grimesprogram as described previously. 2798fae3551SRodney W. GrimesThe final two forms are analogous to the basic write and restore versions 2808fae3551SRodney W. Grimesexcept that they will install bootstrap code in addition to a new label. 2818fae3551SRodney W. Grimes.Sh FILES 2828fae3551SRodney W. Grimes.Bl -tag -width Pa -compact 2838fae3551SRodney W. Grimes.It Pa /etc/disktab 2848fae3551SRodney W. Grimes.It Pa /usr/mdec/ Ns Em xx Ns boot 2858fae3551SRodney W. Grimes.It Pa /usr/mdec/boot Ns Em xx 2868fae3551SRodney W. Grimes.El 2878fae3551SRodney W. Grimes.Sh EXAMPLES 2888fae3551SRodney W. Grimes.Dl disklabel sd0 2898fae3551SRodney W. Grimes.Pp 2908fae3551SRodney W. GrimesDisplay the in-core label for sd0 as obtained via 2918fae3551SRodney W. Grimes.Pa /dev/rsd0c . 2928fae3551SRodney W. Grimes.Pp 2938fae3551SRodney W. Grimes.Dl disklabel -w -r /dev/rsd0c sd2212 foo 2948fae3551SRodney W. Grimes.Pp 2958fae3551SRodney W. GrimesCreate a label for sd0 based on information for ``sd2212'' found in 2968fae3551SRodney W. Grimes.Pa /etc/disktab . 2978fae3551SRodney W. GrimesAny existing bootstrap code will be clobbered. 2988fae3551SRodney W. Grimes.Pp 2998fae3551SRodney W. Grimes.Dl disklabel -e -r sd0 3008fae3551SRodney W. Grimes.Pp 3018fae3551SRodney W. GrimesRead the on-disk label for sd0, edit it and reinstall in-core as well 3028fae3551SRodney W. Grimesas on-disk. 3038fae3551SRodney W. GrimesExisting bootstrap code is unaffected. 3048fae3551SRodney W. Grimes.Pp 305425bed3aSJoerg Wunsch.Dl disklabel -r -w sd0 auto 306425bed3aSJoerg Wunsch.Pp 307425bed3aSJoerg WunschTry to auto-detect the required information from sd0, and write a new 308425bed3aSJoerg Wunschlabel to the disk. Use another disklabel -e command to edit the 309425bed3aSJoerg Wunschpartitioning and file system information. 310425bed3aSJoerg Wunsch.Pp 3118fae3551SRodney W. Grimes.Dl disklabel -R sd0 mylabel 3128fae3551SRodney W. Grimes.Pp 3138fae3551SRodney W. GrimesRestore the on-disk and in-core label for sd0 from information in 3148fae3551SRodney W. Grimes.Pa mylabel . 3158fae3551SRodney W. GrimesExisting bootstrap code is unaffected. 3168fae3551SRodney W. Grimes.Pp 3178fae3551SRodney W. Grimes.Dl disklabel -B sd0 3188fae3551SRodney W. Grimes.Pp 3198fae3551SRodney W. GrimesInstall a new bootstrap on sd0. 3208fae3551SRodney W. GrimesThe boot code comes from 3218fae3551SRodney W. Grimes.Pa /usr/mdec/sdboot 3228fae3551SRodney W. Grimesand possibly 3238fae3551SRodney W. Grimes.Pa /usr/mdec/bootsd . 3248fae3551SRodney W. GrimesOn-disk and in-core labels are unchanged. 3258fae3551SRodney W. Grimes.Pp 3268fae3551SRodney W. Grimes.Dl disklabel -w -B /dev/rsd0c -b newboot sd2212 3278fae3551SRodney W. Grimes.Pp 3288fae3551SRodney W. GrimesInstall a new label and bootstrap. 3298fae3551SRodney W. GrimesThe label is derived from disktab information for ``sd2212'' and 3308fae3551SRodney W. Grimesinstalled both in-core and on-disk. 3318fae3551SRodney W. GrimesThe bootstrap code comes from the file 3328fae3551SRodney W. Grimes.Pa /usr/mdec/newboot . 3338fae3551SRodney W. Grimes.Sh SEE ALSO 334af202156SWolfram Schneider.Xr disklabel 5 , 335af202156SWolfram Schneider.Xr disktab 5 3368fae3551SRodney W. Grimes.Sh DIAGNOSTICS 3378fae3551SRodney W. GrimesThe kernel device drivers will not allow the size of a disk partition 3388fae3551SRodney W. Grimesto be decreased or the offset of a partition to be changed while it is open. 3398fae3551SRodney W. GrimesSome device drivers create a label containing only a single large partition 3408fae3551SRodney W. Grimesif a disk is unlabeled; thus, the label must be written to the ``a'' 3418fae3551SRodney W. Grimespartition of the disk while it is open. 3428fae3551SRodney W. GrimesThis sometimes requires the desired label to be set in two steps, 3438fae3551SRodney W. Grimesthe first one creating at least one other partition, 3448fae3551SRodney W. Grimesand the second setting the label on the new partition 3458fae3551SRodney W. Grimeswhile shrinking the ``a'' partition. 3468fae3551SRodney W. Grimes.Pp 3478fae3551SRodney W. GrimesOn some machines the bootstrap code may not fit entirely in the area 3488fae3551SRodney W. Grimesallocated for it by some filesystems. 3498fae3551SRodney W. GrimesAs a result, it may not be possible to have filesystems on some partitions 3508fae3551SRodney W. Grimesof a ``bootable'' disk. 3518fae3551SRodney W. GrimesWhen installing bootstrap code, 3526bd343a9SPhilippe Charnier.Nm 3538fae3551SRodney W. Grimeschecks for these cases. 3548fae3551SRodney W. GrimesIf the installed boot code would overlap a partition of type FS_UNUSED 3558fae3551SRodney W. Grimesit is marked as type FS_BOOT. 3568fae3551SRodney W. GrimesThe 3578fae3551SRodney W. Grimes.Xr newfs 8 3588fae3551SRodney W. Grimesutility will disallow creation of filesystems on FS_BOOT partitions. 3598fae3551SRodney W. GrimesConversely, if a partition has a type other than FS_UNUSED or FS_BOOT, 3606bd343a9SPhilippe Charnier.Nm 3618fae3551SRodney W. Grimeswill not install bootstrap code that overlaps it. 3628fae3551SRodney W. Grimes.Sh BUGS 3638fae3551SRodney W. GrimesWhen a disk name is given without a full pathname, 3646bd343a9SPhilippe Charnierthe constructed device name uses the ``a'' partition on the Tahoe, 3658fae3551SRodney W. Grimesthe ``c'' partition on all others. 366d70e4e53SJoerg Wunsch.Pp 367d70e4e53SJoerg WunschFor the i386 architecture, the primary bootstrap sector contains 368d70e4e53SJoerg Wunschan embedded 369d70e4e53SJoerg Wunsch.Em fdisk 370d70e4e53SJoerg Wunschtable. 371d70e4e53SJoerg Wunsch.Nm Disklabel 372d70e4e53SJoerg Wunschtakes care to not clobber it when installing a bootstrap only 373d70e4e53SJoerg Wunsch.Pq Fl B , 374d70e4e53SJoerg Wunschor when editing an existing label 375d70e4e53SJoerg Wunsch.Pq Fl e , 376d70e4e53SJoerg Wunschbut it unconditionally writes the primary bootstrap program onto 377d70e4e53SJoerg Wunschthe disk for 378d70e4e53SJoerg Wunsch.Fl w 379d70e4e53SJoerg Wunschor 380d70e4e53SJoerg Wunsch.Fl R , 381d70e4e53SJoerg Wunschthus replacing the 382d70e4e53SJoerg Wunsch.Em fdisk 383d70e4e53SJoerg Wunschtable by the dummy one in the bootstrap program. This is only of 384d70e4e53SJoerg Wunschconcern if the disk is fully dedicated, so that the BSD disklabel 385d70e4e53SJoerg Wunschstarts at absolute block 0 on the disk. 386