1 .\" $NetBSD: edahdi.1,v 1.10 2009/03/15 09:47:13 joerg Exp $
3 .\" Copyright (c) 1996 Leo Weppelman
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
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.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 .Nd modify AHDI partition identifiers
37 allows you to modify the partition identifiers on a disk partitioned with
38 AHDI or an AHDI compatible formatter. An AHDI partition format is usually
39 only present on disks shared between
41 and some other OS. The partition identifiers are used by
43 as a guideline to emulate a disklabel on such a disk.
46 supports the following options:
48 .Bl -tag -width device
50 The name of the raw device you want to edit.
53 The following partition identifiers are recognized by
56 .Bl -tag -width "GEM or BGM" -compact
58 Partition is reserved for
60 This can be either a root or an user partition. The first NBD
61 partition on a disk will be mapped to partition
65 The following NBD partitions will be mapped from
68 The filesystem type is ffs by default.
70 The first SWP partition is mapped to partition
73 These partitions are mapped from
75 up. The filesystem type is msdos.
78 root partition (deprecated).
81 user partition (deprecated).
84 swap partition (deprecated).
87 Say, you have a disk with that is partitioned like:
90 .It Sy "Number" Ta Sy "Id"
97 This partitioning will show up in
99 as (Number refers to the first table):
101 .Bl -column "c (whole disk)" "Fstype" "Number"
102 .It Sy Partition Ta Sy Fstype Ta Sy Number
103 .It c (whole disk) Ta unused Ta ""
104 .It d (user part) Ta MSDOS Ta 1
105 .It e (user part) Ta MSDOS Ta 2
106 .It f (user part) Ta MSDOS Ta 3
107 .It g (user part) Ta MSDOS Ta 4
110 Now you decide to change the id of partition 2 and 3 to NBD. Now
112 will show the partitioning as (Number refers to the first table):
114 .Bl -column "c (whole disk)" "Fstype" "Number"
115 .It Sy Partition Ta Sy Fstype Ta Sy Number
116 .It a (root) Ta 4.2BSD Ta 2
117 .It c (whole disk) Ta unused Ta ""
118 .It d (user part) Ta MSDOS Ta 1
119 .It e (user part) Ta 4.2BSD Ta 3
120 .It f (user part) Ta MSDOS Ta 4
123 You will notice that the order of the partitions has changed! You will have
124 to watchout for this. It is a consequence of
126 habit of assigning a predefined meaning to the partitions
136 command first appeared in
139 The changes made to the AHDI partitions will become active on the next
141 of the device. You are advised to use
143 only on a device without any mounted or otherwise active partitions. This
146 This is particularly confusing when your change caused partitions to shift,
147 as shown in the example above.
149 As soon as a disk contains at least one NBD partition, you are allowed to
150 write disklabels and install bootstraps.