156 lines
4.6 KiB
Groff
156 lines
4.6 KiB
Groff
.\" $NetBSD: edahdi.1,v 1.2 1998/02/06 06:03:42 perry Exp $
|
|
.\"
|
|
.\" Copyright (c) 1996 Leo Weppelman
|
|
.\" 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 Leo Weppelman
|
|
.\" 3. The name of the author may not be used to endorse or promote products
|
|
.\" derived from this software without specific prior written permission
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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.
|
|
.\"
|
|
.Dd May 16, 1996
|
|
.Dt EDAHDI 1
|
|
.Os
|
|
.Sh NAME
|
|
.Nm edahdi
|
|
.Nd modify AHDI partition identifiers
|
|
.Sh SYNOPSIS
|
|
.Nm edahdi
|
|
.Ar device
|
|
.Sh DESCRIPTION
|
|
.Nm edahdi
|
|
Allows you to modify the partition identifiers on a disk partitioned with
|
|
AHDI or an AHDI compatible formatter. An AHDI partition format is usually
|
|
only present on disks shared between
|
|
.Nx
|
|
and some other OS. The partition identifiers are used by
|
|
.Nx
|
|
as a guideline to emulate a disklabel on such a disk.
|
|
.Pp
|
|
.Nm edahdi
|
|
supports the following options:
|
|
.Pp
|
|
.Bl -tag -width device
|
|
.It Ar device
|
|
The name of the raw device you want to edit.
|
|
.El
|
|
.Pp
|
|
The following partition identifiers are recognized by
|
|
.Nx :
|
|
.Pp
|
|
.Bl -tag -width "GEM or BGM" -compact
|
|
.It NBD
|
|
Partition is reserved for
|
|
.Nx .
|
|
This can be either a root or an user partition. The first NBD
|
|
partition on a disk will be mapped to partition
|
|
.Em a
|
|
in
|
|
.Nx .
|
|
The following NBD partitions will be mapped from
|
|
.Em d
|
|
up.
|
|
The filesystem type is ffs by default.
|
|
.It SWP
|
|
The first SWP partition is mapped to partition
|
|
.Em b.
|
|
.It GEM or BGM
|
|
These partitions are mapped from
|
|
.Em d
|
|
up. The filesystem type is msdos.
|
|
.It NBR
|
|
.Nx
|
|
root partition (depricated).
|
|
.It NBU
|
|
.Nx
|
|
user partition (depricated).
|
|
.It NBS
|
|
.Nx
|
|
swap partition (depricated).
|
|
.El
|
|
.Sh EXAMPLES
|
|
Say, you have a disk with that is partitioned like:
|
|
.Pp
|
|
.Bl -column header Number Id
|
|
.Sy "Number Id"
|
|
1 GEM
|
|
2 GEM
|
|
3 GEM
|
|
4 GEM
|
|
.El
|
|
.Pp
|
|
This partitioning will show up in
|
|
.Nx
|
|
as (Number refers to the first table):
|
|
.Pp
|
|
.Bl -column header "Partition Fstype Number"
|
|
.Sy "Partition Fstype Number"
|
|
c (whole disk) unused
|
|
d (user part) MSDOS 1
|
|
e (user part) MSDOS 2
|
|
f (user part) MSDOS 3
|
|
g (user part) MSDOS 4
|
|
.El
|
|
.Pp
|
|
Now you decide to change the id of partition 2 and 3 to NBD. Now
|
|
.Nx
|
|
will show the partitioning as (Number refers to the first table):
|
|
.Pp
|
|
.Bl -column header "Partition Fstype Number"
|
|
.Sy "Partition Fstype Number"
|
|
a (root) 4.2BSD 2
|
|
c (whole disk) unused
|
|
d (user part) MSDOS 1
|
|
e (user part) 4.2BSD 3
|
|
f (user part) MSDOS 4
|
|
.El
|
|
.Pp
|
|
You will notice that the order of the partitions has changed! You will have
|
|
to watchout for this. It is a consequence of
|
|
.Nx
|
|
habit of assigning a predefined meaning to the partitions
|
|
.Em a/b
|
|
and
|
|
.Em c .
|
|
.Sh CAVEATS
|
|
The changes made to the AHDI partitions will become active on the next
|
|
.Em first open
|
|
of the device. You are advised to use
|
|
.Nm edahdi
|
|
only on a device without any mounted or otherwise active partitions. This
|
|
is not enforced by
|
|
.Nm edahdi.
|
|
This is particularly confusing when your change caused partitions to shift,
|
|
as shown in the example above.
|
|
.Pp
|
|
As soon as a disk contains at least one NBD partition, you are allowed to
|
|
write disklabels and install bootstraps.
|
|
.Sh "SEE ALSO"
|
|
.Xr disklabel 8
|
|
.Xr installboot 8
|
|
.Sh HISTORY
|
|
The
|
|
.Nm edahdi
|
|
command first appeared in
|
|
.Nx 1.2 .
|