Subject: port-i386/487: inaccuracies in sbin/disklabel/disklabel.8
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: John Kohl <jtk@kolvir.blrc.ma.us>
List: netbsd-bugs
Date: 09/18/1994 16:35:03
>Number: 487
>Category: port-i386
>Synopsis: disklabel.8 needs more examples, and is also inaccurate
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Sun Sep 18 16:35:02 1994
>Originator: John Kohl
>Organization:
>Release:
>Environment:
System: NetBSD kolvir 1.0_BETA NetBSD 1.0_BETA (KOLVIR) #16: Thu Sep 15 22:03:20 EDT 1994 jtk@kolvir:/u1/NetBSD-1.0/src/sys/arch/i386/compile/KOLVIR i386
>Description:
The disklabel(8) man page is inaccurate in one respect, and could use
more examples/descriptions. See below.
>How-To-Repeat:
Try to label a blank disk.
>Fix:
*** 1.1 1994/09/18 22:45:10
--- sbin/disklabel/disklabel.8 1994/09/18 23:08:17
***************
*** 277,284 ****
.Dl disklabel -w -r /dev/rsd0c sd2212 foo
.Pp
Create a label for sd0 based on information for ``sd2212'' found in
! .Pa /etc/disktab .
! Any existing bootstrap code will be clobbered.
.Pp
.Dl disklabel -e -r sd0
.Pp
--- 277,296 ----
.Dl disklabel -w -r /dev/rsd0c sd2212 foo
.Pp
Create a label for sd0 based on information for ``sd2212'' found in
! .Pa /etc/disktab ,
! using
! .Pa foo
! as the disk pack label.
! Any existing bootstrap code will be clobbered. If you do not have an
! entry for your disk in
! .Pa /etc/disktab ,
! you can use this style to put
! an initial label onto a new disk. Thendump the label to a file (using
! .Em disklabel sd0 > protofile
! ),
! editing the file, and replacing the label with
! .Em disklabel -R sd0
! .Em protofile .
.Pp
.Dl disklabel -e -r sd0
.Pp
***************
*** 308,313 ****
--- 320,335 ----
installed both in-core and on-disk.
The bootstrap code comes from the file
.Pa /usr/mdec/newboot .
+ .Pp
+ .Dl disklabel -R -r sd0 <protofile>
+ .Pp
+ Install a new label and bootstrap on a disk, from a prototype label
+ file. This is a good way to install a label on a previously unlabeled
+ disk for which no entry appears in
+ .Pa /etc/disktab ,
+ if you create the
+ prototype file by dumping some other disk's label to a file and editing
+ it appropriately (total size, partition offsets, types, etc.)
.Sh SEE ALSO
.Xr disktab 5 ,
.Xr disklabel 5
***************
*** 340,343 ****
.Sh BUGS
When a disk name is given without a full pathname,
the constructed device name uses the ``a'' partition on the tahoe,
! the ``c'' partition on all others.
--- 362,366 ----
.Sh BUGS
When a disk name is given without a full pathname,
the constructed device name uses the ``a'' partition on the tahoe,
! the ``d'' partition on the i386 or its successors, and the ``c''
! partition on all others.
>Audit-Trail:
>Unformatted: