1.\" $NetBSD: edahdi.1,v 1.12 2019/09/01 12:50:22 sevan 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 September 1, 2019 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. 39An AHDI partition format is usually only present on disks shared between 40.Nx 41and some other OS. 42The partition identifiers are used by 43.Nx 44as a guideline to emulate a disklabel on such a disk. 45.Pp 46.Nm 47supports the following options: 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.Bl -tag -width "GEM or BGM" -compact 56.It NBD 57Partition is reserved for 58.Nx . 59This can be either a root or an user partition. 60The first NBD partition on a disk will be mapped to partition 61.Em a 62in 63.Nx . 64The following NBD partitions will be mapped from 65.Em d 66up. 67The filesystem type is ffs by default. 68.It SWP 69The first SWP partition is mapped to partition 70.Em b . 71.It GEM or BGM 72These partitions are mapped from 73.Em d 74up. 75The 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 that is partitioned like: 88.Bl -column Number Id 89.It Sy "Number" Ta Sy "Id" 90.It 1 Ta GEM 91.It 2 Ta GEM 92.It 3 Ta GEM 93.It 4 Ta GEM 94.El 95.Pp 96This partitioning will show up in 97.Nx 98as (Number refers to the first table): 99.Bl -column "c (whole disk)" "Fstype" "Number" 100.It Sy Partition Ta Sy Fstype Ta Sy Number 101.It c (whole disk) Ta unused Ta "" 102.It d (user part) Ta MSDOS Ta 1 103.It e (user part) Ta MSDOS Ta 2 104.It f (user part) Ta MSDOS Ta 3 105.It g (user part) Ta MSDOS Ta 4 106.El 107.Pp 108Now you decide to change the id of partition 2 and 3 to NBD. 109Now 110.Nx 111will show the partitioning as (Number refers to the first table): 112.Bl -column "c (whole disk)" "Fstype" "Number" 113.It Sy Partition Ta Sy Fstype Ta Sy Number 114.It a (root) Ta 4.2BSD Ta 2 115.It c (whole disk) Ta unused Ta "" 116.It d (user part) Ta MSDOS Ta 1 117.It e (user part) Ta 4.2BSD Ta 3 118.It f (user part) Ta MSDOS Ta 4 119.El 120.Pp 121You will notice that the order of the partitions has changed! You will have 122to watchout for this. 123It is a consequence of 124.Nx 125habit of assigning a predefined meaning to the partitions 126.Em a/b 127and 128.Em c . 129.Sh SEE ALSO 130.Xr disklabel 8 , 131.Xr installboot 8 132.Sh HISTORY 133The 134.Nm 135command first appeared in 136.Nx 1.2 . 137.Sh BUGS 138The changes made to the AHDI partitions will become active on the next 139.Em first open 140of the device. 141You are advised to use 142.Nm 143only on a device without any mounted or otherwise active partitions. 144This is 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