YES it’s real!
I’m using the Linux subystem on Windows, as it’s easier to build this Qemu tree from source. I’m using Debian, but these steps will work on other systems that use Debian as a base.
First thing first, you need to get your system with the needed pre-requisites to compile:
apt-get update;apt-get upgrade apt-get install build-essential pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev
Great with those in place, now clone Artyom Tarasenko’s source repository
git clone --branch 40p-20190406-aix-boots --single-branch https://github.com/artyom-tarasenko/qemu.git
*NOTE from the future (2022) you may want to jump here: to check out building on newer systems. Also don’t forget about networking!
Since the frame buffer apparently isn’t quite working just yet, I configure for something more like a text mode build.
././configure --target-list=ppc-softmmu --disable-sdl --disable-vnc --disable-gtk --disable-gnutls --disable-nettle --disable-gcrypt --disable-spice --disable-numa --disable-libxml2 --disable-werror
Now for me, GCC 7 didn’t build the source cleanly. I had to make a change to the file config-host.mak and remove all references to -Werror. Also I removed the sound hooks, as we won’t need them. remove the following lines:
Now you can build Qemu. it’ll happily build in parallel so feel free to build using the -j parameter with how many cores you have. I have 32, so I use
Okay, all being well you now have a Qemu. Now following the steps from
Artyom Tarasenko’s blog post, we can get started on the install!
First we create a 8GB disk
qemu-img create -f qcow2 aix-hdd.qcow2 8G
Next we need the custom BIOS with serial as the console.
You’ll need some AIX. I tried a 3.2.5 CD-ROM and it didn’t pick up, but AIX 4.3.3 did.
Now with all those bits in place, it’s time to run Qemu.
./ppc-softmmu/qemu-system-ppc -M 40p -bios q40pofw-serial.rom -serial telnet::4441,server -hda aix-hdd.qcow2 -vga none -nographic -net none -cdrom Volume_1.iso
Now telnet to your localhost on port 4441 and you will see the console doing it’s BIOS initialize and eventually drop to the OK prompt.
One trick I’ve found is that from the Open Firmware prompt you can find out what partitions are recognized from the firmware. If it see’s partitions then there is some hope that the image you have is valid enough to boot. In the last few days I’ve found quite a few AIX images, which are lacking the partition table, and unable to boot.
simply type in boot cdrom:2 to kick off the installer. It may take a minute or so for the installer to kick off.
If all goes well, you’ll see the BIOS reload itself, then after a minute you’ll be prompted to press 1 to select the console
It doesn’t echo, don’t panic!
Next select your language. I’m doing English.
Next it’ll ask about installation type. Default ought to be fine.
Because this will destroy the contents of the disk (which doesn’t matter as it’s blank) it’ll prompt for confirmation.
After this it’ll begin the installation. Depending on how fast your disk & CPU is this will take a while.
For me, the installation took about 11 minutes. This is using my Xeon E5-2667 v2. It took 17 minutes on my 2006 Mac Pro, with X5365’s it .
After it’s done, right around the 96% time it’ll reboot back to the BIOS
Once you are back at the OK prompt, you can now boot disk:
it’ll look like it’s hung for a minute, then it’ll start booting from disk!
Once the OS is booted up, you select the terminal type. I’m using putty but I’ll select the vt100. Of note the function keys are selected by hitting escape and then the number key. So F3 is ESC 3.
I’m just going to finish the install, as we can always run smitty to mess with the system more, but right now I’m just interested in a base install of the BOS (Base Operating System, and IBM ISM).
A few moments later, you’ll get dumped to the login prompt.
By default there is no password, so just login as root, and there you go, your very own virtual AIX 4.3 system.
# uname -a AIX localhost 3 4 000000004C00
So there you go! All thanks to Artyom’s hard work!
AIX 4.1 was the first version to support PCI, which was the bus type starting with the PowerPC range. Version 3.2 and older require Micro Channel.
It’s interesting that 4.1 installs directly. Chris Gibson at IBM wrote an article on how to get AIX 7.2 running under QEMU but this requires restoring a mksysb image so you need to already have an AIX LPAR running from where you can collect a mksysb backup.
I think the dump images I found for 4.1 are missing something as the partition table isn’t recognized. That said I remember having a 4.1 iso I could install on both a 43p, and power based 5xx machines.
Also the first ppc version was 3.2.5 on the 7011-250.
Fun little pizza box, although no PCI. And what fun it was that after the 601, not all POWER instructions were available on the PowerPCs.
I’ve got a 7011-250, but I’ve never tried any AIX 3.x on it, and 4.3.3 is pretty glacial. Unfortunately, my fast Ethernet card and sound card aren’t supported in 3.x so I guess I’m stuck with it. Might be fun to mess with though, provided I can find install media.
There is a tidal wave being uploaded to archive. Org
I had one ages ago. But all the software I had was for 4.x so I nuked 3. It’s interesting that there is a floppy set too.
Ah cool! Thanks for the heads-up on that.
Upload finished now.
You are welcome. 🙂 Glad it works for you. Debugging it was fun: whenever something goes wrong, AIX silently hangs. Totally different than Solaris in this respect.
Its because AIX would display an error code on the hardware LCD display, which Sun hardware did not have. I wrote a clock program that displayed current time on the LCD. Lets just say IBM service technicians did not approve.
I assume it’s just a blind write to get the led to display anything?
I wonder if they kept those ports standard…
Nice! Does AIX 4 support PPC ELF? Type `file /bin/ls` please.
mount an aix4 installer .iso install image, mount it with appropriate fs specitication when invoking mount, and then find some binaries and “file” them from your favourite host system – if neozeed remained unreachable 🙂
If AIX has ELF it must be something much later, as I recall it always being COFF.
# file /bin/sh
/bin/sh: executable (RISC System/6000) or object module
I know this isn’t what you are looking for.
AIX uses XCOFF, though I think more recent versions might also handle ELF.
Oooh, thanks for the QEMU hacks Artyom and thanks for the find Jason.
I started working with this in the mid to late 90s on Bull DPX/20s (think drawer cabinet with a block of concrete at the bottom). I bootstrapped Samba on it to manage classrooms with NT4 workstations. It hosted ghost images, $HOME to H:\, web pages (via~/public_html), shell accounts with mail, JDK, C-compilers. It ran Oracle instances and a GCOS 6 emulators too while that poor windows server was sulking in a corner trying not to blue-screen whilst playing BDC.
My current shop tossed the AIX blades for RedHat VMs a few years ago and damn I miss that OS. What is it with AIX that grows on you? The 400+ day uptimes despite patches? The perfect blend of SYSV and BSD? The Rockwell grade of closed source? The absence of Bostic and Stallman’s smelly socks? The admins it attracts? I don’t know.
Probably have to network it over serial, but I’ll give 4.3 a spin. Thanks again.
I got my start on version 3.2(1) on the POWER 520 in college. It was the first time I saw an actual class on learning UNIX as a user, and it was super valuable. During the class I was on one of my local BBS and found this weird thing called SLS Linux. It took about a week to download enough @ 2400 baud to get enough where I could bootstrap it.
The price gulf between consumer 32bit machines (which were still pretty expensive!) and the RISC machines of the day was just so incredibly high. Not to mention the incredible expense of getting your own UNIX @home was just insurmountable to me. If I’d known 386BSD was a thing I’d have used that, but I don’t recall a single peep about it on usenet. For better or worse groups stayed on topic pretty well, so you would learn new things about something, but not necessarily learn about new things.
But AIX was the first real Unix I messed around with for real. Even though in highschool we did have that QNX garbage network on the Unisys ICONs, but I didn’t have any books or resources on Unix, nor did the teachers have any idea how to really use the stuff. Sadly back in the 80’s if it wasn’t in the library it was like being SOL as I just didn’t know enough to order stuff I didn’t know about. Electronic card catalogs just didn’t exist, and I couldn’t order stuff that I just didn’t know about. I really should have paid the $99 and mail ordered coherent, but I was brought up to distrust mail-order stuff. So stupid.
the AMD PCnet driver will load on 4.1.5 but as soon as I try to telnet in, it’ll lock Qemu up hard. I’ll have to build it on a native Linux machine to see if it’s Qemu or what. I tried the following flags:
./ppc-softmmu/qemu-system-ppc -M 40p -bios q40pofw-serial.rom -serial telnet::4441,server -hda aix0.vmdk -vga none -nographic -L pc-bios -net nic,model=pcnet -net user,hostfwd=tcp::42323-:23
./ppc-softmmu/qemu-system-ppc -M 40p -bios q40pofw-serial.rom -serial telnet::4441,server -hda aix0.vmdk -vga none -nographic -L pc-bios -netdev user,id=ethernet.0,hostfwd=tcp::42323-:23 -device pcnet,netdev=ethernet.0
I think it’s a hostfwd bug. I hit it a couple of times with qemu-system-sparc, but had no reliable way to reproduce. Usually it worked like months with no problems. Would be cool if you could make a bug report for it (maybe it’s easier to wait till my patches are accepted in the upstream first though).
The workaround would be a ssh reverse tunnel. You gonna need the ssh client for AIX 4.3.3 though. Don’t know if there is one compatible with the current servers.
BTW, why are you using vmdk? qcow2 has compression and snapshots. Does vmdk have any advantages for non x86 guests?
VMDK will slip into VMWare okay. I always wanted to see if those JFS patches for Linux could actually read a disk from an RS/6000. I suspect the answer is no, but it seemed easier to to use VMDK.
I think it was somewhere in the 0.9-1.0 days that qcow2 broke stuff badly, but I’ve been gunshy on that one for years now….
I noticed that outbound seemed okay, but as soon as I went to go in, it went off the rails.
I have that GNAT GCC thing somewhere, I guess I can go through the motions and build a gcc 2.something chain. pass1 is fine by me.
I’m not sure exactly what you need, but if you’re just looking for GCC, you don’t need to build it yourself unless you want to. There are binaries of GCC 3.0.1 and 3.3.0 in the AIX 4.3 Toolbox (http://www.bullfreeware.com/download/toolbox.aix43.tar.gz), along with a lot of other software for 4.3.3.
It’s more so a call back to sing ADA to fix your system…, where I had re-created the painful steps of getting a bare bones GCC to a RS/6000 over dialup when I was in college, to get something kicked off on the SUN/SPARC emulation in Qemu.
I’m always glad when people make binaries (along with sources/patches) available as this stuff does tend to fall off the face of the earth once people decide it’s all garbage. I just recently found the patches to GAS to generate COFF objects, and the Xenix patches for GCC 1.x, which is another source of frustration in the open source past obliteration efforts.
Speaking of.. there is a lot of gems on this CD-ROM, although they are naturally missing all the big stuff like GCC gnu libs, G++, etc etc.
Nice tutorials and I love all your archeo UNIX articles, which have been a great inspiration during my research. Here is a couple of my additions to the AIX 5.1 on qemu-system-ppc
Nice blog! I see we have some overlap which is always a good thing.
I need to update all the gunkies stuff. SIMH 4.0 is never going to really happen…
Did anyone successfully run an AIX6.1 on Qemu？I’m very interested in that or run an AIX5.3 64bit on Qemu.
In the discord one guy has managed to install 7. Part of the problem is the storage back end doesn’t work right, so he rigged up something to use iSCSI. There was some other mod about removing errors, I forget but it can be done.
0821-510 ifconfig: error calling entry point for /usr/lib/drivers/if_en: Cannot establish a connection to a remote service.
I tried to make the network adaptor work, but got the message, any idea?
I couldn’t get networking working without any problems as of yet.
How to enable network interface (with DHCP)?
When I wrote this the Ethernet interface didn’t work correctly.
does it now qemu 7 has been released
I try to use the configure step but it won’t work. Can you please help me ?
Below is a copy-paste of the cmd window
[email protected]:/home/skoubi# ls
[email protected]:/home/skoubi# cd qemu
[email protected]:/home/skoubi/qemu# ls
CODING_STYLE bootdevice.c exec.c migration qemu-io.c scripts
COPYING bsd-user fpu module-common.c qemu-keymap.c scsi
COPYING.LIB bt-host.c fsdev monitor.c qemu-nbd.c slirp
Changelog bt-vhci.c gdb-xml nbd qemu-nbd.texi stubs
HACKING capstone gdbstub.c net qemu-option-trace.texi target
LICENSE chardev hmp-commands-info.hx numa.c qemu-options-wrapper.h tcg
MAINTAINERS config-temp hmp-commands.hx os-posix.c qemu-options.h tests
Makefile config.log hmp.c os-win32.c qemu-options.hx thunk.c
Makefile.objs configure hmp.h pc-bios qemu-seccomp.c tpm.c
Makefile.target contrib hw po qemu-tech.texi trace
README cpus-common.c include qapi qemu.nsi trace-events
VERSION cpus.c io qdev-monitor.c qemu.sasl ui
accel crypto ioport.c qdict-test-data.txt qga util
arch_init.c default-configs iothread.c qemu-bridge-helper.c qmp.c version.rc
audio device-hotplug.c job-qmp.c qemu-deprecated.texi qobject vl.c
backends device_tree.c job.c qemu-doc.texi qom win_dump.c
balloon.c disas libdecnumber qemu-edid.c qtest.c win_dump.h
block disas.c linux-headers qemu-ga.texi replay
block.c dma-helpers.c linux-user qemu-img-cmds.hx replication.c
blockdev-nbd.c docs memory.c qemu-img.c replication.h
blockdev.c dtc memory_ldst.inc.c qemu-img.texi roms
blockjob.c dump.c memory_mapping.c qemu-io-cmds.c rules.mak
[email protected]:/home/skoubi/qemu# ./configure –target-list=ppc-softmmu –disable-sdl –disable-vnc –disable-gtk
ERROR: Python not found. Use –python=/path/to/python
So you need a Python. Probably all kinds of other things too.
Don’t panic just read the last line.
What OS is that? You’ll want their instructions on installing Python.
Thanks for the fast reply !
I have Linux Subsystem on Windows and downloaded and installed from the App Store the Ubuntu 18.04 LTS. I have read that Ubuntu is based on Debian, so I chose that distro.
ok do this as root… (sudo bash)
apt-get install build-essential python
that should get things going for you… 🙂
Or try this:
apt-get build-dep qemu-system-ppc
Read the manpage pls before, HTH:
[email protected]:0:~$ dpkg -l | grep qemu-system-ppc | tr -s ‘ ‘
ii qemu-system-ppc 1:2.5+dfsg-5ubuntu10.39 amd64 QEMU full system emulation binaries (ppc)
[email protected]:0:~$ man apt-get | sed ‘/^ *build-dep *$/,/^$/!d’
build-dep causes apt-get to install/remove packages in an attempt
to satisfy the build dependencies for a source package. By default
the dependencies are satisfied to build the package natively. If
desired a host-architecture can be specified with the
–host-architecture option instead.
/.configure run smoothly, then I used vim to remove the the CONFIG lines but make returned errors. I deleted qemu folder, started again and used make (without -j, it gave me errors). That went ok too. Then I tried to create the image with the qemu-img and the below message came up. Strange though since the qemu folder contains the qemu-img.
[email protected]:~/qemu# qemu-img create -f qcow2 aix-hdd.qcow2 8G
Command ‘qemu-img’ not found, but can be installed with:
apt install qemu-utils
The current directory isn’t in your path
That’ll tell your shell to run the one where you are.
UNIX isn’t like CMD in this (and many) regards.
I did it !
Thanks neozeed and everyone else for their advice.
A couple of points, that i ran into, since I’m not an experienced linux user and would like to mention for anyone else interested..
1. I used WSL (Linux Subsystem on Windows). It is easily available from Microsoft herself.
2. From the Windows App store , I chose Ubuntu and it was installed automatically. (note: It installs the bare minimum for terminal purposes)
3. Installed Python (per neozeed): apt-get install build-essential python
4.In order to change config-host.mak , you have to be able to edit it. Simple, yes ? No, not at all when you don’t know jack about linux. I had to learn a bit the vim editor. So : vim config-host.mak. There I deleted the -Werror references towards the end of file.
Don’t delete the lines :
because the make command will ask for them and give you errors. Instead change them to :
5. I used the make command without parameters (-j4 for my i7 cpu, didn’t work) The whole compile process took about 10-15 minutes.
6. Inside the qemu folder run :. /qemu-img (as neozeed said, Unix isn’t MS-DOS)
I had to devote a fair amount of time, reading various links about the commands in linux, but it was worth it.
Now I want to try and install the CDE environment and afterwards the CATIA V4 CAD/CAM. I can only imagine that it will take me a lot of time but thanks to you I’m off to a good start.
I was wondering if these patches/additions have made it upstream yet, as in QEMU 4.1.0 ? Or if not, when that is expected to happen ?
Thanks a Lot for this article; I’m trying to get AIX 4.3.3 to work with newtorking; I’m using this command:
./ppc-softmmu/qemu-system-ppc -M 40p -bios q40pofw-serial.rom -serial telnet::4441,server -hda aix-hdd.qcow2 -vga none -nographic -netdev tap,id=mynet0 -device model=ne2K_isa, -cdrom Volume_1.iso
However I get this error:
qemu-system-ppc: network script /etc/qemu-ifup failed with status 256
Is there any way I can mark /etc/qemu-ifup as executeable? I cannot seem to locate this script anywhere. (Either in the ETC or other directories).
Hi, running into this issue when running configure:
./configure –target-list=ppc-softmmu –disable-sdl –disable-vnc
ERROR: Unknown target name ‘ppc-softmmu’
Running gentoo linux (honestly fuck debian), anything I could be missing?
did you clone it from the git repo?
Sounds like you have something weird going on source wise, like something newer where ppc has been split into 32bit/64bit
Thanks for writing back! Yes, I did in fact clone it from the repo, but as far as the ‘split’ your talking about, that’s something I never took into consideration; documentation on my specific issue has been nonexistent and good luck going to qemu IRC about it, basically no one’s on there to take your question.
I *did* get a hold of Aqemu, a GUI to qemu that was hosted on Gentoo’s Portage repo. It could point to the cloned git but it needed a ‘binary executable’ that i just can’t seem to find :/
Hi all! Anybody had any luck with networking? Drivers load and ethernet shows in BIOS but no card detected in smitty..
Output of BIOS when pcnet is loaded or e2k_isa
scsi disk tape
QEMU PReP/40p, Serial #0, 128 MiB memory installed
Open Firmware, built April 13, 2019 09:29:23
Copyright (c) 1995-2000, FirmWorks.
Copyright (c) 2014,2017,2019 Artyom Tarasenko.
I got the Ethernet working under 4.3.3 with the pcnet driver.
I then used the Lance Ethernet ODM updates on Artyom’s website.
# cat > lance-chg.asc
name = “ent0”
attribute = “busio”
value = “0x01000000”
type = “O”
generic = “D”
rep = “nr”
nls_index = 3
odmchange -o CuAt -q “name=ent0 and attribute=busio” lance-chg.asc
rmdev -l ent0
mkdev -l ent0
Both SMIT/smitty tcpip or mktcpip will work after you made the devices. I’ve been using the AIX VM to run NIM so that I can bring a 43P-150 back to life as an AIX 4.3.3 machine.
This is my command line for the VM.
/opt/aix-qemu/bin/qemu-system-ppc -M 40p -bios q40pofw-serial.rom \
-hda /vm/sheridan.qcow \
-cdrom “aix433_cd1.iso” \
-nic bridge,model=pcnet,mac=02:00:01:00:00:0B \
-vga none -nographic \
-serial telnet::1008,server,nowait \
-monitor telnet::1009,server,nowait \
Hello, I’m trying to set up a QEMU environment with AIX 5.3, I tested it with two different images (5.3 and 7.1) and I always have the result below, that is, only one item appears in the list of cdrom, and when I try to use it I get the message. I set up the iso volume on Windows and Linux and it seems to be normal. what could be happening? I tried to download htps: //winworldpc.com but was unsuccessful with IPFS
Partition Region Boot Format SIze (MB)
1 Primary Yes 0x96 610
Ok boot cdrom:1
Boot device: /scsi/[email protected]:1 Arguments
The attempt to load a boot image failed
what is the full command line argument you are using, and what emulator in Qemu?
Hi, how are you! I resumed the installation of AIX, installed QEMU exactly as it is in this document and downloaded AIX4.3 (Volume_1), ran configure and make successfully, and ran qemu-syste-ppc successfully, exactly the same parameters as in this document .
I open a telnet checking the server, I receive the screen with ‘ok’ and type .partition cdrom, and return the two partitions exactly as in the ‘print’. Boot cdrom: 2 and return:
ok .partitions cdrom
Boot Format Size (MB)
1 Primary Yes 0x96 630
2 Primary Yes 0x41 3
ok boot cdrom:2
Boot device: /scsi/[email protected]:2 Arguments:
Rebooting in the correct mode for this client program …
Type ‘i’ to interrupt stand-init sequence
after that nothing happens, What can it be?what can it be?
after a few attempts, and other actions, I resolved it by simple and run ‘boot cdrom: 2 -i’ including the ‘-i’ parameter and it worked !!!
I have an AIX mksysb tape (8MM – 112m) from a system with a 2GB hard drive (4.x – pizza box Power1 system). I have it attached to Linux and would like to be able to get the mksysb off the tape so that I can use it with the above. Any idea on how to do this properly with dd? Every block size and device I’ve tried have failed (/dev/nst0, /dev/st0, bs=512, bs=1024, etc). I keep getting an I/O error.
offhand I have no idea.
those tapes ‘just worked’ as is and were driven by the ROM. It’s sadly not like the source to mksysb is floating around.
I was able to dump the third partition on the tape to a file with DD. Typing “file” on the file says it’s an AIX Backup/Restore file format. So, maybe I can try restoring it inside Qemu. Be an interesting project to do for fun!
Great! Good luck with the restore!
Nice tutorial 😉
Btw, I have a stock AIX 4.3.0 CDROM and i want to install it on the VM following your process.
What is the correct way to create an iso with partition table from this CDROM ? I am on Windows and I already tried 4 different ISO software and no one can create a correct ISO with correct partitions…
I have the same issue…
I used readcd. part of the mkisofs tools. make sure the CD actually has the table, \\.\D: or \\.\physicaldrive6
or whatever your CD is
Hello, I tried to deal with readcd tool without success… Then, using dd tool I successfully build an iso, but with a bad partition table…
Here is the partition table when the iso is mount using -cdrom
ok .partitions cdrom
Partition Region Boot Format Size (MB)
1 Primary Yes 0x41 3
ok boot cdrom
Boot device: /scsi/[email protected] Arguments:
Unrecognized program format
And here is the partition table when iso is mount using -drive…
ok .partitions cdrom
Partition Region Boot Format Size (MB)
1 Primary Yes 0x84 65543
2 Primary Yes 0x85 65560
3 Primary Yes 0x87 65543
4 Primary Yes 0x87 65549
ok boot cdrom
Boot device: /scsi/[email protected] Arguments:
Can’t open disk label package
It looks like my iso is still not good…
I think newer versions of Windows are blocking direct device access, as it’s such a great way to destroy a machine… it seems like many of my old tricks don’t work so well or at all…
I use the dd command in Cygwin on my Windows 10 PC. I launch Cygwin64 Terminal as Administrator and I can then do dd if=/dev/sr0 of=test.iso bs=1M to get a raw ISO copy of the DVD.
I know some people don’t like Cygwin as it’s difficult to uninstall once installed. But to me it’s still better than WSL2 and only because of the block-level access to storage.
I just downloaded the boot ROM for the RS/6000 7020 40p plus the patch files to upgrade it. I wonder if it will work with QEMU. The READE says;
The boot rom for the IBM RS/6000 40p workstation, dumped and identical to the images on the floppies.
As a bonus, the exe files are the original IBM firmware updates/SMS disks with different boot ROM revisions. 702040p.exe has the password of “**RS/6000**”.