Fun With Apple A/UX on a IIfx

I dug out the old Mac IIfx from storage and had some fun getting A/UX running on it. I had some issues, so I decided to document them and collect some links etc.

Apple A/UX was either an attempt build a high performance advanced upgrade to the companies existing System software, or a cash grab to get US government contracts which required Unix/POSIX compliant OSes on their computers.

I decided to use A/UX 3.1.1 with the pre-made scsi2sd image, the image documentation is here: https://github.com/unxmaal/aux_sdcard  

I don't have a modern Mac so I used Win32 Disk Imager to write the card, and it worked well, writing a 16 GB image takes around 20 minutes with a UHS-1 card. This procedure is identical to how you flash e.g. a Raspberry Pi image.

The scsi2sd configuration in the GitHub worked fine, and I decided to make two extra drives at 2 GB and 4 GB since I used a 16 GB card. These are used for System 7.5 on the 2 GB drive, and a spare HFS partition + A/UX /users partition on the 4 GB drive.

Any useful information you find here: feel free to re-post or add to Wikis etc.

An initial warning: old Unix systems are awful at handling filesystem errors - my advice is to pop the SD card out and image it periodically. With a 16 GB card it only takes around 5 minutes to dump an image, and it compresses fairly well. Reflashing the SD card will almost certainly be faster than even a single fsck pass.

 

Table of Contents

Links

The following links are/were useful for me:

URLInfo typeComment
https://github.com/unxmaal/aux_sdcard scsi2sd instructions and link 
https://68kmla.org/forums/topic/55484-aux-drop-in-clean-aux-install-image-for-scsi2sd/ Original thread where the scsi2sd image was madeHas some debugging info as well, including getting ssh running
http://bitsavers.org/pdf/apple/mac/a_ux/aux_3.0/ Original manuals in PDF formLocal System Administration & Installation Guide were very useful
http://christtrekker.users.sourceforge.net/doc/aux/faq.html The unofficial FAQ 
https://wiki.preterhuman.net/Newbie_Guide_To_A/UX_(Apple_UNIX) Modern users' guideSeems like a good place to add information

Startup

My IIfx gave a sad mac 21 error, which is documented in the GitHub but the proposed fix did nothing. I suspect this is because the disk image was made on a Quadra 950 and not something older.

I fixed it by pulling the SD card on first boot (which means SCSI boot isn't possible), and booting off a System 7.5 Disk Tools floppy. Once booted I hot-inserted the SD card, and launched HD SC Utility.

There I ran "Update" on both the SCSI drives, which seems to place a driver file in the first partition of each drive. After that, the system would boot up to A/UX Startup, which is a small System 7 install only designed to run the A/UX startup.

scsi2sd v5 in the IIfx

fscking issues

In A/UX Startup, the fsck command failed to execute properly, meaning the automatic boot failed.

The error was: NO WRITE ACCESS to /dev/default. Running fsck on the actual SCSI node (/dev/dsk/c0d0s0) also failed in the same way. It seems it's unable to get an exclusive lock on the partition for A/UX for some reason.

Note that the A/UX Startup shell is not a proper Unix shell, it just sort of pretends to be, you can't use any normal programs except the builtins, the only text editor is "ed", which is barely an editor at all. There's some documentation in the install and local admin docs.

I only found two references to this issue for A/UX, one was an ancient newsgroup post about installer issues, and one was in the 68kmla thread, both went unresolved.

I currently haven't found any way to fix that issue, if you have suggestions let me know!

However, you can simply type "launch" and it will boot just fine, the issue is if the system ever crashes, see my note about keeping backups! Also note that you can launch directly into single user mode by running "launch -S".

You can use the A/UX startup settings to disable the startup fsck if you want, then it can autoboot, but I just leave it on manual boot.

Rosetta Floppy

Both the System 7 bootloader environment and the A/UX install lack MS-DOS floppy support, but it's fairly simple to add. I had a floppy image laying around called "PC_Mac.img" which contains a HFS floppy with PC Exchange and Stuffit installed. PC Exchange is an extension that allows mounting of DOS floppies, and Stuffit is the default archive tool for Macs. System 7.5 has this included.

PC Exchange is a self extracting archive, put it in the System / Extensions folder. You can do this both for the bootloader and when in A/UX to be able to get arbitrary files across.

However, be aware that Stuffit 4 seems to work pretty poorly when the resource fork is missing, so I also had to install Stuffit 5.5 to actually open e.g. sit files from a FAT floppy.

Adding a User

There's a fair amount of info on adding users, I followed the Local System Admin guide for A/UX. A neat trick is that many commands can be generated using a GUI, by typing e.g. adduser, then hitting Command+K to open the command editor.

This adds descriptions of the command etc etc., it's one of the neat features of the tool.

The image already has bash installed, so you can use that as the shell. Also see the wiki for info on setting up a nicer looking prompt.

Text Editor

The A/UX system comes with the standard Unix editor, vi, not vim. It's awful.

The user guide strongly suggests just using the TextEditor app, which seems like a perfectly servicable GUI text editor.

On the command line, I wasn't able to easily compile GNU Nano, but the Jagubox Utilities folder (under /opt) has a binary for pine. Extract that and you get pico, the original nano.

There's also a copy of vim in the aux-source folder, running the vim executable kernel paniced my machine twice, be warned! (It might be related to low memory or something.)

Locale Settings

Keyboard layout can be set on the Mac side, as well as locale stuff like date formats.

Time zone is set from a root shell using "settimezone", which is perhaps the most intuitive Unix command ever made.

If only settimezone could bring back the Soviet Union

Though I will say the set of time zones does date the system a bit. I do enjoy being in the WET timezone.

Setting the Hostname

Edit /etc/HOSTNAME to set the hostname, it will take effect on next startup.

See also the /etc/hosts fix below.

Adding Partitions

Partitioning the extra drives worked fairly well, see the Installation and Local Admin guide for how to use Apple HD SC Setup (use the A/UX version under A/UX!).

You can only have a single Macintosh partition per drive, but can have multiple UFS partitions.

I put an extra swap and /users partition on SCSI ID 3, I made the UFS partition as a Free Unix partition, slice number 3 (this is basically the partition type it seems?).

Finding the actual device id for manual mounting and filesystem creating proved challenging, but using the pname utility helped a lot since it lists the partition types.

I found that SCSI ID 3 partition slice 3 (my new Unix partition) was /dev/dsk/c103d0s3, and I was able to use newfs to format it. I chose a 160 MB hard drive "type" and used -c 16 as a parameter to increase the effective inode size. I did this with the composer tool (Cmd+K) so it gave me a nice list of drives to choose, not sure it matters too much what you pick.

To mount it I used fsentry, this is quite well documented in the Wiki and the docs package.

The swap partition was /dev/dsk/c103d0s1.

An issue with really old file systems is the the sector size on my 4 GB drive is 64k. This means the actual effective space utilization can be very poor since every file is 64k minimum. However, this is a bit of a luxury-problem all things considered.

Using multiple smaller partitions can be helpful here, especially if you have a lot of small files like a source tree.

Getting X working

In the /mac folder there's a copy of MacX, including a color one!

The DISPLAY variable is set based on the hostname of the computer, which is normally fine.

However, my machine wasn't networked yet, so nothing worked since the hostname wasn't routable. (Hostname iifx, ping iifx failed).

I added a line in /etc/hosts to route my hostname to 127.0.0.1 which fixed my X issues.

The MacX window control settings lets you set a window style where you can resize the window, which is not default for some reason.

Running xterm from bash failed, but opening sh then running it worked.

If you run xinit it launches both an X server, and a bunch of applications.

Things That Crashed My Machine

I had a bad RTC clock on digging out the Mac, so the system time was in 1904. This was fine (nothing complained!). Setting the time using the date command froze the system and I had to reboot (and this destroyed my filesystem).

I decided to simply set the date from the System 7 bootloader, which worked just fine.

Running vim 5.8.3 as noted above caused two kernel panics in a row so I gave up.

Dual Booting System 7.5

SCSI ID 2 is a 2 GB HFS volume, I made that using the HD SC Utility.

To install System 7.5 I actually ran the installer from A/UX and told it to install to the desired drive. I had some issues doing the install when booting off floppy (error on disk 2), but the A/UX install worked first time.

You can use a tool called System Picker, which is included with both 7.5, the 7.1 bootloader, and A/UX. Note that you may need a reboot for new boot devices to show up.

When in 7.5, the included System Picker didn't show the A/UX bootloader as an option, but opening the Picker that was in the A/UX booter did show it.

You can run A/UX Startup from 7.5, but it doesn't properly unmount the filesystem so it'll think you hard powered off the computer next time it boots. So it's better to restart into the bootloader first.

As mentioned in the Wiki there are some nice Extensions that are part of 7.5 like WindowShade and Apple Menu Options, and these work on A/UX as well.

Just Mac Things (Hardware, Monitors)

Power Supply

The IIfx power supply contains one Rifa X2 capacitor, which is reportedly significantly more prone to catastrophic failure than normal, especially when the case cracks allowing moisture ingress. I did notice some cracking in my unit so I removed it.

The capacitor fitted is a Rifa (now Kemet) PME271M522MR30 (or very similar), a suitable replacement off Digi-Key is a 0.022µF X2 rated cap with ~15 mm lead spacing.

I ordered a Kemet R46KI22200001K1 polypropylene capacitor as a replacement.

The Fan Noise

The Mac IIfx is loud, at least mine is. The single fan is supposed to be speed regulated based on the number of NuBus cards but it doesn't seem to matter much if any cards are installed. I think maybe the fan regulation driver has failed at some point, though people who used these daily also noted that were always loud.

The fan is relatively easy to remove, just pop the cover off the power supply and it can be unscrewed and disconnected. Obviously note that you could die from doing this.

Without a fan the power supply gets alarmingly warm after a few minutes, but it's extremely quiet. I installed a random 12 V 80 mm computer case fan, which is barely audible and seems to move around half the air.

The original Panasonic fan is an obsolete model, and I couldn't find airflow figures for it.  After some digging I think an airflow of around 40 CFM is about right.

So I'll probably swap to a Sunon MF80251V2-1000U-A99 MagLev fan, which is specified for around 30 dB(A) and a suitable airflow.

The original fan is held in with smaller screws than standard, and has some unusual brass inserts that seem to be M3 threaded. You could potentially extract these and press them into a new fan, I might try that. For now I used VHB tape to mount the replacement.

You could also do other mods, like just using long-ass M3 screws through the case and using nuts on the inside (I think 30-40 mm long would work).

The 68030 CPU and the FPU get fairly warm, so I stuck on self-adhesive 20x20 mm heat sinks on them to help with cooling. I stuck a 40 mm 12 V fan on top of the CPU heat sink, running at 5 V the fan makes no noise and effectively cools the CPU despite the reduced case air flow.

Case Screw

There's only one case screw on the IIfx, at the back near the middle. The front has plastic hinge-clips, and there's some push in buttons on the rear sides to release some clips.

Over all the plastic quality of my unit is excellent, there are currently no traces of cracking.

I hate the little screw on the back, not sure if it's stock but mine is a sheet metal screw going into a sheet metal U-clip.

I have ordered some M4 threaded U-nuts and a thumb screw to attempt to resolve this major design issue. Ideally I want to set it up with a captive thumb screw, which seems to be doable here.

"Toby" Sync Outputs

My Mac II has the original Mac II Video Card (Toby), it's a fixed 640x480@67 Hz. It literally only supports composite sync, the H/V syncs aren't connected to anything. 

I had a look around the board and there's no obvious generation of separate sync on the board, the CSync line comes directly from the Toshiba Gate-Array chip. It seems to be an OR type sync generator and not XOR, in case that matters to anyone.

I also observed that the horizontal sync frequency goes up a fair amount during the vertical blanking period on the Toby card. This might be in order to fit the correct amount of HSync pulses in the VBlank period despite using the OR type CSync generator. Some monitors might have issues with this configuration (e.g. incorrect synchronization leading to the upper part of the picture being distorted).

I believe VGA standard is to output HSync during VBlank. I did once try a professional Sony LCD video monitor with the card, and it had issues with the top part of the picture being distorted. At the time I assumed it might be due to the 67 Hz frequency, but it could also be due to this frequency change.

Sony video monitor showing synchronization issues

If the monitor uses the VBlank period timings to determine the video mode, this could be the cause of some issues. During VSync it won't be able to get any timing info, and timing info during VBlank is wrong.

Toby CSync and Green output, showing vertical blanking period

In the scope picture above you can see the increased HSync rate during the VBlank period. It looks like there's a lot of clock feedthrough from the RAMDAC chip on the outputs as well, but this probably doesn't matter too much.

Only benefit is there's no need to set any kind of jumper to set the resolution; it'll only output one mode regardless of what (if anything) is connected.

"Toby" LCD Compatibility

LCD compatibility is troublesome, here's what I've tried:

MFG/ModelSupportNotes
Philips 240V5QYes!

It's a widescreen monitor so not great.

SOG and CSync works

Dell UltraSharp 1800FP (GM5020 chipset)NoTurns on but doesn't display anything
Early 90s (S)VGA CRT (Fortinet)NoRequires separate sync
Dell 1504FPNo

Won't even leave power save mode

The above tests were done by wiring the CSync output from the card to the HSync VGA input. The Philips monitor worked with both CSync (applied to the HSync pin) and SOG.

It seems like many monitors lie in their datasheets. Even though they claim to support a range of resolutions, refresh rates, and synchronization modes, the chipsets may actually be limited to specific standard modes +/- a tolerance.

For example 640x480@67 Hz, and composite or sync on green is within the supported horizontal/vertical frequency range and sync type for all tested monitors except the old CRT, but only the Philips worked. The old CRT only supports VGA standard sync, so that one gets a pass.

Using an LM1881 based sync converter will likely improve monitor compatibility by a lot. This could be modified onto the Toby card fairly easily, I may do this and re-test later.

RasterOps Paintboard Lightning

I ordered a RasterOps Paintboard Lightning, which supports 1024x768 75 Hz, and looks like it will output standard VGA sync.

The card outputs very standard VGA sync as expected, the card defaulted to 1024x768.

I see no reason to think it won't be compatible with any normal PC monitor. I found that several of my adapters worked, even ones that the Toby card didn't support. It doesn't seem to matter much if the video mode select lines are set correctly with this card.

I did have some trouble getting video working on it though:

On startup, the card showed a boot-splash with a logo and ROM version (2.0). It then only displayed a black image. Inspecting the video signal, it was outputting synchronization as normal, but no video signal at all.

PRAM-Zap and resolution change commands didn't help. Neither did using the BMOW ROM card.

I ended up installing the Toby card along side the RasterOps card, and that got me an image. I had previously installed the drivers on the MacOS 7.6 side, and the Paintboard was operating as monitor #2 automatically.

I eventually discovered that setting the colour mode on the RasterOps to Thousands of Colours or higher (i.e. 24 bit mode) made it work. So it seems my card at least doesn't like greyscale modes for some reason.

I do have some vertical lines in the image, which could suggest some hardware issue with the card.

Networking

The IIfx came with an Apple branded networking card, but as seen below it's not too helpful:

More like Notworking, Apple Ethertalk NB

AUI and Thinnet (also known as Cheapernet) are not the most standard things these days, and I (like a normal person) use 1000Base-X over fiber optics for most of my interconnects.

I also found an AUI-10Base-T adapter on eBay that is apparently still used for some ancient Cisco switches so I ordered that in case A/UX doesn't like the new card.

I ended up getting the Thinnet port working as a stop-gap, this was done by using a Pentium 2 computer with dual networks cards acting as a media converter. Not the smoothest solution but it did work.

From looking around online it seems that AUI/10Base-T adapters like e.g. the Centrecom types are a bit more reliable than old 10Base-T network cards.

This article was updated on 2021-03-05T15:09:37+0100