Retrocomputing‎ > ‎

Installing SunOS 4.1.1 to Sun3 Emulated in TME 0.8 on Linux

posted Mar 19, 2011, 5:40 AM by hyunghwan chung   [ updated Mar 24, 2011, 12:43 AM ]
In need of an old SunOS 4 for reference purpose, I've manged to install it to an emulated Sun3 on Ubuntu Linux 10.10 x86_64 as I came across TME capable of emulating Motorola 68020 based Sun3 machines. Here are the steps I've taken to get it done.

Set up the directory on the host Ubuntu machine. I placed the emulator files under ${HOME}/emulators.

$ mkdir ${HOME}/emulators
$ cd ${HOME}/emulators

Get the TME source archive and extract the files.

$ wget http://people.csail.mit.edu/fredette/tme/tme-0.8.tar.gz
$ tar -zxvf tme-0.8.tar.gz
$ cd ${HOME}/emulators/tme-0.8

TME requires GTK to emulate a framebuffer, a keyboard, and a mouse. I've installed the GTK development files on my host machine.

$ sudo apt-get install libgtk2.0-dev

Create a helper script named 'gtk-config' to work around an autoconf issue in detecting the GTK development packages.

$ cat >${HOME}/emulators/tme-0.8/gtk-config <<EOF 
#! /bin/sh

module=`pkg-config --list-all | egrep '^gtk\+?-' | head -1 | sed -e 's/^\(.[-a-z0-9_\+\.]*\).*$/\1/'`
if test "x${module}" = x; then
echo "$0: no gtk under pkg-config control" 1>&2
exit 1
fi
args=
for option
do
if test "${option}" = --version; then
option=--modversion
fi
args="${args} ${option}"
done
exec pkg-config ${args} ${module}
EOF
$ chmod +x ${HOME}/emulators/tme-0.8/gtk-config


Configure the source and build the emulator. I've included the tme source directory into PATH to let configure find the gtk-config script and execute it as necessary. I've set the prefix to ${HOME}/emulators to isolate this emulator environment into a single location. I didn't have luck in building the emulator without providing --disable-shared.

$ PATH=$PATH:${HOME}/emulators/tme-0.8 ./configure --prefix=${HOME}/emulators --disable-warnings --disable-shared
$ make
$ make install

At this point, you should have the emulator files installed into respective directories under ${HOME}/emulators. Executable files are shown below.

$ ls -l ${HOME}/emulators/bin
total 3232
-rwxr-xr-x 1 hyung-hwan hyung-hwan 3269688 2011-03-24 14:46 tmesh
-rwxr-xr-x 1 hyung-hwan hyung-hwan   22120 2011-03-24 14:46 tme-sun-eeprom
-rwxr-xr-x 1 hyung-hwan hyung-hwan   11395 2011-03-24 14:46 tme-sun-idprom

Let's start creating an environment for Sun3 emulation by creating a dedicated directory.

$ mkdir ${HOME}/emulators/tme-sun3
$ cd ${HOME}/emulators/tme-sun3

Copy some sample configuration files from the default installation into the emulation directory.

$ cp ${HOME}/emulators/share/examples/tme/SUN3-CARRERA .
$ cp ${HOME}/emulators/share/examples/tme/sun3-carrera-eeprom.txt .
$ cp ${HOME}/emulators/share/examples/tme/sun-keyboards.txt .
$ cp ${HOME}/emulators/share/examples/tme/my-sun-macros.txt .

Get the ROM file to the emulation directory.

$ wget http://people.csail.mit.edu/fredette/tme/sun3-carrera-rev-3.0.bin

Create IDROM and the EEPROM files. Note that you can change 11:22:33 to a different value of your choice.

$ ${HOME}/emulators/bin/tme-sun-idprom 3/150 8:0:20:11:22:33 > my-sun3-idprom.bin
$ ${HOME}/emulators/bin/tme-sun-eeprom < sun3-carrera-eeprom.txt > my-sun3-eeprom.bin

Create a disk image file to use. Change the number in seek to change the file size.

$ dd if=/dev/zero of=my-sun3-disk.img bs=1 count=1 seek=1000000000

Customize the SUN3-CARRERA file for installing SunOS 4.1.1.

# Edit Line 12 to change the memory size to 32MB.
#ram0 at obmem0 addr 0x0: tme/host/posix/memory ram 8MB
ram0 at obmem0 addr 0x0: tme/host/posix/memory ram 32MB

# Comment out Line 75 and 84 to disable the color display.

#cgthree0 at vme0 addr 0xff400000 ipl 4: tme/machine/sun3/cgtwo type sun3
#display0 at cgthree0

# Edit Line 93 to change the disk type from tme-scsi-1 to acb4000
#sd0 at scsibus0: tme/scsi/disk id 0 type tme-scsi-1
sd0 at scsibus0: tme/scsi/disk id 0 type acb4000

# Edit Line 101 to change the tape drive info by deleting the vendor and the product info.
#st0 at scsibus0: tme/scsi/tape id 4 type emulex-mt02 vendor EMULEX product "MT-02 QIC"
st0 at scsibus0: tme/scsi/tape id 4 type emulex-mt02

Get the boot tape files for SunOS 4.1.1 from http://www.sun3arc.org/BootTapes/Sun3 and place them under ${HOME}/emulators/tme-sun3/sunos411.

$ mkdir ${HOME}/emulators/tme-sun3/sunos411
$ cd ${HOME}/emulators/tme-sun3/sunos411
$ # Take all the means to get required files from http://www.sun3arc.org/BootTapes/Sun3.

Create symbolic links to prepare a virtual tape image.

$ uncompress *.Z
$ ln -sf tpboot.sun3 01

$ ln -sf SunOS411.sun3.Exa.xdrtoc 02
$ ln -sf munix_sun3 03
$ ln -sf munixfs_sun3 04
$ ln -sf miniroot_sun3 05
$ ln -sf sun3_proto_root.sunos_4_1_1.tar 06
$ ln -sf sun3_usr.tar 07
$ ln -sf sun3_kvm.tar 08
$ ln -sf sun3_install.tar 09
$ ln -sf sun3_networking.tar 10
$ ln -sf sun3_system_v.tar 11
$ ln -sf sun3_sys.tar 12
$ ln -sf sun3_sunview_users.tar 13
$ ln -sf sun3_sunview_demo.tar 14
$ ln -sf sun3_text.tar 15
$ ln -sf sun3_demo.tar 16
$ ln -sf sun3_openwindows_users.tar 17
$ ln -sf sun3_openwindows_demo.tar 18
$ ln -sf sun3_openwindows_fonts.tar 19
$ ln -sf sun3_user_diag.tar 20
$ ln -sf sun3_manual.tar 21
$ ln -sf sun3_tli.tar 22
$ ln -sf sun3_rfs.tar 23
$ ln -sf sun3_sunview_programmers.tar 24
$ ln -sf sun3_debugging.tar 25
$ ln -sf sun3_shlib_custom.tar 26
$ ln -sf sun3_graphics.tar 27
$ ln -sf sun3_uucp.tar 28
$ ln -sf sun3_games.tar 29
$ ln -sf sun3_versatec.tar 30
$ ln -sf sun3_security.tar 31
$ ln -sf sun3_openwindows_programmers.tar 32
$ ln -sf copyright_sun3_tape1 33

Run the emulator.

$ cd ${HOME}/emulators/tme-sun3
$ LTDL_LIBRARY_PATH=${HOME}/emulators/lib ${HOME}/emulators/bin/tmesh SUN3-CARRERA

You should have the emulated display in a GTK window while tmesh prompts for your input in your terminal. Note you can ignore multiple keyboard warnings.


Load the boot tape and power up the machine.

tmesh> command tape0 load sunos411/01 sunos411/02 sunos411/03 sunos411/04  sunos411/05  sunos411/06  sunos411/07  sunos411/08  sunos411/09  sunos411/10  sunos411/11 sunos411/12 sunos411/13 sunos411/14 sunos411/15 sunos411/16 sunos411/17 sunos411/18 sunos411/19 sunos411/20 sunos411/21 sunos411/22 sunos411/23 sunos411/24 sunos411/25 sunos411/26 sunos411/27 sunos411/28 sunos411/29 sunos411/30 sunos411/31 sunos411/32 sunos411/33
tmesh> command mainbus0 power up

The framebuffer display shows some start-up messages and waits for your input.


You can boot from the tape drive by entering b st() on the prompt. After showing some boot messages, it asks you to install SunOS mini-root.


Choose 1 to install SunOS mini-root and continue to format sd0.


Type disk at the format> prompt and enter disk geometry.


Type partition at the format> prompt and change a/b/g partitions.



Once you write label and quit the format program, it copies miniroot to /dev/rsd0b.


Choose 1 to reboot using the miniroot.


Type suninstall to install SunOS.


Choose 1 for Quick installation to save time. You are asked to choose to preserve existing disk partitions. Say yes by pressing y.


Press the Enter keys to move down to Full_install followed by the x key.


Enter y for final confirmation.


Installation procedure creates new file systems on /dev/rsd0a and /dev/rsd0b,  copies many files from the tape drive to the disk, and creates various device nodes.


Once the installation is over, it asks you to reboot the system. Enter y to reboot.


The system reboots to the disk. For the first boot, it asks you for a few things such as a host name and time zone. I've named it sun3tme and chose my region for the time zone.


I chose n for the network question as TME supports Ethernet via BPF which my host system does not support.


I entered u at the confirmation screen.


The question goes on to the supervisor password for root. You can enter a password of your choice. You can set up extra user accounts at the user account screen. I didn't set up any. The boot procedure continues to the login prompt. You can log-in to the system with root or an extra account you've created.


The system is ready for use. Enjoy SunOS 4.1.1.


ą
hyunghwan chung,
Mar 24, 2011, 12:16 AM
ą
hyunghwan chung,
Mar 24, 2011, 12:29 AM
ą
hyunghwan chung,
Mar 23, 2011, 11:51 PM
ą
hyunghwan chung,
Mar 23, 2011, 11:53 PM
ą
hyunghwan chung,
Mar 24, 2011, 12:15 AM
ą
hyunghwan chung,
Mar 24, 2011, 12:24 AM
ą
hyunghwan chung,
Mar 24, 2011, 12:33 AM
ą
hyunghwan chung,
Mar 24, 2011, 12:05 AM
ą
hyunghwan chung,
Mar 24, 2011, 12:07 AM
ą
hyunghwan chung,
Mar 24, 2011, 12:27 AM
ą
hyunghwan chung,
Mar 24, 2011, 12:02 AM
ą
hyunghwan chung,
Mar 24, 2011, 12:02 AM
ą
hyunghwan chung,
Mar 23, 2011, 11:45 PM
ą
hyunghwan chung,
Mar 24, 2011, 12:13 AM
ą
hyunghwan chung,
Mar 24, 2011, 12:20 AM
ą
hyunghwan chung,
Mar 24, 2011, 12:22 AM
ą
hyunghwan chung,
Mar 24, 2011, 12:09 AM
ą
hyunghwan chung,
Mar 23, 2011, 11:45 PM
ą
hyunghwan chung,
Mar 23, 2011, 11:28 PM
Comments