[Midnightbsd-cvs] src: bsdlabel.8: update man page
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Nov 20 14:45:42 EST 2008
Log Message:
-----------
update man page
Modified Files:
--------------
src/sbin/bsdlabel:
bsdlabel.8 (r1.3 -> r1.4)
-------------- next part --------------
Index: bsdlabel.8
===================================================================
RCS file: /home/cvs/src/sbin/bsdlabel/bsdlabel.8,v
retrieving revision 1.3
retrieving revision 1.4
diff -L sbin/bsdlabel/bsdlabel.8 -L sbin/bsdlabel/bsdlabel.8 -u -r1.3 -r1.4
--- sbin/bsdlabel/bsdlabel.8
+++ sbin/bsdlabel/bsdlabel.8
@@ -29,15 +29,15 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)disklabel.8 8.2 (Berkeley) 4/19/94
-.\" $FreeBSD: src/sbin/bsdlabel/bsdlabel.8,v 1.60.2.1 2005/09/20 00:34:54 rodrigc Exp $
+.\" $FreeBSD: src/sbin/bsdlabel/bsdlabel.8,v 1.68.4.1 2008/02/14 21:46:19 remko Exp $
.\" $MidnightBSD$
.\"
-.Dd March 15, 2003
+.Dd December 8, 2007
.Dt BSDLABEL 8
.Os
.Sh NAME
.Nm bsdlabel
-.Nd read and write disk pack label
+.Nd read and write BSD label
.Sh SYNOPSIS
.Nm
.Op Fl A
@@ -110,19 +110,14 @@
.Nm
to use a layout suitable for a different architecture.
Current valid values are
-.Ar i386 ,
-.Ar amd64 ,
-.Ar ia64 ,
-.Ar pc98 ,
+.Cm i386 , amd64 , ia64 , pc98 ,
and
-.Ar alpha .
+.Cm alpha .
If this option is omitted,
.Nm
will use a layout suitable for the current machine.
.Ss Reading the Disk Label
-To examine the label on a disk drive, use
-.Nm
-without options:
+To examine the label on a disk drive, use the form
.Pp
.Nm
.Op Fl A
@@ -145,9 +140,12 @@
.Ar disk
.Op Ar type
.Pp
-If the drive type is specified, the entry of that name in the
+If the drive
+.Ar type
+is specified, the entry of that name in the
.Xr disktab 5
-file is used; otherwise a default layout is used.
+file is used; otherwise, or if the type is specified as 'auto', a default
+layout is used.
.Ss Editing an Existing Disk Label
To edit an existing disk label, use the form
.Pp
@@ -168,7 +166,9 @@
.Op Fl m Ar machine
.Ar disk protofile
.Pp
+The
.Nm
+utility
is capable of restoring a disk label that was previously saved in a file in
.Tn ASCII
format.
@@ -180,12 +180,12 @@
.Ss Installing Bootstraps
If the
.Fl B
-argument is specified, bootstrap code will be read from the file
+option is specified, bootstrap code will be read from the file
.Pa /boot/boot
and written to the disk.
The
.Fl b Ar boot
-argument allows a different file to be used.
+option allows a different file to be used.
.Sh FILES
.Bl -tag -width ".Pa /etc/disktab" -compact
.It Pa /boot/boot
@@ -206,8 +206,8 @@
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
- a: 81920 16 4.2BSD 1024 8192 16
- b: 160000 81936 swap
+ a: 81920 16 4.2BSD 2048 16384 5128
+ b: 1091994 81936 swap
c: 1173930 0 unused 0 0 # "raw" part, don't edit
.Ed
.Pp
@@ -279,12 +279,12 @@
a size of
.Cm *
indicates the entire disk.
-Lowercase versions of
+Lowercase versions of suffixes
.Cm K , M ,
and
.Cm G
are allowed.
-Size and type should be specified without any spaces between them.
+Size and suffix should be specified without any spaces between them.
.Pp
Example: 2097152, 1G, 1024M and 1048576K are all the same size
(assuming 512-byte sectors).
@@ -296,15 +296,16 @@
.Nm
calculate the correct offset to use (the end of the previous partition plus
one, ignoring partition
-.Ql c .
+.Ql c ) .
For partition
.Ql c ,
.Cm *
will be interpreted as an offset of 0.
-The first partition should start at offset 16, because the first 16 sectors are reserved for metadata.
+The first partition should start at offset 16, because the first 16 sectors are
+reserved for metadata.
.It Ar fstype
Describes the purpose of the partition.
-The example shows all currently used partition types.
+The above example shows all currently used partition types.
For
.Tn UFS
file systems and
@@ -337,38 +338,26 @@
.It Ar fsize
For
.Cm 4.2BSD
-and
-.Tn LFS
-file systems only, the fragment size.
-Defaults to 1024 for partitions smaller than 1GB,
-4096 for partitions 1GB or larger.
+file systems only, the fragment size; see
+.Xr newfs 8 .
.It Ar bsize
For
.Cm 4.2BSD
-and
-.Tn LFS
-file systems only, the block size.
-Defaults to 8192 for partitions smaller than 1GB,
-16384 for partitions 1GB or larger.
+file systems only, the block size; see
+.Xr newfs 8 .
.It Ar bps/cpg
For
.Cm 4.2BSD
-file systems, the number of cylinders in a cylinder group.
-For
-.Tn LFS
-file systems, the segment shift value.
-Defaults to 16 for partitions smaller than 1GB,
-64 for partitions 1GB or larger.
+file systems, the number of cylinders in a cylinder group; see
+.Xr newfs 8 .
.El
.Sh EXAMPLES
-.Dl "bsdlabel da0s1"
-.Pp
Display the label for the first slice of the
.Pa da0
disk, as obtained via
-.Pa /dev/da0s1 .
+.Pa /dev/da0s1 :
.Pp
-.Dl "bsdlabel da0s1 > savedlabel"
+.Dl "bsdlabel da0s1"
.Pp
Save the in-core label for
.Pa da0s1
@@ -376,45 +365,45 @@
.Pa savedlabel .
This file can be used with the
.Fl R
-option to restore the label at a later date.
+option to restore the label at a later date:
.Pp
-.Dl "bsdlabel -w /dev/da0s1"
+.Dl "bsdlabel da0s1 > savedlabel"
.Pp
Create a label for
-.Pa da0s1 .
+.Pa da0s1 :
.Pp
-.Dl "bsdlabel -e da0s1"
+.Dl "bsdlabel -w /dev/da0s1"
.Pp
Read the label for
.Pa da0s1 ,
-edit it, and install the result.
+edit it, and install the result:
.Pp
-.Dl "bsdlabel -e -n da0s1"
+.Dl "bsdlabel -e da0s1"
.Pp
Read the on-disk label for
.Pa da0s1 ,
edit it, and display what the new label would be (in sectors).
It does
.Em not
-install the new label either in-core or on-disk.
+install the new label either in-core or on-disk:
.Pp
-.Dl "bsdlabel -w da0s1"
+.Dl "bsdlabel -e -n da0s1"
.Pp
Write a default label on
.Pa da0s1 .
Use another
.Nm Fl e
command to edit the
-partitioning and file system information.
+partitioning and file system information:
.Pp
-.Dl "bsdlabel -R da0s1 savedlabel"
+.Dl "bsdlabel -w da0s1"
.Pp
Restore the on-disk and in-core label for
.Pa da0s1
from information in
-.Pa savedlabel .
+.Pa savedlabel :
.Pp
-.Dl "bsdlabel -R -n da0s1 label_layout"
+.Dl "bsdlabel -R da0s1 savedlabel"
.Pp
Display what the label would be for
.Pa da0s1
@@ -425,28 +414,23 @@
.Cm % Ns -based
or
.Cm *
-partition sizes.
+partition sizes:
.Pp
-.Dl "bsdlabel -B da0s1"
+.Dl "bsdlabel -R -n da0s1 label_layout"
.Pp
Install a new bootstrap on
.Pa da0s1 .
The boot code comes from
-.Pa /boot/boot .
+.Pa /boot/boot :
.Pp
-.Dl "bsdlabel -w -B -b newboot /dev/da0s1"
+.Dl "bsdlabel -B da0s1"
.Pp
Install a new label and bootstrap.
The bootstrap code comes from the file
.Pa newboot
-in the current working directory.
-.Bd -literal -offset indent
-dd if=/dev/zero of=/dev/da0 bs=512 count=32
-fdisk -BI da0
-dd if=/dev/zero of=/dev/da0s1 bs=512 count=32
-bsdlabel -w -B da0s1
-bsdlabel -e da0s1
-.Ed
+in the current working directory:
+.Pp
+.Dl "bsdlabel -w -B -b newboot /dev/da0s1"
.Pp
Completely wipe any prior information on the disk, creating a new bootable
disk with a
@@ -459,7 +443,14 @@
commands are optional, but may be necessary for some
.Tn BIOS Ns es
to properly
-recognize the disk.
+recognize the disk:
+.Bd -literal -offset indent
+dd if=/dev/zero of=/dev/da0 bs=512 count=32
+fdisk -BI da0
+dd if=/dev/zero of=/dev/da0s1 bs=512 count=32
+bsdlabel -w -B da0s1
+bsdlabel -e da0s1
+.Ed
.Pp
This is an example disk label that uses some of the new partition size types
such as
@@ -467,13 +458,13 @@
and
.Cm * ,
which could be used as a source file for
-.Dq Li "bsdlabel -R ad0s1c new_label_file" :
+.Dq Li "bsdlabel -R ad0s1 new_label_file" :
.Bd -literal -offset 4n
-# /dev/ad0s1c:
+# /dev/ad0s1:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
- a: 400M 16 4.2BSD 4096 16384 75 # (Cyl. 0 - 812*)
+ a: 400M 16 4.2BSD 4096 16384 75 # (Cyl. 0 - 812*)
b: 1G * swap
c: * * unused
e: 204800 * 4.2BSD
@@ -507,4 +498,5 @@
.Xr disktab 5 ,
.Xr boot0cfg 8 ,
.Xr fdisk 8 ,
-.Xr gpt 8
+.Xr gpt 8 ,
+.Xr newfs 8
More information about the Midnightbsd-cvs
mailing list