• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

A/UX 3.1.1 Post Install Scripts

foetoid

Well-known member
Been a while since I've been on the forums. Picked up a Quadra 610, full 040, 64Mb of RAM and a ZuluSCSI and decided to go down the A/UX rabbit hole for the first time since the early 00's.

Learning lots from reading posts, and utilizing online resources. Was really excited to see the drop in for SCS2SD, sadly the ZuluSCSI firmware isn't currently fully compatible with all the options in the XML file, so I wasn't able to port that over.

I did most my initial 3.1.1 install on QEMU and then dropped the image on the SD card and fired it up. (After swapping the 040 enabler for version 1.1 of course)

Since I'm going through the pain of doing all of the Jagubox updates, ports, and patches as well as some of nleymann's stuff, I thought I'd throw together a shell script folks could use from a fresh install.

Still a work in progress. Just got started on all of this last night, but what's in the script so far is validated for A/UX 3.1.1. Right now, I'm focused on getting Jagubox done. There's some comments at the top of the script that explain where it's expecting stuff to be located on your system. More to come, but feel free to check it out as is for now. Waaaaay past my bedtime.

https://github.com/corymalon/Apple_AUX_3.1.1_Setup
 

foetoid

Well-known member
Made a bunch of progress today, then botched up my installs and had to start from scratch because I was flying by the seat of my pants... Code is all fine and recoverable though. Slowed down, treated it like work, and started putting together processes and procedures... Added a wiki to the repo, documenting my build out for QEMU (Thanks to everyone who's been documenting their lives with A/UX for me to cheat off of). Threw some images up on Google Drive as well, that will assist if you go my route. These have the A/UX boot disk, 040 enabler v 1.1, and TuneUp2.0 for 3.1.1. Instructions on how to use all that in QEMU is on the wiki.

Once you're QEMU build is done, you can run this on real hardware with ZuluSCSI by renaming the root.img and opt.img to HD0.img and HD1.img respectively and dumping them on your SD card. Alternatively you could create a zuluscsi.ini file pointing to the named images, but that's kinda outta scope for this message.

 

MrFahrenheit

Well-known member
Made a bunch of progress today, then botched up my installs and had to start from scratch because I was flying by the seat of my pants... Code is all fine and recoverable though. Slowed down, treated it like work, and started putting together processes and procedures... Added a wiki to the repo, documenting my build out for QEMU (Thanks to everyone who's been documenting their lives with A/UX for me to cheat off of). Threw some images up on Google Drive as well, that will assist if you go my route. These have the A/UX boot disk, 040 enabler v 1.1, and TuneUp2.0 for 3.1.1. Instructions on how to use all that in QEMU is on the wiki.

Once you're QEMU build is done, you can run this on real hardware with ZuluSCSI by renaming the root.img and opt.img to HD0.img and HD1.img respectively and dumping them on your SD card. Alternatively you could create a zuluscsi.ini file pointing to the named images, but that's kinda outta scope for this message.


Great work!

I wonder how easy it would be to “dd” the image over to real SCSI disks and have them boot. I’m thinking Zip, Jaz, magneto optical, and possibly actual vintage spinning disks.

I did successfully “dd” the A/UX 3.0.1 CD image onto a Jaz and magneto optical disk and it booted into the installer. Some disk driver magic was required though.
 

foetoid

Well-known member
I wonder how easy it would be to “dd” the image over to real SCSI disks and have them boot. I’m thinking Zip, Jaz, magneto optical, and possibly actual vintage spinning disks.

That's a good question. Unfortunately, I haven't had any SCSI hard drives that I could test this with since moving to Seattle in 2007. I would imagine it should work pretty well since the Mac Driver is part of the partition table... I could be wrong though, it's been a looooong time since I've been hands on with real hardware. Apparently everything got way more expensive too...

In other news, more stuff added to the wiki for configuring the QEMU Dev environment and deploying on bare metal with ZuluSCSI, wrote a little checkpoint script to create backups of your Dev environment as you work so you can restore when you pull a stunt like I did. Here (125MB) are some images for QEMU with jagubox and nleymann's contributions. Getting that all configured is documented in A/UX Dev Image Setup.

Once that's done, the systemupdate shell script should run as it stands. (Admittedly haven't validated that yet.) Just remember to
Bash:
chmod +x systemupdate.sh
before executing it. ;)
 

eharmon

Well-known member
This is great! I was struggling last week with getting the jagubox data onto my machine at all, the images will make this much easier on a physical machine.
 

foetoid

Well-known member
This is great! I was struggling last week with getting the jagubox data onto my machine at all, the images will make this much easier on a physical machine.
One minor omission to note with the jagubox image is that I ripped the Apple.fixes directory. My formatted disk was ~3.5 MB shy of storing the whole thing, and I found that the data in the aws-tuneup-2.0 directory contained within was broke AF, assumed that no one actually wanted the sendmail update, and that some of the other updates were redundant to other locations in jagubox. (I was too lazy to create a larger image, and swap the SD card around...)

It took me a while to find an actual working version of the 2.0 tune up... All of the jagubox mirrors I found easily were bunk, the Apple ftp support archives were a bust, even using waybackmachine downloader. Not sure if bin data was archived as ASCII at some point or what. I'll see if I can reproduce the original source for the non-corrupted 2.0 tune up, but the image from the prior post should at least help. It was late... I didn't do proper documentation...

If I can't re-trace my steps to the working source, I'll upload the working copy I have downloaded to archive.org for future use.

Other notes, updated the checkpoint script to allow notes to be entered and stored in a text file to help keep track of what is being changed from checkpoint to checkpoint. Think of it like a git commit message to tag along with a VM checkpoint/snapshot...
 
Last edited:

MrFahrenheit

Well-known member
One minor omission to note with the jagubox image is that I ripped the Apple.fixes directory. My formatted disk was ~3.5 MB shy of storing the whole thing, and I found that the data in the aws-tuneup-2.0 directory contained within was broke AF, assumed that no one actually wanted the sendmail update, and that some of the other updates were redundant to other locations in jagubox. (I was too lazy to create a larger image, and swap the SD card around...)

It took me a while to find an actual working version of the 2.0 tune up... All of the jagubox mirrors I found easily were bunk, the Apple ftp support archives were a bust, even using waybackmachine downloader. Not sure if bin data was archived as ASCII at some point or what. I'll see if I can reproduce the original source for the non-corrupted 2.0 tune up, but the image from the prior post should at least help. It was late... I didn't do proper documentation...

If I can't re-trace my steps to the working source, I'll upload the working copy I have downloaded to archive.org for future use.

Other notes, updated the checkpoint script to allow notes to be entered and stored in a text file to help keep track of what is being changed from checkpoint to checkpoint. Think of it like a git commit message to tag along with a VM checkpoint/snapshot...

I believe I have a working AWS TuneUp 2.0 direct from Apple on one of the Apple CDs I have. Do you need me to upload that anywhere?
 

foetoid

Well-known member
I believe I have a working AWS TuneUp 2.0 direct from Apple on one of the Apple CDs I have. Do you need me to upload that anywhere?
I did find a working copy, so I should be all set for now.

In other news, I found that jagubox and nleymann images I uploaded need to be recreated. Apparently dropping the data on to an HFS partitions was a bad idea...
 

foetoid

Well-known member
Got sick of swapping SD cards and creating images and passing back and forth between bare metal and QEMU...

Build guide now documents TAP networking so you can access your QEMU VM from your home network. This will allow you to FTP jagubox, etc. over to the machine.

(As far as FTP goes, I've had problems with modern FTP clients with the bog standard A/UX FTP server, that being said, I've been successful with Fetch 4.0.3 under OS 9. Even the ftp client built in to 10.3 wouldn't work)

Oh, and root is disallowed FTP rights OOTB, so you'll either have to change that or setup a non-root user with a home directory to FTP.

In my environment I'm using OS 9 as one of my jump boxes. In this case I have jagubox stored on my NAS (TrueNas) with Apple Services enabled. OS 9 can see it, and I'm transferring straight from the share to A/UX via Fetch.

Setting up the TAP interface

QEMU network config
 
Last edited:

foetoid

Well-known member
And that was going great... Right up until QEMU crashed on the FTP transfer... Crashed so hard that A/UX won't boot now due to inconsistencies. Glad I made that checkpoint tool now. :p
 

foetoid

Well-known member
So, I gave up on trying to do file transfers to the QEMU box. Tried NFS as well with the same results. Starts transferring then crashes. I did get it fixed up though.

Created a blank disk image, fired up the Q610 partitioned it with a *nix partition, spun up NFS and transferred directly from my Win 10 box.

The new image is located here: optsw.zip (141MB)
The documentation on the git wiki is updated
The Google Drive link in post #6 is now dead. That image wouldn't do anyone any good.

Some more generalized notes on usage for those not using it with QEMU.

The disk won't just show up in your A/UX environment, also don't bother hooking this up to a non *nix machine. MacOS will probably just tell you the disk needs to be initialized.

The disk will need to be mounted. The wiki documentation has it designed to be used on SCSI ID 4, but it should work with any SCSI ID, you just need to change your mount command. The partition is slice 4. The "c4" in the mount command denotes your SCSI ID, so if you're not using ID 4, just change it to whatever you're using, leave the rest of it the same.

Below are the commands assuming you don't already have an /opt directory and you're going to dump the contents into /opt...

Bash:
mkdir /mnt/optsw
mkdir /opt
mount -v /dev/dsk/c4d0s4 /mnt/optsw
cp -r /mnt/optsw/jagubox /opt
cp -r /mnt/optsw/nleymann /opt
umount -v /mnt/optsw
rmdir /mnt/optsw

If you get a wild hair and want to DD the image to a SCSI disk, the total image size is 300MB.

You could permanently mount the disk as well should you so desire, this example assumes you don't currently have an /opt directory and want to use this disk as /opt.

Bash:
mkdir /opt
fsentry -t 4.2 /dev/dsk/c4d0s4 /opt

Think that's all the news for today...

Picture of a happy image:
fixedJaguboxImg.PNG
 
Last edited:

uyjulian

Well-known member
Here is an alternative method if you don't want to use filesystem sharing methods...

You can use a tar file as a disk image.

On the Linux or Mac side, create an empty disk image
Code:
truncate -s 512M image.dmg

In the A/UX side, for SCSI ID 1, something like
Code:
tar -cf - /absolute/or/relative/path/to/directory | dd of=/dev/dsk/c1d0s0

Shutdown the emulated system after that is done.

On the disk image, the tar data will end up at offset 0x19800 bytes (why?).

Then, on the Linux or Mac side, something like
Code:
dd if=image.dmg bs=1024 seek=102 | tar -xf - -C /absolute/or/relative/path/to/directory

If you want to do it the opposite way, make sure the tar program is generating compliant archives. One way to do this with GNU tar is with the "--portability" command line argument.


Another tidbit is that you can mount A/UX UFS (not SVFS) filesystems on Linux as read-only.

On the Linux or Mac side, create an empty disk image
Code:
truncate -s 512M image.dmg

In the A/UX side, for SCSI ID 1, create filesystem and mount it
Code:
newfs /dev/dsk/c1d0s0 Other
mkdir /mnt/disk_mount
mount /dev/dsk/c1d0s0 /mnt/disk_mount

Create a file, then unmount it
Code:
echo "Hello World" > /mnt/disk_mount/file.txt
umount /mnt/disk_mount


Shutdown the emulated system after that is done.

On the disk image, the filesystem data will end up at offset 0x19800 bytes (why?).

In the Linux side, mount the disk image (unfortunately read only), then print contents, then unmount
Code:
mkdir /mnt/disk_mount
mount -t ufs -o offset=104448,ufstype=old image.dmg /mnt/disk_mount
cat /mnt/disk_mount/file.txt
umount /mnt/disk_mount
 
Last edited:

foetoid

Well-known member
Thanks @uyjulian. This is all very helpful info, adding it to my private wiki for later :)

Got personal stuff to do this evening, so not a ton of progress today, but here's the current change logs for the systemupdate script.

Markdown (GitHub flavored):
# Change Log
The change log is here to depict the current state of the systemupdate.sh script and what packages are automatically being installed. And general notes.

## 2022-12-14
* Altered backup structure for preserving original bins
* Added the following packages
   * GCC 2.7.2
   * Port-Tools-v4
      * bison
      * chgrp
      * chmod
      * chown
      * dd
      * df
      * du
      * flex
      * gchgrp
      * gchmod
      * gchown
      * gdd
      * gdf
      * gdu
      * ginstall
      * gls
      * gmkdir
      * grmdir
      * less
      * lesskey
      * ls
      * make
      * mkdep
      * mkdir
      * ranlib
      * rmdir

## 2022-12-13

Package Install List:
* gzip
* unzip
* pstree
* bash
* pico
* GNUmake
* telnet
* in.telned
* inetd
* traceroute
* Ntraceroute
* bnet driver
 

foetoid

Well-known member
Soooooo.... New developments.

As I was reading this wiki in more detail, I realized that most, if not all of the work I was trying to accomplish here was already done. So there's been a pivot to the project. I haven't pushed any commits yet, as I'm still testing, and QEMU has proven to be a pretty much worthless test bed for A/UX if you want to do anything network intensive. Don't know why, but whether it's the TAP drivers or running via built-in SLiRP, things crash.

Bare metal dev/test is slow. So it might be a bit before I get to something releasable. Instead of mounting images, etc and jumping through all kinds of hoops, I started writing a script for an online network install for a fresh 3.1.1 bare metal install using pre-compiled packages far newer than jagubox and nleymann in many cases. It's not to say that there isn't opportunity to merge ideas across the lot, and also script some of the quality of life improvements so you end up with a more modern less archaic *nix experience, but that is all still TBD.

Running on bare metal, this script runs for 2hrs+ on a 68040 33Mhz in a Quadra 610 with 64MB of ram (plus whatever's soldered to the MB) with a ZuluSCSI device. 15 min or so on the FTP transfers, a couple min on the decompression and install of the dependencies, and the rest is decompressing the robbraun archive. Still lots to be tested. While the robbraun archive alone meets my personal objectives for A/UX, I'm interested in pursuing a "simple" A/UX install for all the non *nix folks out there.


Script to date:
Bash:
#!/bin/sh
clear
echo ""
echo "   *******************************"
echo "   *  A/UX 3.1.1 Network Update  *"
echo "   *******************************"
echo ""
echo "This script is intended to be used with a FRESH install"
echo "of A/UX 3.1.1."
echo ""
echo "This could be considered an A/UX Tune-Up 2.1 or 3.0 or"
echo "something of that nature."
echo ""
echo "The script contains pre-compiled binaries for more modern,"
echo "or perhaps less out of date *nix software."
echo ""
echo "The software contributions were not of my doing, my contribution"
echo "is this bit of automation."
echo ""
echo "This installation will require 575.9 MB of free space during"
echo "the installation process. 98.9 MB will be release upon completion."
echo ""
echo "To validate free space available, navigate to your /opt directory in"
echo "Finder (if present), or use this conversion to convert displayed blocks to MB free."
echo "Maybe one day this script will get updated to check this for you."
echo ""
echo "Where x = blocks"
echo " x * 0.00048828124999999"
echo ""
df
echo ""
echo "Would you like to proceed? case-sensitive [y/n]"
read ans

if [ $ans = "y" ]

then
    # Validate 3.1.1 installed
    clear
    echo "Validating A/UX Version"
    echo "-----------------------"
    ver=`uname -r`
    if [ $ver = "3.1.1" ]

    then
        # Create /opt directory if not exists
        if [ ! -d /opt ]
        then
            mkdir /opt
        fi
        
        # Get dependencies from FTP server

        clear
        echo "Getting update files from FTP server"
        echo "------------------------------------"
        echo ""

        # Set host to IP of local FTP server or address of mirror that plays nice with A/UX OOTB
        HOST=''
        USER='anonymous'
        # This isn't a real password, just passes FTP anon validation. Please don't ever use this anywhere...
        PASSWD='c@ber.net'

        FILE1='tar-1.13.tar.gz'
        FILE2='aux-usr.local-10172010.tar.bz2'
        FILE3='bzip2-1.0.6.tar.gz'

ftp -inv $HOST <<END_SCRIPT
user $USER $PASSWD
binary
hash
get $FILE1
cd robbraun
get $FILE2
get $FILE3
quit
END_SCRIPT

        echo ""
        echo "Setting up tar 1.13"
        echo "-------------------"
        echo ""

        # Setup tar
        mkdir /tmp/tar
        cp /opt/nwupdate/tar-1.13.tar.gz /tmp/tar
        cd /tmp/tar
        tar -xvf tar-1.13.tar.gz
        mkdir /opt/nwupdate/tarbak
        cp /usr/bin/tar /opt/nwupdate/tarbak
        cp /tmp/tar/tar-1.13/bin/tar /usr/bin
        rm -r /tmp/tar

        echo ""
        echo "Setting up bzip2 1.0.6"
        echo "----------------------"
        echo ""

        # Setup bzip
        mkdir /tmp/bzip
        cd /tmp/bzip
        cp /opt/nwupdate/bzip2-1.0.6.tar.gz /tmp/bzip
        tar -xvzf bzip2-1.0.6.tar.gz
        cp -r /tmp/bzip/usr/local/bzip2-1.0.6 /usr/local

        echo ""
        echo "Restoring the robbraun archive"
        echo "------------------------------"
        echo ""

        # Setup usr/local archive

        mv /opt/nwupdate/aux-usr.local-10172010.tar.bz2 /
        cd /
        /usr/local/bzip2-1.0.6/bin/bunzip2 -v aux-usr.local-10172010.tar.bz2
    
    else
        echo "You must have A/UX 3.1.1 installed for this script to function. Exiting..."
        exit 1
    fi
else
    echo "Installation aborted. Exiting..."
    exit 0
fi
 

james_w

Well-known member
ooh nice, it just so happens I may need something like this in a few weeks time when I have a new arrival...
 

MrFahrenheit

Well-known member
Which version of A/UX are you doing this with? There is the 'File and Print Server' environment version, and the 'Database Server' version.
 

foetoid

Well-known member
Which version of A/UX are you doing this with? There is the 'File and Print Server' environment version, and the 'Database Server' version.
Good question... I wasn't aware there were two different versions released. This is being done with images from the "garden". I remember during the initial install there were options for installing print services, so I'm going to go out on a limb and say it's File & Print.
 
Top