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