Revisiting AIX 4.3 on Qemu

I had gone over the install a while ago, but I wanted to re-install on a newer machine. And going from GCC 7 to 11, well a number of things changed. And I found with experience that letting Qemu select as much as it wants leads to numerous dependencies that end up being problematic.

[email protected]:~/atar-boot/qemu/ppc-softmmu$ objdump -p qemu-system-ppc | grep NEEDED

So using the same atar qemu git dump, I found the newer config string a bit more refined:

./configure --target-list=ppc-softmmu --disable-sdl --disable-vnc --disable-gtk --disable-gnutls --disable-nettle --disable-gcrypt --disable-spice --disable-numa --disable-libxml2 --disable-vde --disable-werror --disable-seccomp --disable-capstone --disable-vhost-net --disable-vhost-crypto --disable-vhost-scsi --disable-vhost-vsock --disable-vhost-user --disable-tpm --disable-live-block-migration

Another fun think is that there is submodules from other servers, and it seems their certs have expired.. Which also means it’s inevitable at some point this will become impossible to build. Be sure to set this environment variable in order to build:

export GIT_SSL_NO_VERIFY=true

As always Qemu will try to sneak a few things in there that we don’t need like audio support. As an example here is what I trimmed from config-host.mak:

$ diff -ruN config-host.mak config-host.mak-cutdown
--- config-host.mak 2022-11-08 09:37:41.104441392 +0000
+++ config-host.mak-cutdown 2022-11-08 09:37:25.084441253 +0000
@@ -27,8 +27,8 @@
@@ -72,7 +72,6 @@
@@ -164,7 +163,7 @@
LIBS_QGA+=-lm -lgthread-2.0 -pthread -lglib-2.0
POD2MAN=pod2man --utf8

And this cuts down the needed dll’s to:

[email protected]:~/atar-boot/qemu/ppc-softmmu$ objdump -p qemu-system-ppc | grep NEED

which is a bit better. I’m still annoyed at it’s reliance on pixman despite not having any framebuffer support, I’m guessing I could amputate it if I looked further.

AIX 4.3 booted!

Since nothing has fundamentally changed, I can still use my original bootflags:

./qemu-system-ppc -M 40p -bios q40pofw-serial.rom -serial telnet::4441,server -hda disk0.vmdk-post-install -vga none -nographic -net none -cdrom /mnt/c/temp/xlc13-gzip.iso

And for the heck of it, this is the steps I used to get xlC 1.3 up and running:

restore -f /tmp/xlc/xlccmp2
restore -f /tmp/xlc/xlccmpmE2
chmod +x /usr/bin/xlc
chmod +x /usr/lpp/xlc/bin/xlcentry
chmod +x /usr/lpp/xlc/bin/dis
cp /usr/lpp/xlccmp/inst_root/etc/xlc.cfg /etc
cp /tmp/xlc/cpp /usr/lib/cpp
chmod +x /usr/lib/cpp

and with that all in place we can compile a simple hello world!

# cat mt.c
#include <stdio.h>
void main(){
printf("hi from C\n");
# xlc -v mt.c -o mt
exec: /usr/lpp/xlc/bin/xlcentry(xlcentry,mt.c,mt.o,mt.lst,-D_ANSI_C_SOURCE,-D_IBMR2,-D_AIX,-D_AIX32,-qansialias,NULL)
exec: /bin/ld(ld,-H512,-T512,-bhalt:4,-o,mt,/lib/crt0.o,mt.o,-lc,NULL)
unlink: mt.o
# ./mt
hi from C

xlC is also capable of building a running GNU Chess. And I updated the git so that book building works. Not that I expect anyone to care.

Compiling book, please wait…
186 games added, 3384 positions added, 3383 total positions in book

It has the same desire to move pieces back and forth for thousands of moves, but it’s doing a heck of a lot more than any modern C compiler.

Since we don’t have any networking, Everything is on the console. I’ve found making CD-ROM images being a much easier way to get data in, and I’m still using uuencode to get data out from the console. I guess I should setup Z-modem at some point but that’s very futuristic. Or just break down and learn how to use C-kermit.

My go to quality of life startup is:

export TERM=vt100
stty erase ^?
export LIBPATH=$LIBPATH:/usr/lib
export PATH=/usr/local/bin:$PATH

Sure not perfect but it makes it slightly more usable. As a follow on, I got networking working here: Networking on AIXI 4.3

Space Cadet 3D Pinball reverse engineered!

With all the controversy over 64bit pinball, and where and how things appeared, then disappeared to the discovery that the x64 version was a thing, but it was left off the install manifest but shipped on CD, along with my simple script to just extract it, the problem was that ARM32/64 users were left in the cold.

Don’t get me wrong, the original 32bit exe runs fine under emulation, but who wants emulation when you can have NATIVE CODE?! You’d have to try to find the source code (lol good luck!) or reverse engineer the program. And that’s what happened, enter:

k4zmu2a/SpaceCadetPinball: Decompilation of 3D Pinball for Windows – Space Cadet (

64bit ARM Pinball!

I’m using Visual Studio 2019 to build this, and it was great it *just worked*. Hurray!

There is also a rebuild going on for SDL to bring Space Cadet Pin Ball to Linux and beyond. The only downside is that it uses a number of ‘new C++ features’ locking out older platforms. I’d done some work to dumb it down although there is a bit of this new fangled C++ I’m unsure of what is going on. So that means, unfortunately Itanium users are left in the dark, as Visual Studio 2010 is too old.

AMD64 Pinball extravaganza!

With all the talk of 64bit versions of Pinball I thought I’d share simple script to extract Pinball from an XP x64 CD-ROM so you can take it with you. It’s portable so thats nice too, although it doesn’t use any wad/pak/zip files so all the assets are loose files:

expand f:\amd64\font.da_ font.dat
expand f:\amd64\pinball.da_ pinball.dat
expand f:\amd64\pinball.ex_ pinball.exe
expand f:\amd64\pinball.in_ pinball.inf
expand f:\amd64\pinball.mi_ pinball.mid
expand f:\amd64\pinball2.mi_ pinball2.mid
expand f:\amd64\sound1.wa_ sound1.wav
expand f:\amd64\sound104.wa_ sound104.wav
expand f:\amd64\sound105.wa_ sound105.wav
expand f:\amd64\sound108.wa_ sound108.wav
expand f:\amd64\sound111.wa_ sound111.wav
expand f:\amd64\sound112.wa_ sound112.wav
expand f:\amd64\sound12.wa_ sound12.wav
expand f:\amd64\sound13.wa_ sound13.wav
expand f:\amd64\sound131.wa_ sound131.wav
expand f:\amd64\sound136.wa_ sound136.wav
expand f:\amd64\sound14.wa_ sound14.wav
expand f:\amd64\sound16.wa_ sound16.wav
expand f:\amd64\sound17.wa_ sound17.wav
expand f:\amd64\sound18.wa_ sound18.wav
expand f:\amd64\sound181.wa_ sound181.wav
expand f:\amd64\sound19.wa_ sound19.wav
expand f:\amd64\sound20.wa_ sound20.wav
expand f:\amd64\sound21.wa_ sound21.wav
expand f:\amd64\sound22.wa_ sound22.wav
expand f:\amd64\sound24.wa_ sound24.wav
expand f:\amd64\sound240.wa_ sound240.wav
expand f:\amd64\sound243.wa_ sound243.wav
expand f:\amd64\sound25.wa_ sound25.wav
expand f:\amd64\sound26.wa_ sound26.wav
expand f:\amd64\sound27.wa_ sound27.wav
expand f:\amd64\sound28.wa_ sound28.wav
expand f:\amd64\sound29.wa_ sound29.wav
expand f:\amd64\sound3.wa_ sound3.wav
expand f:\amd64\sound30.wa_ sound30.wav
expand f:\amd64\sound34.wa_ sound34.wav
expand f:\amd64\sound35.wa_ sound35.wav
expand f:\amd64\sound36.wa_ sound36.wav
expand f:\amd64\sound38.wa_ sound38.wav
expand f:\amd64\sound39.wa_ sound39.wav
expand f:\amd64\sound4.wa_ sound4.wav
expand f:\amd64\sound42.wa_ sound42.wav
expand f:\amd64\sound43.wa_ sound43.wav
expand f:\amd64\sound45.wa_ sound45.wav
expand f:\amd64\sound49.wa_ sound49.wav
expand f:\amd64\sound49d.wa_ sound49d.wav
expand f:\amd64\sound5.wa_ sound5.wav
expand f:\amd64\sound50.wa_ sound50.wav
expand f:\amd64\sound528.wa_ sound528.wav
expand f:\amd64\sound53.wa_ sound53.wav
expand f:\amd64\sound54.wa_ sound54.wav
expand f:\amd64\sound55.wa_ sound55.wav
expand f:\amd64\sound560.wa_ sound560.wav
expand f:\amd64\sound563.wa_ sound563.wav
expand f:\amd64\sound57.wa_ sound57.wav
expand f:\amd64\sound58.wa_ sound58.wav
expand f:\amd64\sound6.wa_ sound6.wav
expand f:\amd64\sound65.wa_ sound65.wav
expand f:\amd64\sound68.wa_ sound68.wav
expand f:\amd64\sound7.wa_ sound7.wav
expand f:\amd64\sound713.wa_ sound713.wav
expand f:\amd64\sound735.wa_ sound735.wav
expand f:\amd64\sound8.wa_ sound8.wav
expand f:\amd64\sound827.wa_ sound827.wav
expand f:\amd64\sound9.wa_ sound9.wav
expand f:\amd64\sound999.wa_ sound999.wav
expand f:\amd64\table.bm_ table.bmp
copy f:\amd64\WAVEMIX.inf WAVEMIX.INF

Naturally you’ll want to substitute F:\ with whatever drive letter your CD-ROM/ISO file is mounted on.

And thanks to a long needed feature in Windows 10 you can verify that yes indeed it is a 64bit version.

Isn’t that awesome?! Obviously ARM64 users are left out in the dark, as far as I know there was no ARM64 versions of Windows XP. As a matter of fact, was there any public versions of Windows XP for ARM? Naturally the Surface RT shipped with 8.0

Anyways at long last we can have our 64bit pinball despite the weird bugs, and how the plunger is mostly hidden no doubt due to yet more weird floating point/integer size inconsistencies

So I was offered a MacPro 6.1 aka the trashcan.

And well it’s a Mac. I did the Windows Key + R to boot into recovery mode and install some old version of OS X over the internet. Nice.

I updated to Catalina and kind of forgot about the break with the ‘awesome world of home 32bit computing’ as it’s all 64bit now.

Needless to say none of my favourite stuff runs.

I’ve been maintaining a subscription to Crossover for a while, as I really like to support the future of Wine. I know a while back they too had the 64bit freakout, but they apparently found some shim to keep on running Win32 apps. And sure enough I loaded up my old Fortran Power Station bottle and it actually run!

Fortran on OS X!

Sadly SQL Server 4.21 seems to lock up, but it has been doing that under Wine when I last gave up on OS X a few years back. I tried some Win16 games (SimCity) and it bombed out. Looks like there is no support for Win16 apps. Pitty.

Steam is 64bit now, however none of Valve’s hits that have 64bit versions for Windows have made the 64bit leap for OS X. I have a feeling it’ll never happen as OS X users are so few and far between they are literally outnumbered by Linux users.

I did fire-up Subnautica, and of course the PC with the RTX 2070 blows this thing away. Although it’s hardly a fare competition. But who wants to play fare?

It’s far too early to really tell, and who knows I might just wipe this thing and install Windows. In my opinion OS X 10.6 was the greatest release ever bridging the divide from PowerPC to x86, just as 10.2.7 on the G5 was the greatest PowerPC version to bridge that 68000 divide. I still have that G5, but now my 2006 machine is dead. I’ve seen them in the used stores for around $100 USD. Although I don’t know if I can be bothered as they are incredibly heavy. And I’m pretty sure 10.6 will run on VMWare thanks to hackintosh efforts.

Also I should add as a personal note, my 2006 MacPro 1,1 died. I let someone else use it, and she broke it in one day. I’ve had it for years, several moves in the USA, then to Canada, then to Hong Kong. It died with only one day on the job. Sad.

Apple kills 32bit software

I know it’s been a long time coming but here we are. Such a shame compatibility isn’t a priority. No more crazy stuff like running GCC 1.3 on OS X.

I got this email yesterday :

If you use CrossOver for macOS, this information is VERY IMPORTANT for you.

Earlier today, Apple released the new macOS Catalina. Catalina does not support 32-bit applications. Currently, CrossOver still uses pieces of 32-bit code for every function and will not launch or install any Windows apps in Catalina. If CrossOver is critical to you macOS experience, we ask that you wait on upgrading to Catalina until we release a Catalina compatible version.

At this time, we anticipate that an alpha version will be available sometime in the next 30 days. We will continue to update you as development progresses.

Apple releases the Cheese grater MK II!

As someone who’s owned a few G5’s over the years, and 2 intel ‘cheese grater/Mac Pros’ this is like exciting news! Although I don’t see why this machine took YEARS to churn out after the trashcan fire, but here we go!

Mmmm Cheese

Somehow the aesthetic is even more cheese grater than the prior G5/Pro’s. Almost a desperate call back to pros saying you missed the grater, so here it is again! Now with more grating action, and like the iPhone now with rounded corners!

Single Processor!

One thing I’ve heard time and time again is that XNU really struggles with multiprocessor setups. And I guess we’ve hit that peak as that 2013 Mac Pro was single processor, and the new Mac Pro continues in this trend with a single processor, a Xeon from the ‘W’ or workstation lineup. Which I guess isn’t all that surprising.

The real great thing is expandibility is back! SLOTS SLOTS SLOTS! Although there is no front 3.5mm RCA audio (lol remember that?!) there is 2 USB-C on the top of the case for somewhat accessible ports. Still not too bad.

Another quick to open and upgrade machine. Just like the good old days of the cheese grater!

Although many were hoping for an end to the NVIDIA embargo, bringing CUDA to the table, there was no such luck. Instead the whole ‘dual GPU’ thing was doubled down on.

Radeon Pro Vega II Duo

Bundled is the Radeon Pro Vega II Duo card, featuring dual GPU’s on the same card. Although the case is now large enough for two of these cards giving you 4 GPUs in the box.

So far, so good right?!

And then there is the expected MSRP. $5,999 USD. For the cheapest ‘base’ model featuring a bare 8 core, 16 threaded processor clocking in at 3.5Ghz.

However this does mean for people who want to collect old Mac stuff, the trashcans are no doubt going to crash in price. If you enjoy having a stack of external peripherals, and wires and cables everywhere. Kind of like the old Power Mac G4 Cube.

T’is the season for upgrades!

I’ve had this 2006 MacPro for quite a while. I’ve taken it home as didn’t have a ‘good’ home machine as I have my better stuff in the office. Anyways the machine is far obsolete with 10.7 being the last official release supported, and although you can treat it like a hackintosh and go much further, Apple is making their binaries tuned heavy enough that all the spectre/meltdown patches broke the old Xeons.

So I installed Windows 10, and found I can go all the way to 1809 without any issues. I put in a GT 1030 with DDR5 RAM and it can even game to extent, although the 13 year old 2Ghz processors were certainly holding it down. Upgrade processors have always been available when I had this machine but they were expensive, and I wasn’t sure if they’d work. Well I picked up a pair of Xeon x5365 for $88 RMB each and pulled the plug.

A score of 167!

Supported features of the old Xeon 5130’s:

  • MMX instructions
  • SSE / Streaming SIMD Extensions
  • SSE2 / Streaming SIMD Extensions 2
  • SSE3 / Streaming SIMD Extensions 3
  • SSSE3 / Supplemental Streaming SIMD Extensions 3
  • EM64T / Extended Memory 64 technology / Intel 64  ? 
  • NX / XD / Execute disable bit  ? 
  • VT-x / Virtualization technology  ? 

I thought the thing to do was a quick benchmark of before and after. I was getting a whopping 167! That means if Cinebench scales to 100% efficiency I get a core score of 41. While my ‘newer’ machine’s E5-2620 v2 was scoring 52, and the current E5-2667 v2 is scoring 77.

It took two hours, but I finally got these 2 Xeon x5365’s installed giving me a score of 560, or a score of 70 per core. Nice!

Much progress

And here is the CPU features of the Xeon 5365:

  • MMX instructions
  • SSE / Streaming SIMD Extensions
  • SSE2 / Streaming SIMD Extensions 2
  • SSE3 / Streaming SIMD Extensions 3
  • SSSE3 / Supplemental Streaming SIMD Extensions 3
  • EM64T / Extended Memory 64 technology / Intel 64  ? 
  • NX / XD / Execute disable bit  ? 
  • VT-x / Virtualization technology  ? 

If you are expecting to run new and exciting software that requires SSE4/SSE4.1/SSE4.2 and the infamous POPCNT and LZCNT instructions you will be disappointed. Sorry Apex Legends fans. This also means that VMware Player is capped to version 12.

Also, while there is a POPCNT Emulator, it will trigger anti-cheat software, and you will get perma banned. Pitty.

Another thing worth noting is that it’s worth looking at the TDP of the various sSPEC of Xeons. I was lucky and I was able to source the SLAED variation which has half the idle TDP of the SLAC3 variant.

So yeah, this is basically as far as this thing can go CPU wise. Although I have 16GB of RAM, apparently it can go to 32GB, which means buying all new memory modules. I guess I can do a better video card. I’m hoping that I can run more stuff at once, I was hitting a point with all 4 cores were maxed to 100% way too much.

I was going to show off the new CPU’s but apparently the pictures didn’t come out and I wanted to get this upgrade over with, as I had mentioned it did take 2 hours. The plastic retainer in the memory cage, and that stupid cover for the processors was the hardest PITA to remove. I probably spent at least 30 minutes pulling that damned thing off. I never removed the CPU shield before and 13 years, 3 nations, 2 continents worth of dust was unreal. Maybe it’s just as well the pictures didn’t come out, as it was pretty disgusting in there. It’s also no wonder the old CPU’s were running hot.

I wonder if this machine counts as being vintage now? Apple’s sliding scale of support is a weird thing.

Got some new processors!

Xeon E5-2667v2

Moved up from the old pair of E5-2620 v2’s to a pair of E5-2667 v2’s. What a big difference from a base clock of 2.1Ghz to 3.3Ghz. And yes, more cores!

2475 Cinebench score

And I can build DOSBox in 3 seconds using Visual C++ 6.0 Ultimate. I guess eventually I’ll get a modern machine, but for now this is pretty damned good. Which reminds me the newer processors for my 2006 Mac Pro should be arriving soon enough.

I couldn’t quite justify the more than double price for the E5-2697 v2 processor, although it has 50% more cores, but with a max clock of 3.5Ghz.

Oh well it’s as good as any update to the Huananzhi X79.

Huananzhi X79

So I picked up this board on AliExpress for about $200 USD. Natrually the x79 chipset is NOT a dual CPU chipset, so yeah it’s one of those ‘not exactly 100% legit’ Chinese motherboards.

One thing about Chinese companies that many don’t sell directly to consumers, instead they sell on Tao Bao, Alibaba, or to foreigners, AliExpress. The company’s site is, as they had written on the box. Yes you need the www. portion of the name, as again many things are… well dated on the Chinese internet.

The product page is currently, if anyone cares. It lists the technical specs as:

  • Support for Xeon E5 series processors
  • High-speed DDR3 four-channel memory slot: support 1333/1600/1866MHz, maximum capacity 128G memory slot
  • Desktop general purpose memory
  • X79 dual motherboard supports 5.1 channel ALC887 chip
  • 8-layer PCB backplane, 7+7 phase power supply
  • High-speed USB3.0, SATA3.0 interface transmission speed is increased
  • PCI-E expansion slot*4
  • RJ45 Gigabit LAN interface
  • North Korean heat sink with HUANAN logo

Yes, I don’t get the whole Korean heat sink thing either. Anyways I thought it’d be fun to try so I ordered the thing. It took 3 days to get to my office in China, and an additional week to get from China to Hong Kong. I hear these things can take upwards of a month to arrive in North America.

Also worth noting is that they will not ship with a CMOS battery, so you need to supply your own CR-2032 battery, otherwise the board will not operate correctly.

The contents of the box are VERY minimal, but they did include 2 SATA cables, some CPU thermal paste, a very bare and … well not very good manual, a CD which I haven’t even tried to read, along with an IO shield.

Oh and for visitors of the future, here is a poorly scanned copy of that manual. It really is 2 pages. For what it’s worth it makes as much sense in English as it does in Chinese.

I decided to pair this with a pair of E5-2620 v2‘s that I got for $40 USD shipped, as I didn’t want to initially spend a lot of money in case all of this just exploded or something. These were the ‘widest’ and cheapest processors I could find, I wanted a v2 E5 as they are faster then the first generation.

Also worth noting is that the board is only capable of driving v1 & v2 E5’s. And they need to be the E5-2 type, which support operating in pairs, unlike the E5-1 set. I have no idea if the E5-4’s aka 4-way part would work in a pair. Although it may be an interesting experiment to try.

The board apparently doesn’t support overclocking or anything that fancy.

Although it reports itself as an x79 based motherboard, it is in reality an Intel C602, based chipset. I don’t know if they are harvesting them off of recycled servers, or if they have located a giant cache of repair parts that have been pushed beyond 5 year warranties, so they are prime candidates for being re-purposed as end user motherboards. Nice things about these boards vs standard server boards is the inclusion of a Realtek HD Audio chip, VIA USB 3.0 controller, and even the nice spacing out of the slots so you could really use all the slots.

Since this is a dual processor board you really want a PSU with dual 8 pin power connectors, however as mentioned in the poorly translated manual, you can take a PCI-E 6 pin adapter, and place it into the 8 pin socket, just position it backwards so that the 12v+ pins are facing inwards.

It may look strange (well more so as I’m using an extension cable that is sadly more focused on aesthetics than function, but heh it was cheap), but rest assured it works!

Another thing to keep in mind is that since this board uses a server chipset, not a consumer one, just as it is using server processors, you will need server grade memory. In this case it’s REG ECC DDR3 based memory. I went with 1833Mhz parts, which are the fastest DDR3 parts they made. Although the processors I chose have a maximum frequency support of 1600Mhz, but the memory works fine when underclocked.

Another gotcha is the CPU fans. These need to fit the Intel Xeon 2011, but have support for the 2011 motherbards. Which unlike the consumer versions don’t have a separate plate to bolt to the underside, rather they screw in all from the top. I had purchased a pair of cheap heatsinks that were about the right size, but didn’t include any of the mounting hardware for a 2011 board. I picked up these GELID Phantom Black CPU’s for about $80 for the pair.

They are quite big, and include a pair of fans for each processor which will make the end build look a little crazy.

I didn’t want to spend a lot, and went with the cheapest PSU I could find to output more than 450 watts. Although it did turn on and run with the lower PSU the machine did shut off overnight for no apparent reason. I’ve been okay with the larger and cheap Antec NX 650 PSU.

Although, this is the older style ‘bundle o cables’ type of PSU which I’m not such a fan of.

If I had charged up a cordless screwdriver this would have taken a few minutes, but screwing in the heatsinks was a chore, and they really do dominate the boards real estate.

Almost completed build

I thought I had a case, but it turns out that it was for normal ATX sized boards, and this is an E-ATX board so it simply will not fit.

view from above

Another nice server like feature is that the board has an LED readout for early post codes, as booting this board will take some time. I think with 32GB of RAM it’s almost a minute.

I took the SSD & Hard disk out of my MacPro 2010 and put them into the new machine, and it booted up right away. Once connected to the internet Windows 10 picked up the new hardware and downloaded and installed the board drivers as needed. Interestingly enough Windows 10 also wanted a new activation code as the CPU/Motherboard was changed, although it didn’t complain about it.

When it comes to jobs that can run in parallel this is an incredible build. Obviously single core performance at 2Ghz is. well. terrible. I know going to a 4Ghz max E5-2667 v2 won’t be exactly magic either, but there is something nice about having 32 threads. Running stuff like parallel compiles, compression and video encoding is a dream on these massively parallel machines.

Games, are ‘okay’. I get 60fps with Fallout 76 on this current 2Ghz build on medium settings with the 1050 video card.

I do plan on getting faster CPU’s after the Chinese New Year, as right now basically everything is shut down (it sucks being the only person in the office building, literally), and shipments wont’ resume for at least another week.

SQL 2017 from 4.21a..

I would never ever recommend this, but…

isqlw connecting to a Linux SQL Server

I didn’t do anything to set this up.  I just searched for ISQLW and for some reason this ancient one showed up in the search path, and it connected.  I didn’t notice it at first until it didn’t like the newer shift insert/delete operations, as back then you needed to use Control C/V .. 

Not being able to stop there, I fired up the admin tool.  It complains that the stored procedure sp_MSAdmin_version  is missing.  However you can go ahead and create it…

create procedure sp_MSAdmin_version as
select “Microsoft SQL Administrator script version”

And it’ll connect.

Yes you can track stats in sort of real time

Oddly enough things that talk to the server work okay.  Things related to the databases don’t work at all.

SQLServer 2017 on Linux users

I even can admin users from 4.21’s admin program.

I guess the sp_MSAdmin_* scripts could be fixed up for 2017, allowing for a more robust experience, but I really can’t think of any reason why to do it.  I’m more surprised that all the new ODBC drivers since Vista won’t talk to SQL Server 4.21, 6.0, & 7.0, but it seems the client tools can talk to the new server.

I’ve even created the infamous ‘PUBS’ database from the 4.21a script as well.  Again not very useful, but all the more fun!


Installation wasn’t too hard, but a little weird to re-produce.  Anyways you’ll need to trust the MS key

wget -qO- | sudo apt-key add -

And then I added this into the /etc/apt/sources.list:

deb [arch=amd64] stretch main
deb [arch=amd64] xenial main

And then run the following to download MSSQL & the needed bits.  It’ll prompt a few times to agree to the License:

apt-get update;apt-get upgrade
apt-get install apt-transport-https
ACCEPT_EULA=Y apt-get install mssql-tools mssql-server && /opt/mssql/bin/mssql-conf setup

And if everything goes correctly you will then be prompted for the edition to use, the SA password, and then you can start the server with:

systemctl restart mssql-server.service

And away you go.

My output was like this:

# cat /etc/issue
Debian GNU/Linux 9 \n \l

[email protected]:/# apt-get update;apt-get upgrade
Hit:1 stretch/updates InRelease
Ign:2 stretch InRelease
Hit:3 stretch Release
Hit:4 stable InRelease
Hit:5 stretch-backports InRelease
Hit:7 stretch InRelease
Hit:8 stretch InRelease
Hit:9 xenial InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[email protected]:/# apt-get install mssql-tools mssql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libc++1 libodbc1 libsss-nss-idmap0 libunwind8 msodbcsql17 odbcinst odbcinst1debian2 unixodbc
Suggested packages:
  clang libmyodbc odbc-postgresql tdsodbc unixodbc-bin
The following NEW packages will be installed:
  libc++1 libodbc1 libsss-nss-idmap0 libunwind8 msodbcsql17 mssql-server mssql-tools odbcinst odbcinst1debian2 unixodbc
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/181 MB of archives.
After this operation, 932 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package libc++1:amd64.
(Reading database ... 53362 files and directories currently installed.)
Preparing to unpack .../0-libc++1_3.5-2_amd64.deb ...
Unpacking libc++1:amd64 (3.5-2) ...
Selecting previously unselected package libodbc1:amd64.
Preparing to unpack .../1-libodbc1_2.3.4-1_amd64.deb ...
Unpacking libodbc1:amd64 (2.3.4-1) ...
Selecting previously unselected package libunwind8.
Preparing to unpack .../2-libunwind8_1.1-4.1_amd64.deb ...
Unpacking libunwind8 (1.1-4.1) ...
Selecting previously unselected package odbcinst1debian2:amd64.
Preparing to unpack .../3-odbcinst1debian2_2.3.4-1_amd64.deb ...
Unpacking odbcinst1debian2:amd64 (2.3.4-1) ...
Selecting previously unselected package odbcinst.
Preparing to unpack .../4-odbcinst_2.3.4-1_amd64.deb ...
Unpacking odbcinst (2.3.4-1) ...
Selecting previously unselected package unixodbc.
Preparing to unpack .../5-unixodbc_2.3.4-1_amd64.deb ...
Unpacking unixodbc (2.3.4-1) ...
Selecting previously unselected package libsss-nss-idmap0.
Preparing to unpack .../6-libsss-nss-idmap0_1.15.0-3_amd64.deb ...
Unpacking libsss-nss-idmap0 (1.15.0-3) ...
Selecting previously unselected package msodbcsql17.
Preparing to unpack .../7-msodbcsql17_17.2.0.1-1_amd64.deb ...
Unpacking msodbcsql17 ( ...
Selecting previously unselected package mssql-server.
Preparing to unpack .../8-mssql-server_14.0.3037.1-2_amd64.deb ...
Unpacking mssql-server (14.0.3037.1-2) ...
Selecting previously unselected package mssql-tools.
Preparing to unpack .../9-mssql-tools_17.2.0.1-1_amd64.deb ...
Unpacking mssql-tools ( ...
Setting up libsss-nss-idmap0 (1.15.0-3) ...
Setting up libodbc1:amd64 (2.3.4-1) ...
Setting up libunwind8 (1.1-4.1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for man-db ( ...
Setting up libc++1:amd64 (3.5-2) ...
Setting up mssql-server (14.0.3037.1-2) ...
Setting up odbcinst1debian2:amd64 (2.3.4-1) ...
Setting up odbcinst (2.3.4-1) ...
Setting up unixodbc (2.3.4-1) ...
Setting up msodbcsql17 ( ...
Setting up mssql-tools ( ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
[email protected]:/# /opt/mssql/bin/mssql-conf setup
Choose an edition of SQL Server:
  1) Evaluation (free, no production use rights, 180-day limit)
  2) Developer (free, no production use rights)
  3) Express (free)
  4) Web (PAID)
  5) Standard (PAID)
  6) Enterprise (PAID)
  7) Enterprise Core (PAID)
  8) I bought a license through a retail sales channel and have a product key to enter.

Details about editions can be found at

Use of PAID editions of this software requires separate licensing through a
Microsoft Volume Licensing program.
By choosing a PAID edition, you are verifying that you have the appropriate
number of licenses in place to install and run this software.

Enter your edition(1-8): 2
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:

The privacy statement can be viewed at:

Do you accept the license terms? [Yes/No]:yes

Enter the SQL Server system administrator password:
Confirm the SQL Server system administrator password:
Configuring SQL Server...

ForceFlush is enabled for this instance.
ForceFlush feature is enabled for log durability.
Created symlink /etc/systemd/system/ → /lib/systemd/system/mssql-server.service.

Additionally you may not want to listen on every single IP address, but rather only on the loopback.  So you would run this to configure the listening address:

/opt/mssql/bin/mssql-conf  set network.ipaddress

I also use the SQL Agent, to enable that just simply run this:

/opt/mssql/bin/mssql-conf set sqlagent.enabled true 
systemctl restart mssql-server

Many more settings for the /var/opt/mssql/mssql.conf file can be found here:  I would take a look at them, and possible enable stuff like TLS so that someone with management tools circa 1993 can’t just login to your server.  Then again maybe that is the kind of thing you want.

And if you don’t want Microsoft SQL Server, just do the following to uninstall MSSQL, destroying all data as well.

apt-get purge  mssql-tools mssql-server msodbcsql17
apt-get auto-remove
rm -rf /var/opt/mssql

I kept on getting this error which I didn’t see any way to cleanly resolve to fix for running MSSQL on Debian.  The best hint is the OpenSSL is either too new (unlikely) or too old (far too likely).  Instead I just changed distros as that is what people do, they don’t troubleshoot problems in Linux, just change distros so why bother fighting it?

# /opt/mssql-tools/bin/sqlcmd -Usa -PMYPa55w0rd!# -S127.0.0.1
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2746.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Client unable to establish connection.

Going further though, as much as I liked Debian it really does run better on Ubuntu.  So as an addendum, use these sources (at the moment!).  Since the SQL Agent wouldn’t run, and I couldn’t connect locally it was worse than useless.

deb [arch=amd64] xenial main
deb [arch=amd64] xenial main

Now the first time I tried to do anything on Ubuntu I got this lovely error:

# /opt/mssql-tools/bin/sqlcmd
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid

And it just hung the process.  I had to control-Z & kill -9 %1 it to get it out of the way.  Well it turns out that this VM didn’t have it’s locale set.  Fixing that was pretty simple, once you know how:

apt-get install locales && dpkg-reconfigure locales

Another thing that really bugs me is the lack of cryptography by default. So I found this nice recipie to for setting it up quickly.  Just watch your hostname!

systemctl stop mssql-server 
cat /var/opt/mssql/mssql.conf 
mkdir /var/opt/mssql/ssl
mkdir /var/opt/mssql/ssl/certs/
mkdir /var/opt/mssql/ssl/private/
cd /var/opt/mssql/
chown -R mssql:mssql *
openssl req -x509 -nodes -newkey rsa:2048 -subj '/CN=HOSTNAME' -keyout mssql.key -out mssql.pem -days 3650
chown mssql:mssql mssql.pem mssql.key 
chmod 600 mssql.pem mssql.key
mv mssql.pem /var/opt/mssql/ssl/certs/
mv mssql.key /var/opt/mssql/ssl/private/
/opt/mssql/bin/mssql-conf set network.tlscert /var/opt/mssql/ssl/certs/mssql.pem 
/opt/mssql/bin/mssql-conf set network.tlskey /var/opt/mssql/ssl/private/mssql.key

This will build out a self signed certificate for 10 years and put them into the local MSSQL directory where it can read them.