Oldskooler Ramblings

the unlikely child born of the home computer wars

Solving an IBM PS/2 Model 25-286 Chicken and Egg CMOS problem

Posted by Trixter on September 4, 2015


I solved something recently and thought others (read: vintage computer nerds) might be interested in the write-up. I recently acquired an IBM PS/2 Model 25-286 and wanted to read data off of the hard drive.  The 25-286 relies on configuration data stored in CMOS, however the battery-backed CMOS is dead, leading to the error codes 161 and 163 on boot-up. The system miraculously boots from the hard drive just fine in this condition (documentation suggests the hard drive table is fixed to a single entry). But, you can’t transfer data off of a system in this condition because 1. The floppy drive table is wrong and thinks the 1.44MB drive is a DSDD drive and can’t read/write a 1.44MB diskette, and 2. There are no entries in the BIOS table for the built-in serial and parallel ports, so they don’t show up, can’t use MODE COM1, etc. Short of physically moving the hard drive into another system, there’s no way to get data in/out of it.

The obvious fix is to write the 8525-286 diag and setup diskette somewhere and boot it to set proper CMOS values, but the diag/setup diskette image is a 1.44MB image, and the system can’t read it because the scrambled-CMOS configuration only reads/writes DSDD disks. So this is where the chicken-and-egg problem lies: To fix the system, you need to boot a diskette — but the diskette isn’t bootable until the system is fixed. (There’s another issue: Since the battery is dead, the setup disk will set proper values, perform a warm reboot — and then the values are gone again since the battery is dead.)

Armed with the knowledge that that the system can read 720KB diskette media just fine if formatted in another computer, I was able to follow this procedure to temporarily force a functional system:

  1. Use tweener system to write out the 8525-286 diag/setup diskette from diskette image
  2. Copy resulting setup/diag files onto a 720KB DSDD diskette (NOT a 1.44MB diskette formatted as 720KB).
  3. Boot Model 25-286 from internal hard drive
  4. Run the “SC.EXE” program from the setup/diag disk
  5. Using SC.EXE, force correct values, then save them.
  6. Hit <ESC> to back out to DOS (do NOT hit enter to reboot the system)
  7. Perform an immediate, non-cold, non-warm reboot by issuing INT 19H (instructions below) — do not have bootable diskette in the drive, and for safety have an empty config.sys and autoexec.bat

Doing this will leave the system in a correct state until you perform a warm (ctrl-alt-del) or cold (power) reboot. DOS will reload and parse the new temporary CMOS values.  The floppy drive reads/writes 1.44MB in this state, and the serial and parallel ports are recognizable and function. While I wrote this, I was archiving the entire hard drive to another system using FastLynx and a parallel-port cable.

According to my friends at Fort Collins PC Repair company, the proper fix, of course, is a Dallas 12887+ replacement battery/clock chip. Three are already on their way to me from China (hope they aren’t pulls!).

To issue INT 19H, you can use DEBUG.COM. Start DEBUG, then type:


a <enter>
int 19 <enter>
<enter>
g <enter>

7 Responses to “Solving an IBM PS/2 Model 25-286 Chicken and Egg CMOS problem”

  1. catweazle666 said

    I had to carry out this operation on a PS/1 a few years ago.

    The owner had his accounts on it, and naturally hadn’t backed up.

    http://www.classic-computers.org.nz/blog/2009-10-10-renovating-a-dallas-battery-chip.htm

    Much to my astonishment, it worked!

    I still have it somewhere…

    Heh, debug… gc800:5

  2. alder645 said

    Wow, that’s awesome! I’d be terrified of rupturing the battery and causing a leak.

  3. malvineous said

    I’m amazed you had to go to such trouble to boot the system! All the clones I’ve used that have barrel batteries never cut power to the RTC chip as long as the board is powered, so a warm and cold boot retain the CMOS settings without any trouble, even with no CMOS battery at all. One of my 286 boards can even be powered off for a few minutes without losing the CMOS settings which is quite surprising. I guess the Dallas chip is somewhat more sensitive to power fluctuations!

    • catweazle666 said

      It wasn’t a clone with a separate battery, it was an IBM PS/1 – effectively not a PC compatible at all – and the battery was incorporated into a Dallas 1287 chip which also contained the BIOS defaults and the real time clock. So when the battery goes flat it is normally necessary to replace the whole chip and attempt to replace the BIOS parameters such as the HDD CHS numbers.

      So in order to get it to boot, it was necessary to surgically attach a new CMOS battery to the inner connections of the RTC, thus preserving the settings too.

      Here you go!

      http://www.classic-computers.org.nz/blog/2009-10-10-renovating-a-dallas-battery-chip.htm

      All good fun!

  4. poofygoof said

    The DS1287 hack usually reuqires pulling the chip off the motherboard. All of mine are soldered down. :(

Leave a reply to catweazle666 Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.