Before you start you might need to consider your disk configuration
to sort out a quirk in SCSI-ID to SD-UNIT mapping that exists on
Sun Sparcstations.

Upon leaving the factory, SunOS and the OpenBOOT ROM map according to
this table:

    SCSI-ID ->	SunOS SD-UNIT
    0		sd3
    1		sd1
    2		sd2
    3		sd0
    4		sd4
    5		sd5
    6		sd6

Unlike SunOS and the OpenBOOT ROM, a generic OpenBSD kernel numbers
scsi drives sequentially as it finds them.  The drive with the
lowest scsi-id will be called sd0, the next one sd1, etc.

To ease the installation process, two OpenBSD kernels are provide in
the installation sets.  The default OpenBSD kernel (bsd) is set up
to use the OpenBSD mapping, while a special kernel (bsd.scsi3) is
set up to match the Sun mapping above by hard-wiring scsi-id#3 to sd0
and scsi-id#0 to sd3. The remaining drives will be dynamically mapped
to other sd* numbers.

This is mostly a non-issue if you have only one drive on your system,
but can get really confusing if you have multiple drives.  If you plan
to eliminate SunOS altogether it may be best to correct the scsi-id's
of your drives, while if you plan to leave SunOS installed, it may
be better to install OpenBSD on an external drive with scsi-id 1 or 0.

Some OpenBoot proms provide and environment variable that controls
the drive<->scsi-id mapping, you can change this to reflect the natural
ordering or just set the boot related variables to boot from the
correct drive, whatever the numbering.

NOTE: if you elect to build a custom kernel you may want to "hardwire"
the scsi-id's to sd0->scsi-id 0 or your desired scheme, this helps
prevent accidents if you change the SCSI bus configuration or a drive
is down.

Your OpenBOOT ROM may need some setup.  make sure you boot from `new
command mode'.  If your machine comes up and gives you a `>' prompt
instead of `ok', type:

    >n
    ok setenv sunmon-compat? false
    ok

This is needed because OpenBSD cannot handle the old-mode yet, and will
firework on you.

Also, you cannot use the security modes of the sparc OpenBOOT ROM.

    ok setenv security-mode none


Please note that while OpenBSD and SunOS have a reasonable degree of
compatibility between disk labels and filesystems there are some problems
to watch out for during initial installation or when trying to maintain
both OpenBSD and SunOS environments on the same system.

    If the OpenBSD fsck(8) utility is used on a SunOS filesystem, it will
    set OpenBSD "clean flags" and BSD4.4 summary fields in the superblock.
    SunOS does *not* like this and you will have to do a "fsck -b 32" under
    SunOS to access an alternate superblock to repair the filesystem.  You
    should always specify SunOS filesystem with a "pass number" of 0 in
    their /etc/fstab entry to prevent this, and preferably mount them "RO".

    If SunOS fsck is used on an OpenBSD filesystem in the default OpenBSD
    (4.4BSD) format, it will first complain about the superblock and then
    about missing . and .. entries.  Do *not* try to "correct" these
    problems, as attempting to do so will completely trash the filesystem.


OpenBSD supports both OpenBSD "native" disklabels and "Sun compatible"
disklabels.  Unless you have some really good reason, you should stick
with the Sun compatible labels.  The disklabel(8) "-r" switch says to
use OpenBSD labels, which is a bit counter-intuitive and contrary to
the reasons why might want to use "-r" on other OpenBSD ports.

Don't use "-r" with disklabel(8).


The OpenBSD "Sun Compatible" disklabel have been extended to support 16
partitions, which may be compatible with Solaris, but the old SunOS
format(8) utility only sees the first 8 partititions and may "lose"
information about the extended partitions.

Use SunOS format(8) only with *extreme* caution on drives that contain
OpenBSD partitions.


OpenBSD and Sun BSD bootblocks are similar in concept, though implemented
differntly.  The OpenBSD bootblocks are architecture independent and also
understand the extended disklabels with 16 partitions.  You can use SunOS
bootblocks, but remember that OpenBSD bootblocks must be installed with
OpenBSD installboot and SunOS bootblocks with SunOS installboot.


