1.\" $NetBSD: edahdi.1,v 1.6 2001/04/21 14:23:16 wiz 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.\" 4. 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 atari 33.Os 34.Sh NAME 35.Nm edahdi 36.Nd modify AHDI partition identifiers 37.Sh SYNOPSIS 38.Nm 39.Ar device 40.Sh DESCRIPTION 41.Nm 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 45.Nx 46and some other OS. The partition identifiers are used by 47.Nx 48as a guideline to emulate a disklabel on such a disk. 49.Pp 50.Nm 51supports the following options: 52.Pp 53.Bl -tag -width device 54.It Ar device 55The name of the raw device you want to edit. 56.El 57.Pp 58The following partition identifiers are recognized by 59.Nx : 60.Pp 61.Bl -tag -width "GEM or BGM" -compact 62.It NBD 63Partition is reserved for 64.Nx . 65This can be either a root or an user partition. The first NBD 66partition on a disk will be mapped to partition 67.Em a 68in 69.Nx . 70The following NBD partitions will be mapped from 71.Em d 72up. 73The filesystem type is ffs by default. 74.It SWP 75The first SWP partition is mapped to partition 76.Em b . 77.It GEM or BGM 78These partitions are mapped from 79.Em d 80up. The filesystem type is msdos. 81.It NBR 82.Nx 83root partition (deprecated). 84.It NBU 85.Nx 86user partition (deprecated). 87.It NBS 88.Nx 89swap partition (deprecated). 90.El 91.Sh EXAMPLES 92Say, you have a disk with that is partitioned like: 93.Pp 94.Bl -column header Number Id 95.Sy "Number Id" 96 1 GEM 97 2 GEM 98 3 GEM 99 4 GEM 100.El 101.Pp 102This partitioning will show up in 103.Nx 104as (Number refers to the first table): 105.Pp 106.Bl -column header "Partition Fstype Number" 107.Sy "Partition Fstype Number" 108 c (whole disk) unused 109 d (user part) MSDOS 1 110 e (user part) MSDOS 2 111 f (user part) MSDOS 3 112 g (user part) MSDOS 4 113.El 114.Pp 115Now you decide to change the id of partition 2 and 3 to NBD. Now 116.Nx 117will show the partitioning as (Number refers to the first table): 118.Pp 119.Bl -column header "Partition Fstype Number" 120.Sy "Partition Fstype Number" 121 a (root) 4.2BSD 2 122 c (whole disk) unused 123 d (user part) MSDOS 1 124 e (user part) 4.2BSD 3 125 f (user part) MSDOS 4 126.El 127.Pp 128You will notice that the order of the partitions has changed! You will have 129to watchout for this. It is a consequence of 130.Nx 131habit of assigning a predefined meaning to the partitions 132.Em a/b 133and 134.Em c . 135.Sh CAVEATS 136The changes made to the AHDI partitions will become active on the next 137.Em first open 138of the device. You are advised to use 139.Nm 140only on a device without any mounted or otherwise active partitions. This 141is not enforced by 142.Nm "" . 143This is particularly confusing when your change caused partitions to shift, 144as shown in the example above. 145.Pp 146As soon as a disk contains at least one NBD partition, you are allowed to 147write disklabels and install bootstraps. 148.Sh SEE ALSO 149.Xr disklabel 8 150.Xr installboot 8 151.Sh HISTORY 152The 153.Nm 154command first appeared in 155.Nx 1.2 . 156