summaryrefslogtreecommitdiff
path: root/distrib/notes/sparc/prep
blob: 8475815a6fe29f269f182d52260144939baec834 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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 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 a drive with scsi-id 1 or 0.

Some OpenBoot proms provide an 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.  If you are running OpenBSD on
a sun4c, or sun4m system, the ROM must be set to "new" command mode.
If your sun4c or sun4m machine comes up and gives you a `>' prompt
instead of `ok', type:

    >n
    ok setenv sunmon-compat? false
    ok

This is needed because OpenBSD relies on the behaviour of the "new" command
mode.  OpenBSD will not boot correctly on sun4c or sun4m systems that 
are not running in "new" command mode.  The sun4 systems such as the 4/110, 
4/200, and 4/300 system do not have a "new" command mode, and will work
fine as-is.


Also, you cannot use the security modes of the sparc OpenBOOT ROM.
Make sure that the ROM security modes are disabled:

    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.

    You should avoid using soft updates (option softdep in /etc/fstab)
    on your shared filesystems.
    Although untested, it is likely that SunOS would be confused by a 
    filesystem with soft update flags enabled.

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 partitions 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
differently.  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.