From: Thomas Nikolajsen Date: Thu, 18 Feb 2010 22:57:03 +0000 (+0100) Subject: disklabel[32,64](8): Adjust for recent change of default disklabel program X-Git-Url: https://gitweb.dragonflybsd.org/~syl/dragonfly.git/commitdiff_plain/c61a095d5201fed6fe2631292ba674e18615f381 disklabel[32,64](8): Adjust for recent change of default disklabel program --- diff --git a/sbin/disklabel32/disklabel.c b/sbin/disklabel32/disklabel.c index 5c51819c16..3ae4c31484 100644 --- a/sbin/disklabel32/disklabel.c +++ b/sbin/disklabel32/disklabel.c @@ -70,7 +70,7 @@ #include "pathnames.h" /* - * Disklabel: read and write disklabels. + * Disklabel32: read and write 32 bit disklabels. * The label is usually placed on one of the first sectors of the disk. * Many machines also place a bootstrap in the same area, * in which case the label is embedded in the bootstrap. @@ -1778,45 +1778,45 @@ usage(void) { #if NUMBOOT > 0 fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", - "usage: disklabel [-r] disk", + "usage: disklabel32 [-r] disk", "\t\t(to read label)", - " disklabel -w [-r] [-n] disk type [packid]", + " disklabel32 -w [-r] [-n] disk type [packid]", "\t\t(to write label with existing boot program)", - " disklabel -e [-r] [-n] disk", + " disklabel32 -e [-r] [-n] disk", "\t\t(to edit label)", - " disklabel -R [-r] [-n] disk protofile", + " disklabel32 -R [-r] [-n] disk protofile", "\t\t(to restore label with existing boot program)", #if NUMBOOT > 1 - " disklabel -B [-n] [-b boot1 -s boot2] disk [type]", + " disklabel32 -B [-n] [-b boot1 -s boot2] disk [type]", "\t\t(to install boot program with existing label)", - " disklabel -w -B [-n] [-b boot1 -s boot2] disk type [packid]", + " disklabel32 -w -B [-n] [-b boot1 -s boot2] disk type [packid]", "\t\t(to write label and boot program)", - " disklabel -R -B [-n] [-b boot1 -s boot2] disk protofile [type]", + " disklabel32 -R -B [-n] [-b boot1 -s boot2] disk protofile [type]", "\t\t(to restore label and boot program)", #else - " disklabel -B [-n] [-b bootprog] disk [type]", + " disklabel32 -B [-n] [-b bootprog] disk [type]", "\t\t(to install boot program with existing on-disk label)", - " disklabel -w -B [-n] [-b bootprog] disk type [packid]", + " disklabel32 -w -B [-n] [-b bootprog] disk type [packid]", "\t\t(to write label and install boot program)", - " disklabel -R -B [-n] [-b bootprog] disk protofile [type]", + " disklabel32 -R -B [-n] [-b bootprog] disk protofile [type]", "\t\t(to restore label and install boot program)", #endif - " disklabel [-NW] disk", + " disklabel32 [-NW] disk", "\t\t(to write disable/enable label)"); #else fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", - "usage: disklabel [-r] disk", "(to read label)", - " disklabel -w [-r] [-n] disk type [packid]", + "usage: disklabel32 [-r] disk", "(to read label)", + " disklabel32 -w [-r] [-n] disk type [packid]", "\t\t(to write label)", - " disklabel -e [-r] [-n] disk", + " disklabel32 -e [-r] [-n] disk", "\t\t(to edit label)", - " disklabel -R [-r] [-n] disk protofile", + " disklabel32 -R [-r] [-n] disk protofile", "\t\t(to restore label)", - " disklabel [-NW] disk", + " disklabel32 [-NW] disk", "\t\t(to write disable/enable label)"); #endif fprintf(stderr, "%s\n%s\n", - " disklabel [-f slice_start_lba] [options]", + " disklabel32 [-f slice_start_lba] [options]", "\t\t(to force using manual offset)"); exit(1); } diff --git a/sbin/disklabel32/disklabel32.5 b/sbin/disklabel32/disklabel32.5 index aa3321104a..c0d14ab52e 100644 --- a/sbin/disklabel32/disklabel32.5 +++ b/sbin/disklabel32/disklabel32.5 @@ -37,10 +37,10 @@ .\" $DragonFly: src/sbin/disklabel/disklabel.5,v 1.6 2008/08/21 21:08:08 thomas Exp $ .\" .Dd August 21, 2008 -.Dt DISKLABEL 5 +.Dt DISKLABEL32 5 .Os .Sh NAME -.Nm disklabel +.Nm disklabel32 .Nd 32 bit disk pack label .Sh SYNOPSIS .In sys/disklabel.h @@ -51,7 +51,7 @@ about the geometry of the disk and the partitions into which the disk is divided. It should be initialized when the disk is formatted, and may be changed later with the -.Xr disklabel 8 +.Xr disklabel32 8 program. This information is used by the system disk driver and by the bootstrap program to determine how to program the drive @@ -77,7 +77,7 @@ the .Dv DIOCWLABEL .Xr ioctl 2 , which is done as needed by the -.Xr disklabel 8 +.Xr disklabel32 8 program. .Pp A copy of the in-core label for a disk can be obtained with the @@ -101,11 +101,11 @@ there must be an existing label on the disk for this operation to succeed. Thus, the initial label for a disk or disk pack must be installed by writing to the raw disk. All of these operations are normally done using -.Xr disklabel 8 . +.Xr disklabel32 8 . .Pp The format of the disk label is specified in .In sys/disklabel32.h . .Sh SEE ALSO .Xr disklabel64 5 , .Xr disktab 5 , -.Xr disklabel 8 +.Xr disklabel32 8 diff --git a/sbin/disklabel32/disklabel32.8 b/sbin/disklabel32/disklabel32.8 index 36a20ed742..f4ba73309d 100644 --- a/sbin/disklabel32/disklabel32.8 +++ b/sbin/disklabel32/disklabel32.8 @@ -37,10 +37,10 @@ .\" $DragonFly: src/sbin/disklabel/disklabel.8,v 1.30 2008/09/16 20:45:36 thomas Exp $ .\" .Dd September 28, 2009 -.Dt DISKLABEL 8 +.Dt DISKLABEL32 8 .Os .Sh NAME -.Nm disklabel +.Nm disklabel32 .Nd read and write 32 bit disk pack label .Sh SYNOPSIS .Nm @@ -559,15 +559,15 @@ If you are tight on space all sizes can be halved. Your mileage may vary. .Pp .Dl "fdisk -BI da0" -.Dl "disklabel -w -B da0s1 auto" -.Dl "disklabel -e da0s1" +.Dl "disklabel32 -w -B da0s1 auto" +.Dl "disklabel32 -e da0s1" .Ss Manual offset .Dx no longer snoop-adjusts the on-disk label when reading or writing raw labels. .Nm is now responsible for adjusting the label when operating in raw mode. -Traditional (32 bit +Traditional (32 bit, .Bx ) disklabels store offsets as absolute block numbers rather than slice-relative block numbers. @@ -764,7 +764,7 @@ for more details). The remainder of the line is a comment and shows the size of the partition in MB. .Sh EXAMPLES -.Dl "disklabel da0s1" +.Dl "disklabel32 da0s1" .Pp Display the in-core label for the first slice of the .Pa da0 @@ -775,7 +775,7 @@ disk, as obtained via the compatibility slice name should be specified, such as .Pa da0s0 . ) .Pp -.Dl "disklabel da0s1 > savedlabel" +.Dl "disklabel32 da0s1 > savedlabel" .Pp Save the in-core label for .Pa da0s1 @@ -785,7 +785,7 @@ This file can be used with the .Fl R option to restore the label at a later date. .Pp -.Dl "disklabel -w -r /dev/da0s1 da2212 foo" +.Dl "disklabel32 -w -r /dev/da0s1 da2212 foo" .Pp Create a label for .Pa da0s1 @@ -796,14 +796,14 @@ found in Any existing bootstrap code will be clobbered and the disk rendered unbootable. .Pp -.Dl "disklabel -e -r da0s1" +.Dl "disklabel32 -e -r da0s1" .Pp Read the on-disk label for .Pa da0s1 , edit it, and reinstall in-core as well as on-disk. Existing bootstrap code is unaffected. .Pp -.Dl "disklabel -e -r -n da0s1" +.Dl "disklabel32 -e -r -n da0s1" .Pp Read the on-disk label for .Pa da0s1 , @@ -812,7 +812,7 @@ It does .Em not install the new label either in-core or on-disk. .Pp -.Dl "disklabel -r -w da0s1 auto" +.Dl "disklabel32 -r -w da0s1 auto" .Pp Try to auto-detect the required information from .Pa da0s1 , @@ -822,7 +822,7 @@ Use another command to edit the partitioning and file system information. .Pp -.Dl "disklabel -R da0s1 savedlabel" +.Dl "disklabel32 -R da0s1 savedlabel" .Pp Restore the on-disk and in-core label for .Pa da0s1 @@ -830,7 +830,7 @@ from information in .Pa savedlabel . Existing bootstrap code is unaffected. .Pp -.Dl "disklabel -R -n da0s1 label_layout" +.Dl "disklabel32 -R -n da0s1 label_layout" .Pp Display what the label would be for .Pa da0s1 @@ -843,7 +843,7 @@ or .Cm * partition sizes. .Pp -.Dl "disklabel -B da0s1" +.Dl "disklabel32 -B da0s1" .Pp Install a new bootstrap on .Pa da0s1 . @@ -853,7 +853,7 @@ and possibly .Pa /boot/boot2 . On-disk and in-core labels are unchanged. .Pp -.Dl "disklabel -w -B /dev/da0s1 -b newboot1 -s newboot2 da2212" +.Dl "disklabel32 -w -B /dev/da0s1 -b newboot1 -s newboot2 da2212" .Pp Install a new label and bootstrap. The label is derived from disktab information for @@ -867,8 +867,8 @@ and .Dl "dd if=/dev/zero of=/dev/da0 bs=512 count=32" .Dl "fdisk -BI da0" .Dl "dd if=/dev/zero of=/dev/da0s1 bs=512 count=32" -.Dl "disklabel -w -B da0s1 auto" -.Dl "disklabel -e da0s1" +.Dl "disklabel32 -w -B da0s1 auto" +.Dl "disklabel32 -e da0s1" .Pp Completely wipe any prior information on the disk, creating a new bootable disk with a DOS partition table containing one @@ -881,7 +881,7 @@ The commands are optional, but may be necessary for some BIOSes to properly recognize the disk. .Pp -.Dl "disklabel -W da0s1" +.Dl "disklabel32 -W da0s1" .Dl "dd if=/dev/zero of=/dev/da0s1 bs=512 count=32" .Dl "disklabel64 -r -w da0s1 auto" .Dl "disklabel64 -N da0s1" @@ -902,7 +902,7 @@ and .Cm * , which could be used as a source file for .Pp -.Dl "disklabel -R ad0s1 new_label_file" +.Dl "disklabel32 -R ad0s1 new_label_file" .Bd -literal -offset 4n # /dev/ad0s1: type: ESDI @@ -972,7 +972,7 @@ or will not install bootstrap code that overlaps it. .Sh COMPATIBILITY Due to -.Xr disklabel 5 +.Xr disklabel32 5 storing sector numbers in 32 bit format .Nm is restricted to 2TB, using the prevalent sector size of 512B. @@ -993,7 +993,7 @@ for read-only operation. .Sh SEE ALSO .Xr dd 1 , .Xr ccd 4 , -.Xr disklabel 5 , +.Xr disklabel32 5 , .Xr disktab 5 , .Xr boot0cfg 8 , .Xr diskinfo 8 , diff --git a/sbin/disklabel64/disklabel64.5 b/sbin/disklabel64/disklabel64.5 index 089889f771..e87e498664 100644 --- a/sbin/disklabel64/disklabel64.5 +++ b/sbin/disklabel64/disklabel64.5 @@ -102,6 +102,6 @@ All of these operations are normally done using The format of the 64 bit disk label is specified in .In sys/disklabel64.h . .Sh SEE ALSO -.Xr disklabel 5 , +.Xr disklabel32 5 , .Xr disktab 5 , .Xr disklabel64 8 diff --git a/sbin/disklabel64/disklabel64.8 b/sbin/disklabel64/disklabel64.8 index 234b9761d6..d70be30d12 100644 --- a/sbin/disklabel64/disklabel64.8 +++ b/sbin/disklabel64/disklabel64.8 @@ -518,7 +518,7 @@ in Use .Nm or -.Xr disklabel 8 +.Xr disklabel32 8 to define partitions on .Dx slices created in the previous step. @@ -927,7 +927,7 @@ partition. .Xr disktab 5 , .Xr boot0cfg 8 , .Xr diskinfo 8 , -.Xr disklabel 8 , +.Xr disklabel32 8 , .Xr fdisk 8 , .Xr gpt 8 , .Xr newfs 8 , diff --git a/sbin/disklabel64/disklabel64.c b/sbin/disklabel64/disklabel64.c index aa97189a13..015964929a 100644 --- a/sbin/disklabel64/disklabel64.c +++ b/sbin/disklabel64/disklabel64.c @@ -107,7 +107,7 @@ extern uint32_t crc32(const void *buf, size_t size); /* - * Disklabel: read and write disklabels. + * Disklabel64: read and write 64 bit disklabels. * The label is usually placed on one of the first sectors of the disk. * Many machines also place a bootstrap in the same area, * in which case the label is embedded in the bootstrap.