[rescue] more sun2 adventures!

Walter Belgers walter+rescue at belgers.com
Sun Jan 6 11:11:39 CST 2019


Hi all,

Ibve been playing some more with my Sun 2/120. Ever seen it do hardware DES
encryption? Or run SunOS 1.1? Read on!

So I got my SCSI2SD adapter after I had installed SunOS 3.2 on a real
harddisk, using the tme Sun emulator and original tapes. I have played some
more with tme, to try to install other versions of SunOS on a virtual disk. It
turns out that tme is - even after patching - quite picky. I could not do a
normal installation of any other SunOS version and then boot it. Either the
installation would fail or tme would hang during or after booting the kernel.
But running tme with a working SunOS 3.2 disk is quite a powerful tool. You
can attach a second virtual drive and just copy the tarballs from the
installation tapes to the second drive. It turns out that the (4.2BSD)
filesystem is compatible through all SunOS versions.

Using this technique, I was able to install SunOS 2.0. After untarring the
tape contents to the correct location, all that is left is to put entries in
/etc/fstab, copy boot.sun2 to /boot and build bootblocks. The resulting SunOS
2.0 could not be booted by tme, but my 2/120 boots from it just fine!

So I then went on to install SunOS 4.0.3. This is an upgrade, so I first had
to install 4.0 (using the technique already described). Then I copied the
miniroot from the 4.0.3 upgrade to the swap partition and booted from there.
The bsunupgradeb script was then started, but ran out of memory. So I
increased memory to 7MB (the maximum, the upper 1MB is reserved for the bwtwo)
but that still did not do it. So in the end I just looked at what the script
was doing and did that by hand (untarring a lot of files, and moving and
deleting a handful). After rebooting, I had a 4.0 kernel with 4.0.3 userland.
I built a new GENERIC kernel and that gave me a nice running 4.0.3 system.

I also have images of SunOS 1.1 boottapes. So I tried that as well. The tape
contains a restore file instead of a tar for the root disk but that posed no
problem. After installing and booting my real Sun, it failed during the
startup. It would not correctly mount / and /usr. After checking the manual
pages, it turned out the fstab file was in a different format:
/dev/sd0a:/:rw:1:1
/dev/sd0g:/usr:rw:1:2
So it looks like the newer format, but with colons instead of spaces, and no
specification of file system type (4.2). After the file was fixed, the Sun
2/120 booted SunOS 1.1 nicely!

So now I have 4 disk images of SunOS 1.1, 2.0, 3.2 and 4.0.3 all verified to
work on a Sun 2/120. They can be put on an SD card for use with SCSI2SD. If
you want to try it out: I have put them at
https://giga.nl/walter/computers/sun2-sunos-collection.tgz
<https://giga.nl/walter/computers/sun2-sunos-collection.tgz>. I chose (150MB)
Micropolis 1355 disks for all of them. I had experimented with other disks in
tme, but some older disk have 256 byte sectors and that would crash tme. (When
doubling the disk image size, it did go a bit further so tme apparently does
not check, I have not looked at the source). The 150MB drive is not of the
correct time period of SunOS 1.1 but I can live with that.

Happy with all that success with my trusty Sun, I decided to do a rare
upgrade. I have an AMD AmZ8068 DES encryption chip. I have mailed about those
before on this list. Ten years ago, after searching for a long time, Per send
me the chip, that he got from somebody in Australia. I had already put it in a
Sun 3/60 and it got recognized by the kernel, but I did not have any programs
to use it. This chip also fits in all sun2 systems. It is as easy as putting
it in the empty socket and boot. So I did and these old SunOS versions I have
installed all contain the des(1) command. With SunOS 3.2 however, the des
command hung. When I booted SunOS 2.0, I could use des(1) to encrypt and
decrypt something using the hardware chip:
# cd /usr/tmp
# cp /vmunix .
# des
Usage: des -e [-b] [-f] [-k key] [ infile [ outfile ] ]
      or: des -d [-b] [-f] [-k key] [ infile [ outfile ] ]
Use -e to encrypt, -d to decrypt
# time des -e -k 123456 vmunix des-hw
0.0u 10.8s 0:11 98% 5+6k 65+74io 0pf+0w
# time des -e -s -k 123456 vmunix des-sw
251.8u 2.9s 4:15 99% 5+6k 74+92io 0pf+ow
#
So that is 0:11 system time versus 4:12 user time. It works! The speedup is
>20, according to the manual it should be about 15.

I made a movie of the DES encryption chip: https://youtu.be/qyNdQlvzmKU
<https://youtu.be/qyNdQlvzmKU>

Walter.


More information about the rescue mailing list