General sun4c, sun4m, sun4d, sun4u IDPROM Programming

If you have a valid NVRAM chip installed (IDPROM is ok) then before doing anything else, write down a copy of the IDPROM information.

You can get it under Sun OS 4.1.x by running /usr/etc/devinfo -vp or under Solaris 2.x by executing /usr/sbin/prtconf -vp. Alternatively you can get the IDPROM information at the OpenBoot monitor "ok" prompt by typing the command .idprom (yes the "." is part of the command).

If you don’t, you should be able to complete the procedure using information from the table at the bottom of this article.

Note: If your IDPROM is dead (all ff or 00) you really don’t have much to lose here. A machine with a dead IDPROM already doesn’t know what type it is and will often report a defective motherboard. Ignore that message until such time as you have completed that proceedure below.

This article is a synopsis of http://www.obsolyte.com/sunFAQ/faq_nvram.html

Step 1

    Go to the OpenBoot monitor (ok prompt). You can do 
    this by turning on your machine, pressing L1/Stop-A
    to interrupt the boot sequence, and entering 
    "new command mode". Alternatively, if your 
    machine is running, just shut down your operating system.

    If you are installing a new NVRAM, type set-defaults
    followed by the <Enter> key and then setenv
    diag-switch? false followed by the <Enter> key.

    Generally a machine will reset the NVRAM 
    to the default values (excluding the IDPROM information)
    when it detects a new NVRAM. Still, it is good to 
    do a set-defaults just in case this fails.  

Step 2.      
    The command to reprogram the IDPROM part of 
    NVRAM is "mkp". The format for the command is

    <value> <location> mkp

    where location is read off the following table
    (all values are in hexadecimal). Note that some
    Sun clones (e.g. Tatung COMPstation 25 with
    TWS boot PROM REV 1.7) don't have an "mkp" command.
    If "mkp" doesn't work on your system, see the 
    section below entitled "Other more arcane 
    methods for modifying the IDPROM."


    byte(s)   contents
    0         always 01 - format/version number
    1         first byte of hostid (machine type)
    2-7       6 byte ethernet address 
              (first three bytes should be 08,00,20)
    8-b       date of manufacture (usually all 0s, 
              doesn't really matter)
    c         second byte of hostid
    d         third byte of hostid
    e         fourth byte of hostid
    f         IDPROM checksum - bitwise xor of bytes 0-e

    As mentioned above, you can look at the complete idprom 
    by executing .idprom. Bytes c through e in the 
    table above are collectively referred to as the serial 
    number. If you convert the concatenation of bytes 
    c-e to decimal, this is the serial number you see 
    when you turn the machine on.

    Now make the changes using mkp. Be very careful 
    and be sure to compute the checksum after
    making changes. If you don't, you'll get
    nasty warnings about an incorrect IDPROM
    checksum on boot. A quick and dirty way
    to compute and store the checksum in
    location f is to execute the following at
    the "ok" prompt _after_ you have made your
    changes to locations 0-e.

    0 f 0 do i idprom@ xor loop f mkp

    Don't change the first byte of the hostid to 
    something that doesn't correspond to your 
    system type (see table below). Similarly, 
    the first three bytes of the ethernet 
    address should be (08,00,20). The first
    byte of the hostid is often used to
    determine the architecture when booting
    from CDROM on some Sun models. If you don't
    set the first three bytes of the ethernet
    address to 08,00,20 you might get
    message which says that you have a defective
    motherboard (but then I don't know of any other
    consequences of changing this to some reasonable
    value, especially avoid ff:ff:ff:ff:ff:ff !. On
    some systems you can get away with changing the
    first three bytes of the ethernet address to
    more or less anything you want).

    Example:

    To modify the hostid of an IPX to be 57c0ffee 
    and the ethernet address to be 08:00:20:c0:ff:ee. 
    At the OpenBoot monitor prompt (ok)

    01 00 mkp
    {machine type from table below} 1 mkp
    08 02 mkp
    00 03 mkp
    20 04 mkp
    c0 05 mkp
    ff 06 mkp
    ee 07 mkp
    00 08 mkp
    00 09 mkp
    00 0a mkp
    00 0b mkp
    c0 0c mkp
    ff 0d mkp
    ee 0e mkp
    0 f 0 do i idprom@ xor loop f mkp

  Step 3:
    reboot the system and you should be good
    to go! 

The following table matches Sun system models
with the first byte of the hostid. This is 
from a posting to comp.sys.sun.admin
by Andy.Behrens@coat.com

    01    2/1x0
    02    2/50
    11    3/160
    12    3/50
    13    3/2x0
    14    3/110
    17    3/60
    18    3/e
    21    4/2x0
    22    4/1x0
    23    4/3x0
    24    4/4x0
    31    386i
    41    3/4x0
    42    3/80
    51    SPARCstation 1 (4/60)
    52    SPARCstation IPC (4/40)
    53    SPARCstation 1+ (4/65)
    54    SPARCstation SLC (4/20)
    55    SPARCstation 2 (4/75)
    56    SPARCstation ELC
    57    SPARCstation IPX (4/50)
    61    4/e
    71    4/6x0
    72    SPARCstation 10 or SPARCstation 20
    80    SPARCstation Classic, LX, 4, 5, SS1000, Voyager, Ultra 1