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:

URL Info type Comment
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 made Has some debugging info as well, including getting ssh running
http://bitsavers.org/pdf/apple/mac/a_ux/aux_3.0/  Original manuals in PDF form Local 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' guide Seems 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, such as Kemet R46KI22200001K1.

The Fan Noise

The Mac IIfx is loud, at least mine is was. 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.

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 30-40 CFM is about right (i.e. around 50-70 m³/h).

A standard Noctua NF-A8 PWM fan running at full speed does make some noise, but it's not very audible, and the airflow is very similar to the old one.

The original fan is held in with external screws into fancy M3 threaded brass inserts in the fan. Using a punch these are easy to pop out of the old fan and install in the new Noctua fan, just use a Knipex pliers wrench to press them in (don't over-do it or you'll crack the plastic; no affiliation with Knipex).

Note that if your computer (like mine was when I got it) has a 12" card installed in the slot closest to the PSU, it doesn't matter what fan you put in since it will be pulling a vacuum. Move large cards away from the PSU to get tremendous airflow improvements.

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.

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 the rear 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. Nah, not worth the effort.

"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/Model Support Notes
Philips 240V5Q Yes!

It's a widescreen monitor so not great.

SOG and CSync works

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

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 standard sync.

The RasterOps Paintboard Lightning is a long boy
Some factory mods to the RAMDAC chip

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

I see no reason to think it won't be compatible with any normal PC monitor. I used multiscan 20" video mode selection lines.

Here is the driver: RasterOps Driver v3.2

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. 16/24 bit modes) made it work. So it seems my card at least doesn't like greyscale or low colour modes for some reason.

I do have some vertical lines in the image, which could suggest some hardware issue with the card. (note: pinstriping; see below)

It seems the video card mode selection is stored in PRAM, and is dependent on the slot it's installed in. Therefore, I can't move the card to another slot without going through this process again.

It also seems that the primary display adapter on the Mac II is the slot closest to the power supply, not sure there's any way to change that.

To reset the MacOS display settings, delete the Display Preferences file from the relevant boot drive. When you do this, MacOS will use the PRAM defaults it seems and recreate the pref. file.

RasterOps Paintboard Lightning Issues

I have no info on how to make the Lightning work in monochrome or low colour modes. From looking at some old QuickDraw documentation, it seems these modes use index-colour modes which could be the issue? It could also be a unit specific issue.

One day I might try to disassemble the ROM, maybe the device descriptor could simply be patched to not allow these modes?

V2 ROM dump here: Paintboard_Lightning_0002-2613_v2_27C512.zip

I noticed during booting that the card had some glitches on the video output, and unstable synchronization (clearly visible as a variably fuzzy image on the LCD).

The Lightning uses an ICS2494 PLL chip to generate all the video clocks based on the NuBus clock, I found no other clock generators or oscillators. I found that the occasional glitches and unstable synchronization was more or less resolved by adding some additional decoupling to the ICS2494 supply pins, I added 2 pcs 10 µF 0805 16 V capacitors.

The ICS2494 is right next to the ROM chip, and is powered via a 120 Ohm series resistor and a 5 V zener diode from the 12 V power supply from the Mac. The decoupling by default is a 2.2 µF tantalum and a 100 nF 0805 capacitor.

I went a bit nuts with a reel of capacitors, so I probably added 20 10 µF ceramics on top of all the 100 nF default capacitors, and I replaced the tantalum decoupling caps with modern lower ESR types. Over all this didn't actually cause any notable improvements though.

The pinstriping appears to be caused by poor video filtering, and the presence of some factory hacked in video output filters suggests that this was an issue even with a 1994 vintage CRT. I found that adding some additional bypassing near the BT473 RAMDAC (installing C61 and C53) helped a little bit. Note that most similarly specced VGA cards of that era used 5th or higher order RAMDAC low pass filters, while this basically just has a 1st order filter.

Adjusting the LCD video clock and phase helped a lot, and I was able to adjust the phase to mostly null out the pinstriping.

A slight further improvement was installing some 47 pF capacitors to ground for each of the video lines in the video connector, but a proper fix would be to add an in-line 75 Ohm video low pass filter.

The THS7327 seems to be a good candidate for this use, it has several selectable low pass filters integrated which appear to be suitable for 1024x768 filtering.

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.

The Centrecom MX-20T did the trick for connecting to normal gigabit switches with no issues. These are available on eBay used, and seem to be nice little devices. The AT-210TS slimline converter might be a better fit for the chassis of the Mac, since the MX-20T is a bit fat and can interfere with the plastic surrounding the card slots.

AppleTalk File Sharing (AFP)

AppleTalk File Sharing is a huge improvement to FTP, and I would have set it up sooner if I knew how much better it is to use. It's functionally equivalent to network drives on Windows. The only issues I've found is using Toast to mount .iso's, these have to be copied to a local drive first.

There is a very extensive guide here: http://www.applefool.com/se30/, which goes through almost every possible option you have of getting an old Mac networked.

There a few options available depending on your style, since I had already used Windows 2000 as a media converter while waiting for the AUI adapter, I chose the Windows 2000 Server solution, it seemed only proper. Spinning up Windows 2000 in a Hyper-V instance only took around an hour, and it has native AFP support, as well as SMBv1 support which is useful for legacy Windows stuff too.

I had to install AppleShare Client 3.8.3 to avoid the system locking up when accessing the server though, I wasn't able to get reliable printing support (system lockups even with 3.8.3 installed).

Could also add a user for the Mac, otherwise you'll be signing in as Administrator from the Mac.

To allow password saving on the Mac (to get silent auto-mounting on startup), you need to edit the server registry and restart the "File Server for Macintosh" service to effect the changes.

Edit HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MacFile\Parameters to 0x36 to disallow guests (didn't work for me anyway), cleartext password, and allow password saving.

If you want "security", you can enforce no cleartext passwords (set to 0x35), but you'll need to install "MS UAM for AppleShare 3.8" first (it's in an automatically shared folder on the server) to allow secure authentication. Not sure I see the point except for authenticity's sake.

You'll need to install the SMBv1 client on your main workstation to access the share from e.g. Windows 10, but at least only that one connection will be insecure (probably opens up some security downgrade attacks though, fun).

Resource Forks, Alternate File Streams

The interface between Mac OS and Windows files is handled by using NTFS Alternate File Streams (not sure it how it's done if you try to share a FAT partitioned folder, might not be supported). NirSoft has a tool to list these, and you can access the secondary streams with e.g. Notepad++. Some files will list as 0 bytes in Explorer, this is typical for e.g. System Extensions.

Treat these files like magic, copying them onto anything but an NTFS volume will probably destroy the alternate streams (Windows will warn you about it). Copying the files to/from a modern Windows 10 computer over SMB does not affect the file streams however.

7zip and WinRAR can archive these files and retain the data (but you have to explicitly enable AFS when making the archive or it won't include them). Files archived this way can only be extracted onto another NTFS file system, copying the archive to a Mac and unpacking it will almost certainly result in failure.

I also strongly doubt that typical backup utilities or cloud backups read the alternate streams (Dropbox definitely nukes any AFSes on shared files).

If you're doing this setup, I suggest just backing up the entire VM instead of trying to backup files, or just YOLO.

This article was updated on 2021-04-14T20:27:30+0200