Project

General

Profile

Bug #762 » disklabel64.8.patch

thomas.nikolajsen, 08/09/2007 09:49 PM

View differences:

disklabel64.8 9 Aug 2007 11:48:51 -0000
.\" $DragonFly: src/sbin/disklabel64/disklabel64.8,v 1.2 2007/08/08 11:21:08 swildner Exp $
.\"
.Dd January 21, 2007
.Dt DISKLABEL 8
.Dt DISKLABEL64 8
.Os
.Sh NAME
.Nm disklabel
.Nm disklabel64
.Nd read and write disk pack label
.Sh SYNOPSIS
.Nm
......
indicates that the partition does not begin or end exactly on a
cylinder boundary.
.Sh EXAMPLES
.Dl "disklabel da0s1"
.Dl "disklabel64 da0s1"
.Pp
Display the in-core label for the first slice of the
.Pa da0
......
the base disk name should be specified, such as
.Pa da0 . )
.Pp
.Dl "disklabel da0s1 > savedlabel"
.Dl "disklabel64 da0s1 > savedlabel"
.Pp
Save the in-core label for
.Pa da0s1
......
.Fl R
option to restore the label at a later date.
.Pp
.Dl "disklabel -w -r /dev/da0s1 da2212 foo"
.Dl "disklabel64 -w -r /dev/da0s1 da2212 foo"
.Pp
Create a label for
.Pa da0s1
......
Any existing bootstrap code will be clobbered
and the disk rendered unbootable.
.Pp
.Dl "disklabel -e -r da0s1"
.Dl "disklabel64 -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 "disklabel64 -e -r -n da0s1"
.Pp
Read the on-disk label for
.Pa da0s1 ,
......
.Em not
install the new label either in-core or on-disk.
.Pp
.Dl "disklabel -r -w da0s1 auto"
.Dl "disklabel64 -r -w da0s1 auto"
.Pp
Try to auto-detect the required information from
.Pa da0s1 ,
......
command to edit the
partitioning and file system information.
.Pp
.Dl "disklabel -R da0s1 savedlabel"
.Dl "disklabel64 -R da0s1 savedlabel"
.Pp
Restore the on-disk and in-core label for
.Pa da0s1
......
.Pa savedlabel .
Existing bootstrap code is unaffected.
.Pp
.Dl "disklabel -R -n da0s1 label_layout"
.Dl "disklabel64 -R -n da0s1 label_layout"
.Pp
Display what the label would be for
.Pa da0s1
......
.Cm *
partition sizes.
.Pp
.Dl disklabel -B da0s1
.Dl disklabel64 -B da0s1
.Pp
Install a new bootstrap on
.Pa da0s1 .
......
.Pa /boot/boot2 .
On-disk and in-core labels are unchanged.
.Pp
.Dl disklabel -w -B /dev/da0s1 -b newboot1 -s newboot2 da2212
.Dl disklabel64 -w -B /dev/da0s1 -b newboot1 -s newboot2 da2212
.Pp
Install a new label and bootstrap.
The label is derived from disktab information for
......
.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 disklabel64 -w -B da0s1 auto
.Dl disklabel64 -e da0s1
.Pp
Completely wipe any prior information on the disk, creating a new bootable
disk with a DOS partition table containing one
......
.Cm * ,
which could be used as a source file for
.Pp
.Dl disklabel -R ad0s1c new_label_file
.Dl disklabel64 -R ad0s1c new_label_file
.Bd -literal -offset 4n
# /dev/ad0s1c:
type: ESDI
......
will not install bootstrap code that overlaps it.
.Sh SEE ALSO
.Xr ccd 4 ,
.Xr disklabel 5 ,
.Xr disklabel64 5 ,
.Xr disktab 5 ,
.Xr boot0cfg 8 ,
.Xr diskinfo 8 ,
(9-9/11)