xref: /netbsd-src/share/man/man1/man1.atari/edahdi.1 (revision d0fed6c87ddc40a8bffa6f99e7433ddfc864dd83)
1.\"	$NetBSD: edahdi.1,v 1.1.1.1 1996/05/16 19:53:00 leo Exp $
2.\"
3.\" Copyright (c) 1996 Leo Weppelman
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"      This product includes software developed by Leo Weppelman
17.\" 3. The name of the author may not be used to endorse or promote products
18.\"    derived from this software without specific prior written permission
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30.\"
31.Dd May 16, 1996
32.Dt EDAHDI 1
33.Os
34.Sh NAME
35.Nm edahdi
36.Nd modify AHDI partition identifiers
37.Sh SYNOPSIS
38.Nm edahdi
39.Ar device
40.Sh DESCRIPTION
41.Nm edahdi
42Allows you to modify the partition identifiers on a disk partitioned with
43AHDI or an AHDI compatible formatter. An AHDI partition format is usually
44only present on disks shared between NetBSD and some other OS. The partition
45identifiers are used by NetBSD as a guideline to emulate a disklabel on such
46a disk.
47.Pp
48.Nm edahdi
49supports the following options:
50.Pp
51.Bl -tag -width device
52.It Ar device
53The name of the raw device you want to edit.
54.El
55.Pp
56The following partition identifiers are recognized by NetBSD:
57.Pp
58.Bl -tag -width "GEM or BGM" -compact
59.It NBD
60Partition is reserved for NetBSD. This can be either a root or an user
61partition. The first NBD partition on a disk will be mapped to partition
62.Em a
63in NetBSD. The following NBD partitions will be mapped from
64.Em d
65up.
66The filesystem type is ffs by default.
67.It SWP
68The first SWP partition is mapped to partition
69.Em b.
70.It GEM or BGM
71These partitions are mapped from
72.Em d
73up. The filesystem type is msdos.
74.It NBR
75NetBSD root partition (depricated).
76.It NBU
77NetBSD user partition (depricated).
78.It NBS
79NetBSD swap partition (depricated).
80.El
81.Sh EXAMPLES
82Say, you have a disk with that is partitioned like:
83.Pp
84.Bl -column header Number   Id
85.Sy "Number   Id"
86  1     GEM
87  2     GEM
88  3     GEM
89  4     GEM
90.El
91.Pp
92This partitioning will show up in NetBSD as (Number refers to the first table):
93.Pp
94.Bl -column header "Partition        Fstype  Number"
95.Sy "Partition        Fstype  Number"
96 c (whole disk)  unused
97 d (user part)   MSDOS     1
98 e (user part)   MSDOS     2
99 f (user part)   MSDOS     3
100 g (user part)   MSDOS     4
101.El
102.Pp
103Now you decide to change the id of partition 2 and 3 to NBD. Now NetBSD
104will show the partitioning as (Number refers to the first table):
105.Pp
106.Bl -column header "Partition        Fstype  Number"
107.Sy "Partition        Fstype  Number"
108 a (root)        4.2BSD    2
109 c (whole disk)  unused
110 d (user part)   MSDOS     1
111 e (user part)   4.2BSD    3
112 f (user part)   MSDOS     4
113.El
114.Pp
115You will notice that the order of the partitions has changed! You will have
116to watchout for this. It is a consequence of NetBSD habit of assigning a
117predefined meaning to the partitions
118.Em a/b
119and
120.Em c .
121.Sh CAVEATS
122The changes made to the AHDI partitions will become active on the next
123.Em first open
124of the device. You are advised to use
125.Nm edahdi
126only on a device without any mounted or otherwise active partitions. This
127is not enforced by
128.Nm edahdi.
129This is particularly confusing when your change caused partitions to shift,
130as shown in the example above.
131.Pp
132As soon as a disk contains at least one NBD partition, you are allowed to
133write disklabels and install bootstraps.
134.Sh "SEE ALSO"
135.Xr disklabel 8
136.Xr installboot 8
137.Sh HISTORY
138The
139.Nm edahdi
140command first appeared in NetBSD 1.1B
141