Deleted Added
full compact
bsdlabel.8 (91993) bsdlabel.8 (94803)
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

--- 19 unchanged lines hidden (view full) ---

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
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

--- 19 unchanged lines hidden (view full) ---

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: head/sbin/bsdlabel/bsdlabel.8 91993 2002-03-10 09:10:06Z dd $
36.\" $FreeBSD: head/sbin/bsdlabel/bsdlabel.8 94803 2002-04-15 22:24:34Z trhodes $
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

--- 54 unchanged lines hidden (view full) ---

99the label, it can be used to change the drive identification, the disk
100partitions on the drive, or to replace a damaged label. There are several forms
101of the command that read (display), install or edit the label on a disk. In
102addition,
103.Nm
104can install bootstrap code.
105.Ss Raw or in-core label
106.Pp
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

--- 54 unchanged lines hidden (view full) ---

99the label, it can be used to change the drive identification, the disk
100partitions on the drive, or to replace a damaged label. There are several forms
101of the command that read (display), install or edit the label on a disk. In
102addition,
103.Nm
104can install bootstrap code.
105.Ss Raw or in-core label
106.Pp
107The disk label is resident close to or at the beginning of each disk partition.
107The disk label resides close to or at the beginning of each disk slice.
108For faster access, the kernel maintains a copy in core at all times. By
109default, most
110.Nm
111access the in-core copy of the label. To access the raw (on-disk) copy, use the
112.Fl r
113option. This option allows a label to be installed on a disk without kernel
114support for a label, such as when labels are first installed on a system; it
115must be used when first installing a label on a disk. The specific effect of
116.Fl r
117is described under each command.
118.Pp
119.Ss Disk device name
120.Pp
121All
122.Nm
123forms require a disk device name, which should always be the raw
124device name representing the disk or slice. For example
125.Pa da0
108For faster access, the kernel maintains a copy in core at all times. By
109default, most
110.Nm
111access the in-core copy of the label. To access the raw (on-disk) copy, use the
112.Fl r
113option. This option allows a label to be installed on a disk without kernel
114support for a label, such as when labels are first installed on a system; it
115must be used when first installing a label on a disk. The specific effect of
116.Fl r
117is described under each command.
118.Pp
119.Ss Disk device name
120.Pp
121All
122.Nm
123forms require a disk device name, which should always be the raw
124device name representing the disk or slice. For example
125.Pa da0
126represents the entire disk irregardless of any DOS partitioning,
126represents the entire disk regardless of any DOS partitioning,
127and
128.Pa da0s1
129represents a slice. Some devices, most notably
130.Ar ccd ,
131require that the
132.Dq whole-disk
133(or
134.Dq c )

--- 105 unchanged lines hidden (view full) ---

240will produce a reasonable configuration.
241.Pp
242PC-based systems have special requirements in order for the BIOS to properly
243recognize a
244.Fx
245disklabel. Older systems may require what is known as a
246.Dq dangerously dedicated
247disklabel, which creates a fake DOS partition to work around problems older
127and
128.Pa da0s1
129represents a slice. Some devices, most notably
130.Ar ccd ,
131require that the
132.Dq whole-disk
133(or
134.Dq c )

--- 105 unchanged lines hidden (view full) ---

240will produce a reasonable configuration.
241.Pp
242PC-based systems have special requirements in order for the BIOS to properly
243recognize a
244.Fx
245disklabel. Older systems may require what is known as a
246.Dq dangerously dedicated
247disklabel, which creates a fake DOS partition to work around problems older
248BIOSes have with modern disk geometries. On newer systems you generally want
249to create a normal DOS slice using
248BIOSes have with modern disk geometries.
249On newer systems you generally want
250to create a normal DOS partition using
250.Ar fdisk
251and then create a
252.Fx
253disklabel within that slice. This is described
254later on in this page.
255.Pp
256Installing a new disklabel does not in of itself allow your system to boot
257a kernel using that label. You must also install boot blocks, which is

--- 66 unchanged lines hidden (view full) ---

324.Fl N
325.Ar disk
326.Ss Installing bootstraps
327.Pp
328The final three forms of
329.Nm
330are used to install bootstrap code. If you are creating a
331.Dq dangerously-dedicated
251.Ar fdisk
252and then create a
253.Fx
254disklabel within that slice. This is described
255later on in this page.
256.Pp
257Installing a new disklabel does not in of itself allow your system to boot
258a kernel using that label. You must also install boot blocks, which is

--- 66 unchanged lines hidden (view full) ---

325.Fl N
326.Ar disk
327.Ss Installing bootstraps
328.Pp
329The final three forms of
330.Nm
331are used to install bootstrap code. If you are creating a
332.Dq dangerously-dedicated
332partition for compatibility with older PC systems,
333slice for compatibility with older PC systems,
333you generally want to specify the raw disk name such as
334.Pa da0 .
334you generally want to specify the raw disk name such as
335.Pa da0 .
335If you are creating a label within an existing DOS slice, you should specify
336the slice name such as
337.Pa da0s1 .
338Making a partition bootable can be tricky. If you are using a normal DOS
336If you are creating a label within an existing DOS slice,
337you should specify
338the partition name such as
339.Pa da0s1a .
340Making a slice bootable can be tricky. If you are using a normal DOS
339slice you typically install (or leave) a standard MBR on the base disk and
340then install the
341.Fx
342bootblocks in the slice.
343.Pp
344.Nm
345.Fl B
346.Oo

--- 102 unchanged lines hidden (view full) ---

449To initialize a disk from scratch the following sequence is recommended.
450Please note that this will wipe everything that was previously on the disk,
451including any
452.No non- Ns Fx
453slices.
454.Bl -enum
455.It
456Use
341slice you typically install (or leave) a standard MBR on the base disk and
342then install the
343.Fx
344bootblocks in the slice.
345.Pp
346.Nm
347.Fl B
348.Oo

--- 102 unchanged lines hidden (view full) ---

451To initialize a disk from scratch the following sequence is recommended.
452Please note that this will wipe everything that was previously on the disk,
453including any
454.No non- Ns Fx
455slices.
456.Bl -enum
457.It
458Use
457.Ar fdisk
458to initialize the DOS partition table, creating a real whole-disk slice to
459hold the
460.Fx
461disklabel, and installing a master boot record.
459.Xr fdisk 8
460to initialize the hard disk, and create a slice table, referred to
461as the partition table in DOS.
462Here you will define disk slices for your system.
462.It
463Use
463.It
464Use
464.Ar disklabel
465to initialize a virgin
466.Fx
467disklabel and install
468.Fx
469boot blocks.
465.Xr disklabel 8
466to define and write partitions and mount points.
467You are not required to define the mount points here though,
468they can be defined later using
469.Xr mount 8 .
470.It
470.It
471Use
472.Ar disklabel
473to edit your newly created label, adding appropriate partitions.
474.It
475Finally newfs the filesystem partitions you created in the label. A typical
476disklabel partitioning scheme would be to have an
471Finally use
472.Xr newfs 8
473to create a filesystem on the new partition.
474A typical partitioning scheme would be to have an
477.Dq a
478partition
479of approximately 128MB to hold the root filesystem, a
480.Dq b
481partition for
482swap, a
483.Dq d
484partition for /var (usually 128MB), an

--- 272 unchanged lines hidden (view full) ---

757Install a new bootstrap on
758.Pa da0s1 .
759The boot code comes from
760.Pa /boot/boot1
761and possibly
762.Pa /boot/boot2 .
763On-disk and in-core labels are unchanged.
764.Pp
475.Dq a
476partition
477of approximately 128MB to hold the root filesystem, a
478.Dq b
479partition for
480swap, a
481.Dq d
482partition for /var (usually 128MB), an

--- 272 unchanged lines hidden (view full) ---

755Install a new bootstrap on
756.Pa da0s1 .
757The boot code comes from
758.Pa /boot/boot1
759and possibly
760.Pa /boot/boot2 .
761On-disk and in-core labels are unchanged.
762.Pp
765.Dl disklabel -w -B /dev/da0s1 -b newboot1 -s newboot da2212
763.Dl disklabel -w -B /dev/da0s1 -b newboot1 -s newboot2 da2212
766.Pp
767Install a new label and bootstrap.
768The label is derived from disktab information for
769.Dq da2212
770and installed both in-core and on-disk.
771The bootstrap code comes from the files
772.Pa /boot/newboot1
773and

--- 126 unchanged lines hidden ---
764.Pp
765Install a new label and bootstrap.
766The label is derived from disktab information for
767.Dq da2212
768and installed both in-core and on-disk.
769The bootstrap code comes from the files
770.Pa /boot/newboot1
771and

--- 126 unchanged lines hidden ---