p .Nm edahdi supports the following options:
p l -tag -width device t Ar device The name of the raw device you want to edit. .El
p The following partition identifiers are recognized by NetBSD:
p l -tag -width "GEM or BGM" -compact t 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 partition .Em a in NetBSD. The following NBD partitions will be mapped from .Em d up. The filesystem type is ffs by default. t SWP The first SWP partition is mapped to partition .Em b. t GEM or BGM These partitions are mapped from .Em d up. The filesystem type is msdos. t NBR NetBSD root partition (depricated). t NBU NetBSD user partition (depricated). t NBS NetBSD swap partition (depricated). .El .Sh EXAMPLES Say, you have a disk with that is partitioned like:
p l -column header Number Id .Sy "Number Id" 1 GEM 2 GEM 3 GEM 4 GEM .El
p This partitioning will show up in NetBSD as (Number refers to the first table):
p l -column header "Partition Fstype Number" .Sy "Partition Fstype Number" c (whole disk) unused d (user part) MSDOS 1 e (user part) MSDOS 2 f (user part) MSDOS 3 g (user part) MSDOS 4 .El
p Now you decide to change the id of partition 2 and 3 to NBD. Now NetBSD will show the partitioning as (Number refers to the first table):
p l -column header "Partition Fstype Number" .Sy "Partition Fstype Number" a (root) 4.2BSD 2 c (whole disk) unused d (user part) MSDOS 1 e (user part) 4.2BSD 3 f (user part) MSDOS 4 .El
p You will notice that the order of the partitions has changed! You will have to watchout for this. It is a consequence of NetBSD habit of assigning a predefined meaning to the partitions .Em a/b and .Em c . .Sh CAVEATS The changes made to the AHDI partitions will become active on the next .Em first open of the device. You are advised to use .Nm edahdi only on a device without any mounted or otherwise active partitions. This is not enforced by .Nm edahdi. This is particularly confusing when your change caused partitions to shift, as shown in the example above.
p As soon as a disk contains at least one NBD partition, you are allowed to write disklabels and install bootstraps. .Sh "SEE ALSO" .Xr disklabel 8 .Xr installboot 8 .Sh HISTORY The .Nm edahdi command first appeared in NetBSD 1.1B