From 2b9c2935feaf2e2beddadbff03ce0c5e347287f1 Mon Sep 17 00:00:00 2001 From: fvdl Date: Wed, 15 Mar 2000 11:55:33 +0000 Subject: [PATCH] Moved from mbrlabel.8,v --- sbin/mbrlabel/mbrlabel.8 | 93 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 sbin/mbrlabel/mbrlabel.8 diff --git a/sbin/mbrlabel/mbrlabel.8 b/sbin/mbrlabel/mbrlabel.8 new file mode 100644 index 000000000000..5f05f36c81ee --- /dev/null +++ b/sbin/mbrlabel/mbrlabel.8 @@ -0,0 +1,93 @@ +.\" 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. +.\" +.\" $NetBSD: mbrlabel.8,v 1.4 2000/03/15 11:55:34 fvdl Exp $ +.\" +.Dd November 15, 1998 +.Dt MBRLABEL 8 +.Os +.Sh NAME +.Nm mbrlabel +.Nd generate incore disklabel from MBR label(s) +.Sh SYNOPSIS +.Nm +.Ar device +.Sh DESCRIPTION +.Nm +is used to generate an incore disklabel from the MBR label(s) found +on disks that were previously used on DOS/Windows systems (or +other MBR using systems). +.Pp +The +.Nm +utility generates an incore label from the MBR contained in the very first +block of the disk, then walking through every extended partition found +and generating additional partition entries for the disk from the +MBRs found in those extended partitions. +The partitions are sequentially entered into the constructed disklabel +as partitions +.Em a , b +and so on until no more MBR partitions are found or all available +entries in the disklabel are used up. +The raw partition (typically partition +.Em c , +but +.Em d +on i386) is left alone during this process. +The resulting disklabel is then placed as the incore disklabel for +this disk. +.Sh BUGS +Due to the way disk drivers currently work in +.Nx , +any incore disklabel is forgotten whenever the last partition of a +disk is closed. +Since typically you wouldn't have a partition open on a disk while +running +.Nm +this lossage will most likely happen, if +.Nm +is used naively. +.Pp +The workaround until the disk drivers are fixed is to keep the +raw partition open until you access the partition(s) of the +disk via e.g. +.Xr mount 8 . +.Pp +E.g. you could use +.Dl sleep 100