Aclock BSOD

(This is a guest post by Antoni Sawicki aka Tenox)

Do you remember the famous Windows NT Blue Screen Of Death? For years it was a source of jokes and bad reputation of Windows reliability.

There even was a Blue Screen Saver. Today we fortunately see much less of it, but it still is there, reminding us that Windows NT internally is in fact a text mode operating system. The 1989 NT Design Workbook tells us that in the early days of development, before OS/2, Win32 subsystems or any GUI were developed, there was an ANSI console and bunch of command line utilities running in the text mode. Sadly all were removed in the retail version. The only true text mode application left around was autochk. Since the day Aclock was conceived I always wanted to run it on the NT text mode boot screen. In it’s twisted logic it actually makes a perfect sense.

So how do you actually output to the BSOD screen? Initially there was a lot hope in Windows NT Native Application, which can use NtDisplayString() function to display text before GUI takes over. Mark Russinovitch has written a sample Native Application with source code. Unfortunately I soon realized that NtDisplayString() does not allow for any control characters that would let me position the cursor or clear the screen. It doesn’t let much more than to display “Hello World” during Windows boot. This unfortunately wasn’t what I was hoping for. Out of lack of further ideas the project was shelved for nearly 10 years until I recently got some help from a real windows insider.

The new hope came from a HalDisplayString() and it’s helper functions HalQueryDisplayParameters() and HalSetDisplayParameters()which return screen resolution in characters and allow to position the text cursor. Exactly what I needed! Unfortunately these functions are part of the NT Kernel and there was absolutely no hope of calling them from user mode, even a Native application.

So a device driver version of Aclock was conceived. Err WHAT? Yes! A Windows Kernel Mode Device Driver version of Aclock. It sounds like craziest idea and most ridiculous waste of time ever. Worse than that, it definitely is! Despite that, development of the driver was actually surprisingly straight forward and the most difficulties I had was to do with setting up the right environment. It required Windows NT 4.0 SP6, an old version of NTDDK, SDK and Visual Studio. Once I had the project set up correctly, the only thing left to do was to figure out the kernel mode equivalents of some of the things I was getting for granted, for instance sleep(). My last surprise was rather unexpectedly difficult access to floating point in the driver. I was advised to avoid, so I have generated a pre computed tables of sin and cos values for every minute on the clock dial.

Aclock running on Windows NT BSOD in Kernel Mode

I must say that VMware Workstation Snapshots came very handy for launching and testing of the driver. It spared me from constant rebooting and re-launching the whole environment. I could load aclock and literarily click “back” like in a web browser.

Links:

Since running the driver on your own system will render it unbootable (you can always do a snapshot or use last known good configuration) I have built a minimal Windows NT Embedded (NTe) image that loads the driver on startup. It’s available as OVA image.

Windows NT Embedded project

The next steps may involve porting AA-Lib to NTHAL. From there the possibilities are unlimited aalib-quake? 😉

Update:  Video

Aclock Windows NT BSOD Driver from Antoni Sawicki on Vimeo.

Dell UNIX Lives Again!

(please note that this is a guest post from Antoni Sawicki)

Dell UNIX is so ultra rare among rare Unix species that it doesn’t even have a Wikipedia entry. I have been hunting this elusive but important piece of computer history for well over 15 years now. Fortunately thanks to Charles H. Sauer and his excellent blog post I was finally able to lay my hands on disk and tape images and the restoration process begun.

The install tape

The system can be installed from either a tape or network server (presumably NFS). Unfortunately no virtualization software can emulate a tape drive. Hopes for a network install are even slimmer since the required network support floppy disk has been lost and chances of suitable Ethernet driver working in Bochs or Qemu are equal to that of finding the lost floppy disk.

I have decided to try a hard disk image from a readily pre-installed system. The original Dell 486 workstation had a 1GB SCSI hard disk. Unfortunately neither Dell UNIX supports LBA mode nor Qemu/Bochs support the Adaptec 154x controller required by the OS.

As all normal install options have been exhausted, the only option left was to use a second hard disk image as source of cpio archive files. Booting from the two install floppies and attaching two disk images was a snap. The next step was to inject the tape “file” in to a right place on the disk, so it can be read by cpio command. A hard disk in Dell UNIX is pretty much unusable without a valid SysV partition and VTOC. Fortunately dellsetup command does it all for you. Once VTOC was put in place I’ve attached the transfer disk image as a loopback device in my host OS. In couple of iterations I was able to aim the host os dd if=file1 of=/dev/loop0 bs=512 seek=offset at the right place, which you work out using prtvtoc /dev/rdsk/1s0 command. Then cpio -ict < /dev/dsk/1s1 was able to list contents of the emulated tape… with errors…

In my infinite wisdom, for some unknown reason I’ve assumed that LBA addressing is required above 540MB. So to be on a safe side I have made the hard disk images 512 MB. What a mistake it was! I have lost several hours trying to figure out cpio header errors coming from the disk… By pure coincidence, while the tape archive was installing (with errors) I was researching for this very blog article and found that LBA starts at 504 MB… Recreating the hard disk images just few MB smaller took all tape and prior boot problems away!

Once the cpio archive was extracted I have made few final touches taken from the original tape install script. After a reboot Dell UNIX booted perfectly. You can experience this by using the firstboot image file. The final part of installation was injecting the second tape file containing System V PKG file to the transfer disk image and running pkgadd -d /dev/dsk/1s1. This is what’s included on allsoft.img.

Dell Unix at First Boot

Some final notes on running the OS:

  • To enable mouse to work:
    • Qemu just add “-chardev msmouse,id=msmouse -device isa-serial,chardev=msmouse” to the launch arguments.
    • Bochs add to the config file:
      mouse: type=serial, enabled=1 
      com1: enabled=1, mode=mouse
      then you have to kill mousemgr process and prevent from starting by deleting /etc/rc2.d/S25mse
      then edit /usr/lib/X11/Xconfig:
      disable Xqueue
      enable Microsoft Mouse
  • To enable keyboard to work correctly in VirtualBOX start with Num Lock OFF.
  • You can use qemu-img utility to convert the image to VMware vmdk to use in VirtualBox.
  • To run X window type startx

X11 and all its glory

  • To attach it to internet use SLIP as there is no working Ethernet driver.  Contrary to most UNIXen of the time, the command is not slattach, but rather slipattach.  Thankfully it does work the same way.  I have found that running Dell Unix with VirtualBOX, along with Windows NT 4.0 I was able to connect into the Dell Unix VM, and get network access.  Just set the two VM’s up for a named pipe (\\.\pipe\dellunix) and make one of them a server, and start that VM 1st.  The steps to prepare Windows NT have been outlined before.

Telnet via SLIP

Legal disclaimer: Dell UNIX is a commercial software and should not be distributed without manufacturers permission. However as the operating system has been dead for 20 years and with a long tradition from Unix Heritage Society and Bitsavers I’m publishing this in good faith under abandonware category. If Dell or any other copyright holder wishes this software removed, please let me know.

Attached are:

  • firstboot image
  • all (pkg) software installed
  • setup instructions if you wish to install from scratch.

Download:

You may also be interested in my post about a sister System V operating system – Interactive UNIX:

Update: Dell Unix now runs on 86Box with higher resolution and proper networking.

Fun with INTERACTIVE UNIX 3.0

(This is a guest post from Antoni Sawicki aka Tenox)

ix30
I’ve been hunting for a complete set of INTERACTIVE UNIX System for quite some time. While I had the “basic set” of it, the real stuff Visix Looking Glass graphical environment was nowhere to be found. Recently I got my hands on a box containing a massive set of 5.25″ floppy disks. Without further delay this is how the famous 386 UNIX GUI looks like:
The os has a long and convoluted history. It started as PC/IX for the IBM XT created by Interactive Systems Corporation. Later updated to 386/ix and renamed as INTERACTIVE UNIX System V/386. The company was acquired by Kodak and the OS was later sold to Sun Microsystems.
SunSoft INTERACTIVE UNIX 4.1
Sun has reportedly used the OS to help port SunOS/Solaris to x86 platform. However they also sold and supported it as a stand alone product. The system was widely used as part of Reuters Terminal and other embedded applications. It briefly survived Oracle acquisition making the os Oracle INTERACTIVE UNIX?

This article specifically covers version 3.0 released by ISC around 1991. The installation is pretty straightforward except for swapping 50 disk images and later configuration of NIC, TCP/IP and VGA/X11. The floppy images are available here. I have spent quite a lot of time to get TCP/IP working and VGA at half decent resolution.

Fortunately thanks to 86Box you can enjoy a fully working OS in a “high-res” (1024×768) mode, 256 colors and working TCP/IP. You can even pretend to browse the web using early version of Mosaic and WRP:

Looking Glass comes with a file manager and funky icons for pretty much every utility in the system:

The OS has a bunch of GNU apps and I even found a super early version of xv:

Finally this is how you manage the system with a “sysadm” utility and “kconfig” kernel configurator:

On a text console side, the OS has virtual consoles switchable via SYSRQ + F key. Console is on F8.

One should probably appreciate that PC had such a cool Unix version before Linux was even born. Unfortunately this stuff was all prohibitively expensive and mortals could not afford it to run on their 386s.

You can download 86Box version here. Make sure to look at readme for some last minute updates. Especially around configuring TCP/IP and Looking Glass licensing. There also is a VirtualBox OVA, however it only works in 800×600 and no networking/tcpip. Additional software can be downloaded from funet ftp. Install disks are here.

Also you may be interested in a follow up article covering VP/ix DOS hypervisor included with the OS.

Have Fun With Virtualization!