AHDILABEL(8) System Manager's Manual (ATARI) AHDILABEL(8)

NAME

ahdilabelmodify AHDI partitions

SYNOPSIS

ahdilabel disk

DESCRIPTION

ahdilabel allows you to modify the AHDI partition table on a disk partitioned with AHDI or an AHDI compatible formatter. The AHDI partition format is usually only present on disks shared between NetBSD and some other OS. The partition identifiers are used by NetBSD as a guideline to emulate a disklabel on such a disk.

ahdilabel supports the following options:

disk
The name of the disk you want to edit. ahdilabel will first try to open a disk of this name. If this cannot be opened, it will attempt to open r<disk>c. Finally, if this also cannot be opened, it will attempt to open /dev/r<disk>c.

ahdilabel will display information about the number of sectors, tracks and sectors on the disk, as well as the current AHDI partition information. It will then prompt for input. The input choices are:

a-p
Modify a partition. You will be prompted for a partition id, root, start and size. NetBSD recognises the following partition id's:

NBD
Partition is reserved for NetBSD. This can be either a root or an user partition. The first NBD partition on a disk will be mapped to NetBSD partition letter a. The following NBD partitions will be mapped from letter d up. The filesystem type is ffs by default.
SWP
The first SWP partition is mapped to partition b.
GEM or BGM
These partitions are mapped from d up. The filesystem type is msdos.

The root, start and size parameters can be entered using sector, cylinder/track/sector or megabyte notations. Whole numbers of cylinders can be entered using the shorthand <cylinder>/. Likewise, whole numbers of tracks can be entered using the shorthand <cylinder>/<track>/. Megabytes are entered using the suffix M.

The following can also be used to enter partition parameters:

-N (root)
Position the root sector for this partition immediately after partition N.
-N (start)
Make this partition start after partition N (leaving a gap of 1 sector for a root sector, if necessary).
-N (size)
Make this partition end immediately before partition N.
-1 (size)
Make this partition extend to the end of the disk.

The sector holding the primary AHDI partition table only has space for four partitions. Thus, if a disk has more than four partitions, the extra partition information is held in auxiliary root sectors. There is one auxiliary root for each additional partition (and also for the fourth partition, if the disk has more than four partitions).

r
Recalculate the root sectors. This will automatically assign auxiliary root sectors if the disk has more than 4 partitions. The auxiliary root sectors will be positioned in a default location preceding the relevant partition.
s
Show the current partition information.
u
Toggle the unit display between sector and cylinder/track/sector notation.
w
Write the AHDI partition table to the disk.
z
Options for zero'ing the boot sector and bad sector lists. The default is to preserve them both.
q
Quit

EXAMPLES

ahdilabel sd0
Edit the AHDI label for disk sd0.

SEE ALSO

bootpref(8), disklabel(8), installboot(8)

HISTORY

The ahdilabel command first appeared in NetBSD 1.5.

BUGS

The changes made to the AHDI partitions will become active on the next first open of the disk. You are advised to use ahdilabel only on a disk without any mounted or otherwise active partitions. This is not enforced by ahdilabel.

Because of way NetBSD interprets AHDI partition tables to create the NetBSD disklabel, the NetBSD partition ordering may change if partitions labelled NBD are created or removed.

Creating an AHDI partition table on a disk that previously did not have one will almost certainly overwrite any existing partition information and/or data on that disk. This is especially the case if auxiliary root sectors are needed for the AHDI partition table.

As soon as a disk contains at least one NBD partition, you are allowed to write NetBSD disklabels and install bootstraps.

July 29, 2000 NetBSD 6.1