Saturday, December 2, 2017

AIX 5.1 boots under QEMU

Yoo-Hoo! I did it again. Now it’s the second achievement in the emulation of the proprietary (aka real) UNIX systems.  The Solaris/SPARC run first in December 2009, and now 8 years later, AIX 5.1 boots under QEMU. And even the S3-Trio framebuffer works, thanks to Hervé.  Looks pretty cool. Once I have the X-Window running I’ll make a screencast. For now, just a teaser:

AIX5.1 under qemu-system-ppc -M 40p

QEMU PReP, Serial #0, 128 MiB memory installed
Open Firmware , Built  December 01, 2017 16:41:00
Copyright (c) 1995-2000, FirmWorks.
Copyright (c) 2014,2017, Artyom Tarasenko.

Rebooting with command: boot /pci/scsi@1/disk@0,0
Boot device: /pci/scsi@1/disk@0,0  Arguments: 

Saving Base Customize Data to boot disk
Starting the sync daemon
Starting the error daemon
System initialization completed.
Starting Multi-user Initialization
 Performing auto-varyon of Volume Groups 
 Activating all paging spaces 
0517-075 swapon: Paging device /dev/hd6 is already active.
/dev/rhd1 (/home): ** Unmounted cleanly - Check suppressed
/dev/rhd10opt (/opt): ** Unmounted cleanly - Check suppressed
 Performing all automatic mounts 
Multi-user initialization completed
Checking for srcmstr active...complete
Starting tcpip daemons:
0513-059 The syslogd Subsystem has been started. Subsystem PID is 4408.
0513-059 The sendmail Subsystem has been started. Subsystem PID is 3402.
0513-059 The portmap Subsystem has been started. Subsystem PID is 4646.
0513-059 The inetd Subsystem has been started. Subsystem PID is 5160.
0513-059 The snmpd Subsystem has been started. Subsystem PID is 4904.
0513-059 The hostmibd Subsystem has been started. Subsystem PID is 5936.
Finished starting tcpip daemons.
Starting NFS services:
0513-059 The biod Subsystem has been started. Subsystem PID is 8000.
0513-059 The rpc.lockd Subsystem has been started. Subsystem PID is 7494.
Completed NFS services.
...
AIX Version 5
(C) Copyrights by IBM and by others 1982, 2000.
Console login: root
*******************************************************************************
*                                                                             *
*                                                                             *
*  Welcome to AIX Version 5.1!                                                *
*                                                                             *
*                                                                             *
*  Please see the README file in /usr/lpp/bos for information pertinent to    *
*  this release of the AIX Operating System.                                  *
*                                                                             *
*                                                                             *
*******************************************************************************
Last login: Wed Dec 31 18:45:33 CST 1969 on /dev/tty0

#  who -r
   .        run-level 2 Dec 31 18:05       2    0    S                  
# uname -a
AIX localhost 1 5 000000004C00
#

23 comments:

Alexander Shukin said...

Класс! Но как вышло, что я не видел этого поста до сих пор, если он еще декабрьский?
Очевидно, я не смогу это повторить без особой прошивки?

Unknown said...

same here, I see this post only yesterday.

Unknown said...

Can you share how you booted it up ?

Unknown said...

+1 , sharing boot command options and setup detail will be be really usefull.

atar said...

Alexander Shukin, он был черновиком - хотел видео добавить. Через неделю после ачивки навалились реальные проблемы на работе и было не до того. Но пауза позволила оценить объём реальной аудитории - писал об успехах на aixportal.ru ещё в ноябре, но отклика не последовало. Так что добавил скрин и запостил как есть, просто чтобы самому не забыть, докуда доходил.

atar said...

@DoktorCranium with some small patches and OFW.

atar said...

@Marco Ancillotti, did you happen to work with pcnet (kent) driver? It didn't work for me out of the box, I had to hack the driver. Wrote about it some time ago here: https://aixportal.ru/forums/topic/ne2000-под-aix-5-1/ . It's in Russian, but the main part are the logs. The problem was: busio 0x10000 - way to small. Either pcnet didn't work on a real 40p machines, or there are still some bugs in the emulation.

atar said...

@DoktorCranium, but you have a video of booting AIX 7.2 using SLOF. Why bother with 5.1?

Unknown said...

> @Marco Ancillotti, did you happen to work with pcnet (kent) driver? It didn't work
> for me out of the box, I had to hack the driver. Wrote about it some time ago here:
> https://aixportal.ru/forums/topic/ne2000-под-aix-5-1/ . It's in Russian, but the
> main part are the logs. The problem was: busio 0x10000 - way to small. Either pcnet
> didn't work on a real 40p machines, or there are still some bugs in the emulation.

@atar , have you try to use the e1000 adapter ? aix have a builtin driver that works really well almost on real hw.
Can you share with me your source ? I've a lot of version of aix to try and also a lot of experience with the system.

Unknown said...

I hope you show how to install it on QEMU, I'm definitely interested. Thanks for all your hard work!

Unknown said...

We can get AIX 7.2 in QEMU
https://www.ibm.com/developerworks/community/blogs/cgaix/entry/AIX_7_2_running_on_my_Macbook?lang=ru_ru

Unknown said...

Thank you very much for making this post!
Just wanted to ask - is there any chance to see the parameters you ran qemu with?

atar said...

After all I think I'll publish the hacks to boot AIX 5.1 under QEMU. There is some interest out there, mostly from enthusiasts. So, I will clean up my 40p tree and rebase it to the current master. Probably not this weekend though.

Ralf Schmitt said...

I'm just playing here with AIX 5.3 and qemu. The link:

https://aixportal.ru/forums/topic/ne2000-под- aix-5-1/

is dead. Is there a "copy" of these information on an other site?

fultontech said...

I recall trying to upgrade to 4.3.3 on the ThinkPad 820 and having to mix in drivers and filesets from 4.1 and 4.2.1 to get it to work. I suspect it may be the same to get some things working with QEMU and KVM.

Anonymous said...

Hi, Any update on what we need to do to duplicate how you booted 5.1 on qemu. really interested in setting up a test environment

Unknown said...

Hi all, if anyone have cmd line and info to run aix 5.x please share I'm really interested but can't find any news. @atar please share your achievement's :-D

atar said...

@Marco Ancillotti Will do :-D. What are you going to run under it?

Ralf Schmitt said...

AIX 7.2 works quite well with QEMU (minor problems), but it would be really nice to run older versions "for historical reasons". Would be fun to try if it's possible to run HACMP v5.2 (Heartbeat with a virtual network interface and a shared iSCSI disk).

Back to the time when there was no Cloud/NoSQL/Node.js/Pink Snowflake Weenies.

And I want my Y2k problem back ;-)

I have an old IBM 9115 p505 with an enabled LPAR feature to run two (or more) instances of AIX as a HACMP cluster, but this thing is loud as hell.

And my RS/6000 7046 B50 is slow and only 32 bit.

QEMU with old versions of AIX could also be useful to "live" the history of the Hercules Mainframe Emulator on RS/6000 and pSeries.

Please release your patches for QEMU.

Regards

Ralf Schmitt

Anonymous said...

I have two old 43p systems on aix4.3 and one good 9111 system which is on aix7.1.
I am retired but a couple times a year I make a change to software I wrote and by carefully linking the code I do the actual changes on aix7.1 but have it backward compatible with aix4.3. It would be nice to have a emulated 5.1 to do a cursory check of code if my old box's fail. It also is just a real interesting thing to have a look at.

atar said...

@Ralf Schmitt Getting the Y2K problem back may be tricky :-). At least AIX 5.1 doesn't seem to have it. Concerning iSCSI - does QEMU have any iSCSI adapter which can potentially be supported by AIX 5.1 (or below)?

Speaking of that: are there any external drivers for PCI (or ISA) cards for AIX 5.1? I was wondering if it can support SATA or any other devices present in QEMU, but didn't find much. It sort of sees the ISA IDE, but anything else is not on the install disk.

Ralf Schmitt said...

Let me try iSCSI with AIX 7.2 on QEMU. It could work but even VIOS has a lot of limitations:

- There is no VIOS boot support using iSCSI disk.
- There is no support for flat file based discovery policy.
- There is no support for iSCSI based LV backed devices. .
- There is no support for Shared Storage Pools using iSCSI disks as either Repo or Shared pool disks.
- iSCSI disks or iSCSI based LVs or VGs cannot be used as paging devices for Active Memory Sharing (AMS) or Remote Restart support.
- If the backing device is an iSCSI disk, the client_reserve and mirrored attribute for the virtual target devices will not be supported.

I have the installation media of AIX 5.2 and 5.3. With these versions an iSCSI interface (iscsi0) can be mapped to an ordinary network interface (ent0). Networking works with 7.2, so I guess that the virtual network interface should also be usable with iSCSI

Here is how to do it:

https://www.ibm.com/developerworks/community/wikis/home?lang=pt-br#!/wiki/Power%20Systems/page/iSCSI%20Support%20on%20PowerVM

I down't know if this also works with AIX 5.1 and if MPIO would be supported.

I have only an old version of VIOS (7/2007) for Power5. Used it with AIX 5.3 LPARs and I have not tried to run it with QEMU.

I also should have the installation media of AIX 4.3. Haven't seen them for a while, but they should still be somewhere around here.

Regards,

Ralf Schmitt

atar said...

Wrote a How-To. The feedback is welcome :)