IDPROM / NVRAM Battery Replacement Page

Originally published in 2001 on

This page is about fixing of Sun IDPROM (48T02) battery, preferably on a weekend :-). Fixing NVRAM is not a difficult task if you have the right tools. You would need this FAQ when you get one of the below messages

Sun Workstation, Model Sun-XXXXXX Series.
ROM Rev X.X, XXMB memory installed
ID PROM invalid.
Testing 0 Megabytes of Memory ... Completed.
ERROR: missing or invalid ID prom
Requesting Internet address for 0:0:0:0:0:0

Sun Workstation, Model Sun-XXXX Series.
Type 4 Keyboard
ROM Rev X.X, XXMB memory installed, Serial #16777215
Ethernet address ff:ff:ff:ff:ff:ff, Host ID ffffffff

Invalid format type in NVRAM
The IDPROM contents are invalid

You would ask "What is NVRAM?". NVRAM is a small 24 pin DIP (Dual Inline Package) integrated circuit that keeps track of various system parameters such as serial number, ethernet MAC (Media Access Control) address, HOSTID, date of manufacture, etc. I bought one IPX machine and that had a bad NVRAM, I went through many resources, different data sheets, etc and finally replaced the battery of the NVRAM chip M48T02. I read the IDPROM FAQ at NVRAM/HOSTID FAQ and it said a little bit about replacing the battery of 48T02. I tried and replaced the battery only and here am I sharing my experience with the battery of 48T02.

Please carry out these instructions on your own risk, I do not take responsibility of the adverse consequences caused by following these instructions.

I would recommend you to read the HOSTID/NVRAM FAQ before performing the actual procedure. This FAQ assumes that your NVRAM battery is dead and the data in the NVRAM is invalid. If your battery is not dead and you don't want to loose the NVRAM data, NVRAM back up instructions are on the NVRAM/HOSTID FAQ (google for the string. Sorry I did not get link from them even after asking).

Step 1
Make sure that the power is turned off. Back you data off the nvram if it is alive, *before* removing the chip. Instructions to back-up the data are on the NVRAM/HOSTID FAQ page (google). Carefully remove the NVRAM from the machine. You can use the IC extractor tool to do that. Look for the pin 1 markings on the top.

Step 2
As you could see that the whole chip is divided into 2 parts. The upper part contains the battery & crystal oscillator and the bottom half is the Integrated Circuit. The battery and oscillator are piggy-backed on the IC. Both the parts Battery (upper) and IC (lower) are connected to each other via 4 wires (2 on each side). The wires can be seen in the picture below. On both sides the wires are covered with some epoxy glue.

Step 3
Carefully scrap the epoxy compound using sharp blade. Do not scratch too hard as you might break the wires. I used my 50W soldering iron to remove the compound. You can use a lower wattage iron but that will take time.

Step 4: M48T02 with exposed battery terminals After you have exposed the two wires cut them from the end coming from the battery. The wire towards the pin 12 of the chip is - in and the opposite wire is + in.

Step 5
External battery is now connected to the terminalsYou will need a 3V battery to power the chip. I have used a CR2032 lithium battery. Carefully solder thin and flexible insulated wires to the + and negative side of the battery. The wires should be thin and flexible so that they won't hurt the wires coming out of the chip. I have used a short length of wires from the IDE cable. I have used the 2 wires from the pin 1 end of the ide cable so that you get one colored wire and one white wire.

Step 6
Cut the length of wire you just soldered to an appropriate length. Solder these wires very carefully to the wires that come out of the chip. Take extra precaution on the polarity of the battery, and try to avoid short circuit.

Step 7
Verify that the soldered wires at the chip end are some distance apart and there is no short circuit. Now place a tiny drop of super glue on the bottom side of the battery and place the battery on the top of the chip casing.

Step 8
Now fix the chip in the IPX socket (from where it came out) and do a quick and dirty programming. Turn off power... wait for couple of minutes... power up the Sun and verify that the settings are ok.

Step 9
Battery Connected!: Top ViewIf everything works out ok, we need to seal the solder joint using super glue or some other sealing compound. In the picture below you can see the battery glued to the case of M48T02 Remove the chip carefully without shorting the soldered terminals. Put ample amount of glue just to cover the pit we made. Secure the battery on top of the chip by placing some more glue on the sides.

Looks Great!I have this prototype working and had no problems. If you find this page useful or if you fix your NVRAM, please do write comments.

Quick Programming Guide from -
This is for folks who need to replace their NVRAM chip in a sun4c/m/u machine and don't want to bother with XOR calculations or the details above with mkp. I am assuming that you have a brand new NVRAM chip in hand. All numbers below are in hex.
First, decide what ethernet address you want to use and what you want for the last three byte of the hostid. The ethernet address should begin with 08:00:20. There are no restrictions on the last three bytes of the hostid. Say the ethernet address is 08:00:20:E3:E4:E5 and the last three bytes of the hostid are H1, H2, H3. The first byte of the hostid will automatically be set according to the system type (real-machine-type variable in the OpenBoot monitor).

setenv diag-switch? false
8 0 20 E3 E4 E5 H1H2H3 mkpl

If mkpl does not print a copyright notice, then it changed the IDPROM. You should make sure by looking at the idprom after using mkpl by executing the .idpromcommand.
e.g. 8 0 20 13 de ad c0ffee mkpl will set the last three bytes of the hostid to c0ffee and the ethernet address to 08:00:20:13:de:ad.
N.B. mkpl will only work if the IDPROM checksum is invalid. Otherwise it will simply print a copyright notice after you type the Control-R. So, if you can't get mkpl to work, you can try making the IDPROM checksum invalid. You can invalidate the IDPROM checksum in an NVRAM with a valid IDPROM checksum by executing

f idprom@ 1 xor f mkp

(it seems that invalidating the version number will also do, e.g. 17 0 mkp). If you still can't get mkpl to work, then you should try using mkp as described in the above section. This note was added because on some machines, set-defaults will set the IDPROM checksum according to the other values in the IDPROM.


Anonymous said…
Anybody interested in this subject after so long ?
I have a problem with NVRAM for sunblade 150 (XEROX DP 90). I bought a new chip and I try to write the old Ethernet address and host ID numbers on the new NVRAM . The problem is that the machine uses Openboot 4 that has no MKP command . How would I still be able to write NVRAM ?
Thank you.