2000-03-15 14:55:33 +03:00
|
|
|
.\" Copyright (C) 1998 Wolfgang Solfrank.
|
|
|
|
.\" Copyright (C) 1998 TooLs GmbH.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by TooLs GmbH.
|
|
|
|
.\" 4. The name of TooLs GmbH may not be used to endorse or promote products
|
|
|
|
.\" derived from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
.\" IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
.\" PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
|
.\" OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
|
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
|
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2001-05-01 15:51:21 +04:00
|
|
|
.\" $NetBSD: mbrlabel.8,v 1.9 2001/05/01 11:51:21 lukem Exp $
|
2000-03-15 14:55:33 +03:00
|
|
|
.\"
|
2001-05-01 15:51:21 +04:00
|
|
|
.Dd May 1, 2001
|
2000-03-15 14:55:33 +03:00
|
|
|
.Dt MBRLABEL 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm mbrlabel
|
2000-12-24 17:01:12 +03:00
|
|
|
.Nd update disk label from MBR label(s)
|
2000-03-15 14:55:33 +03:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2000-12-27 07:22:11 +03:00
|
|
|
.Op Fl fqrw
|
2000-03-15 14:55:33 +03:00
|
|
|
.Ar device
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2000-12-24 17:01:12 +03:00
|
|
|
is used to update a
|
2000-12-24 16:57:37 +03:00
|
|
|
.Nx
|
|
|
|
disk label from the Master Boot Record (MBR) label(s) found
|
2000-03-15 14:55:33 +03:00
|
|
|
on disks that were previously used on DOS/Windows systems (or
|
|
|
|
other MBR using systems).
|
|
|
|
.Pp
|
|
|
|
.Nm
|
2000-12-24 16:57:37 +03:00
|
|
|
scans the MBR contained in the very first block of the disk,
|
|
|
|
then walks through every extended partition found and generating
|
|
|
|
additional partition entries for the disk from the MBRs found in
|
|
|
|
those extended partitions.
|
|
|
|
.Pp
|
2000-12-24 17:01:12 +03:00
|
|
|
Each MBR partition which does not have an equivalent partition in the
|
2000-12-24 16:57:37 +03:00
|
|
|
disk label (equivalent in having the same size and offset) is added to
|
2000-12-24 17:01:12 +03:00
|
|
|
the first free partition slot in the disk label. A free
|
2000-12-24 16:57:37 +03:00
|
|
|
partition slot is defined as one with an
|
|
|
|
.Dv fstype
|
|
|
|
of
|
|
|
|
.Sq Li unused
|
|
|
|
and a
|
|
|
|
.Dv size
|
|
|
|
of zero
|
|
|
|
.Pq Sq 0 .
|
2000-12-24 17:01:12 +03:00
|
|
|
If there are not enough free slots in the disk label, a warning
|
2000-12-24 16:57:37 +03:00
|
|
|
will be issued.
|
|
|
|
.Pp
|
2000-03-15 14:55:33 +03:00
|
|
|
The raw partition (typically partition
|
|
|
|
.Em c ,
|
|
|
|
but
|
|
|
|
.Em d
|
2000-12-24 16:57:37 +03:00
|
|
|
on i386 and some othe platforms) is left alone during this process.
|
2000-03-15 14:55:33 +03:00
|
|
|
.Pp
|
2000-12-27 07:22:11 +03:00
|
|
|
By default, the proposed changed disk label will be displayed and no
|
|
|
|
disk label update will occur.
|
|
|
|
.Pp
|
|
|
|
Available options:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl f
|
|
|
|
Force an update, even if there has been no change.
|
|
|
|
.It Fl q
|
|
|
|
Performs operations in a quiet fashion.
|
|
|
|
.It Fl r
|
2001-05-01 15:51:21 +04:00
|
|
|
When used with
|
|
|
|
.Fl w ,
|
|
|
|
update the on-disk label as well as the in-core label if it has
|
|
|
|
changed.
|
2000-12-27 07:22:11 +03:00
|
|
|
.It Fl w
|
2001-05-01 15:51:21 +04:00
|
|
|
If it has changed, update the in-core label, and then if
|
|
|
|
.Fl r
|
|
|
|
is given, update the on-disk label as well.
|
2000-12-27 07:22:11 +03:00
|
|
|
.El
|
2000-03-15 14:55:33 +03:00
|
|
|
.Pp
|
|
|
|
.Sh SEE ALSO
|
2000-11-14 14:06:19 +03:00
|
|
|
.Xr disklabel 8 ,
|
|
|
|
.Xr fdisk 8
|
2000-03-15 14:55:33 +03:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command appeared in
|
|
|
|
.Nx 1.4 .
|