summaryrefslogtreecommitdiffstats
path: root/sbin/bsdlabel/bsdlabel.8
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/bsdlabel/bsdlabel.8')
-rw-r--r--sbin/bsdlabel/bsdlabel.821
1 files changed, 21 insertions, 0 deletions
diff --git a/sbin/bsdlabel/bsdlabel.8 b/sbin/bsdlabel/bsdlabel.8
index bf14e0f..1cc33ab 100644
--- a/sbin/bsdlabel/bsdlabel.8
+++ b/sbin/bsdlabel/bsdlabel.8
@@ -161,6 +161,21 @@ If the disk does not already have a label, the
flag must be used.
In either case, the kernel's in-core label is replaced.
.Pp
+For a virgin disk that is not known to
+.Xr disktab 5 ,
+.Ar disktype
+can be specified as
+.Dq auto .
+In this case, the driver is requested to produce a virgin label for the
+disk. This might or might not be successful, depending on whether the
+driver for the disk is able to get the required data without reading
+anything from the disk at all. It will likely succeed for all SCSI
+disks, most IDE disks, and vnode devices. Writing a label to the
+disk is the only supported operation, and the
+.Ar disk
+itself must be provided as the canonical name, i.e. not as a full
+path name.
+.Pp
An existing disk label may be edited by using the
.Fl e
flag.
@@ -286,6 +301,12 @@ Read the on-disk label for sd0, edit it and reinstall in-core as well
as on-disk.
Existing bootstrap code is unaffected.
.Pp
+.Dl disklabel -r -w sd0 auto
+.Pp
+Try to auto-detect the required information from sd0, and write a new
+label to the disk. Use another disklabel -e command to edit the
+partitioning and file system information.
+.Pp
.Dl disklabel -R sd0 mylabel
.Pp
Restore the on-disk and in-core label for sd0 from information in
OpenPOWER on IntegriCloud