NetBSD/sys/arch/atari/stand/ahdilabel/ahdilabel.8

168 lines
5.7 KiB
Groff

.\" $NetBSD: ahdilabel.8,v 1.1.1.1 2000/08/07 09:23:41 leo Exp $
.\"
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Julian Coleman and Leo Weppelman.
.\"
.\" 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 the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``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 FOUNDATION OR CONTRIBUTORS
.\" 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 July 29, 2000
.Dt AHDILABEL 8
.Os
.Sh NAME
.Nm ahdilabel
.Nd modify AHDI partitions
.Sh SYNOPSIS
.Nm ahdilabel
.Ar disk
.Sh DESCRIPTION
.Nm ahdilabel
allows you to modify the AHDI partition table on a disk partitioned with
AHDI or an AHDI compatible formatter. The 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 ahdilabel
supports the following options:
.Pp
.Bl -tag -width disk
.It Ar disk
The name of the disk you want to edit.
.Nm ahdilabel
will first try to open a disk of this name. If this cannot
be opened, it will attempt to open
.Ar r Ns <disk> Ns Ar c .
Finally, if this also cannot be opened, it will attempt to open
.Ar /dev/r Ns <disk> Ns Ar c .
.El
.Pp
.Nm ahdilabel
will display information about the number of sectors, tracks
and sectors on the disk, as well as the current AHDI partition information.
It will then prompt for input. The input choices are:
.Pp
.Bl -tag -width a-p
.It Ar a-p
Modify a partition. You will be prompted for a partition id, root, start
and size.
.Nx
recognises the following partition id's:
.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
.Nx partition
letter
.Em a .
The following NBD partitions will be mapped from letter
.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.
.El
.Pp
The root, start and size parameters can be entered using sector or
cylinder/track/sector notation. Whole numbers of cylinders can be entered
using the shorthand <cylinder>/. Likewise, whole numbers of tracks can be
entered using the shorthand <cylinder>/<track>/.
.Pp
The sector holding the primary AHDI partition table only has space for four
partitions. Thus, if a disk has more than four partitions, the extra
partition information is held in auxilliary root sectors. There is one
auxilliary root for each additional partition (and also for the fourth
partition, if the disk has more than four partitions).
.It Ar r
Recalculate the root sectors. This will automatically assign auxilliary
root sectors if the disk has more than 4 partitions. The auxilliary root
sectors will be positioned in a default location preceeding the relevant
partition.
.It Ar s
Show the current partition information.
.It Ar u
Toggle the unit display between sector and cylinder/track/sector notation.
.It Ar w
Write the AHDI partition table to the disk.
.It Ar q
Quit
.El
.Sh EXAMPLES
.Dl ahdilabel sd0
Edit the AHDI label for disk sd0.
.Sh CAVEATS
The changes made to the AHDI partitions will become active on the next
.Em first open
of the disk. You are advised to use
.Nm ahdilabel
only on a disk without any mounted or otherwise active partitions. This
is not enforced by
.Nm ahdilabel.
.Pp
Because of way
.Nx
interprets AHDI partition tables to create the
.Nx
disklabel, the
.Nx
partition ordering may change if partitions labelled NBD are created or
removed.
.Pp
Creating an AHDI partition table on a disk that previously did not have
one will almost certainly overwrite any existing partition information
and/or data on that disk. This is especially the case if auxilliary root
sectors are needed for the AHDI partition table.
.Pp
As soon as a disk contains at least one NBD partition, you are allowed to
write
.Nx
disklabels and install bootstraps.
.Sh SEE ALSO
.Xr bootpref 8 ,
.Xr disklabel 8 ,
.Xr installboot 8
.Sh HISTORY
The
.Nm ahdilabel
command first appeared in
.Nx 1.5 .