Moving offices again

Things are going well, and I’ve outgrown the old place. So time to move.

I’m super lucky, there is no denying that. So to push my luck I’m giving myself the corner office.

Unfortunately the prior tenant believes that masking tape X’s in the windows makes them stronger and will prevent them from breaking during a typhoon. I cannot believe how many people try to tell me that paper tape is somehow going to catch shards of glass being propelled upwards of 200km/hr.

It’s all exciting to me as the success is not only with my company, but its not an IT company either. It’s such an interesting thing being thrown into a different field although many of the challenges oddly enough remain the same.

Anyway all the hosted stuff is obviously offline. I think I’m getting a different public address, to further complicate things.

So yes, I’ve been busy

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 4.20.22.1”
go

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!

PUBS

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

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

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

deb [arch=amd64] https://packages.microsoft.com/debian/9/prod stretch main
deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/mssql-server-2017 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

root@Junk:/# apt-get update;apt-get upgrade
Hit:1 http://security.debian.org stretch/updates InRelease
Ign:2 http://debian.uchicago.edu/debian stretch InRelease
Hit:3 http://debian.uchicago.edu/debian stretch Release
Hit:4 https://dl.yarnpkg.com/debian stable InRelease
Hit:5 http://ftp.debian.org/debian stretch-backports InRelease
Hit:7 https://deb.nodesource.com/node_8.x stretch InRelease
Hit:8 https://packages.microsoft.com/debian/9/prod stretch InRelease
Hit:9 https://packages.microsoft.com/ubuntu/16.04/mssql-server-2017 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.
root@Junk:/# 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 (17.2.0.1-1) ...
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 (17.2.0.1-1) ...
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 (2.7.6.1-2) ...
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 (17.2.0.1-1) ...
Setting up mssql-tools (17.2.0.1-1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
root@Junk:/# /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
https://go.microsoft.com/fwlink/?LinkId=852748&clcid=0x409

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:
https://go.microsoft.com/fwlink/?LinkId=855862&clcid=0x409

The privacy statement can be viewed at:
https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409

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/multi-user.target.wants/mssql-server.service → /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  127.0.0.1

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: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-mssql-conf?view=sql-server-2017.  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.
OpenSSL?

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] https://packages.microsoft.com/ubuntu/16.04//prod xenial main
deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/mssql-server-2017 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 *
cd
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.

Virtualization Challenge III – Acorn ARM Minix

(This is a guest post from Antoni Sawicki aka Tenox)

Recently came across this unfinished port of Minix 1.5 to Acorn Archimedes A310. According to the readme file this is a set of patches that needs to be applied on a standard Minix 1.5.10 code base on a Unix machine. The code then needs to be to transferred to Risc OS machine for compilation. Once complete then you need to manually create boot records and a file system. Sounds like a fun little project.

What I want is pretty standard:

  • A ready to use working disk image that anyone can unpack and run on a modern machine under an emulator of your choice (commercial OK).
  • Aclock binary and screenshot.

First person to deliver these gets a prize of £100 (that is 100 GBP / Pound Sterling). I strongly encourage to coordinate your efforts via comments.

If needed I can supply licenses for commercial Acorn emulators and C compiler for Risc OS, albeit I only have license for a modern ROOL DDE. I hope ancient version is not needed, but this part of the challenge. Note that I can’t just give away the licenses to anyone, I will only share or purchase new licenses for serious contenders on one to one basis.

Let the challenge begin!

So my old machine’s 16GB memory limit is becoming a problem

MacPro guts

And like a sucker I saw this 2010 MacPro for sale, $300.  It was running OS X 10.13 aka High Sierra, and I though oh cool it’s obviously able to run the latest OS, and even better with 32GB of RAM, and apparently the single processor model can go up to 48 or 64GB of ram giving me that breathing space I need.

So I happily get the machine, put in some new SSDs, and spinning disks, and decide that I’m going to split it up half for OS X, and half for Windows 10.  Sounds easy right?  And for the hell of it, I wanted to install a copy of 10.6.8 (Snow Leopard), since it’s the last version with Rosetta, and I’d love to compare GrandPa’s G5 to this 2010 space Odyssey.  Snow Leopard installs just fine, but the real fun comes from High Sierra and it’s APFS.  I installed & licensed a copy of Windows 10 Pro onto the Mac without issue, installed the bootcamp drivers, and.. well it installs Okay but drivers are a whole different story.

Apparently there is an ongoing war between Apple and ATI regarding bootcamp drivers, so the Apple UEFI cards won’t work with the stock drivers under Windows.  You can go and look for patched ATI drivers over at bootcampdrivers.com, although I had no luck with the Radeon HD 5700 that was in this machine, as it’s GPU never showed up in the Windows 10 device manager.

I still wanted to get accelerated graphics, and I decided to keep the old ATI card in the machine so I wouldn’t’ lose boot graphics from the UEFI ROM, but a card that needs additional drivers is fine, which opens the door to Nvidia.  I wasn’t ready to spend a fortune on a card, and I wanted one that didn’t draw that much power, so the 1030 was a perfect fit being cheap and not requiring additional power hookups.

GeFroce 1030

I just went with the cheapest one I could find retail.

Naturally the NVidia cards work fine in Windows, but of course Apple won’t use any stock plain PC cards.  But thankfully NVidia has ‘internet’ drivers that cover quite a few of their cards, including the 1030-1080’s. I had further issues with the built in audio drivers, which Windows always prefers to load some generic “High Definition Audio Device” driver, but it never makes any noise.  So I bought a cheap external USB Sound Blaster Play! 3 dongal, which works fine.

Old Xeon in MacPro

And then there is the fun with VMWare, I upgraded both VMWare Player to version 14, and Fusion to version 10.  And yeah, the Xeon W3565 is far too old.

No new VMWare for you!

Although my version 10 key of Fusion works on version 8, just as VMWare Player 12 works fine on Windows 10.

And if that wasn’t crazy enough, in the bootcamp boot driver selection, the High Sierra volume cannot be selected.  Even if you install onto a HFS+ volume, upgrade a 10.6.3 volume or whatever you do, High Sierra converts the filesystem into something that bootcamp doesn’t understand, so the only way to boot between the OS’s is to hold down the option key, and select the OS from the ROM, which thankfully after an update understands and boots APFS.

You think it’d be easy to just push an update to the bootcamp boot tool, but apparently it isn’t.

I don’t know why, but for all the money Apple is sitting on, they really don’t feel that together or with it.  I know in the whole ’99-05 time period they were not only fighting for their lives, but the whole OS 9 to OS X transition phase, just felt so much better done.  Ever since 10.4 it feels like things are just subtracted, nothing really useful added.  First Classic support, then PowerPC, then Rosetta.  Going from 10.7 to 10.13 really hasn’t been all that exciting.  Which has been the general state of things, with everyone for the most part just running VMS or Unix.

Jerry Pournelle RIP (1933-2017)

I had just heard the news that Jerry had passed away.  While famous for his scifi writing, his work for the military and pushing ‘smart weapons’, getting kicked off the ARPANET for wrong think, and of course being the first person to use a word processor to write a book and get it published.

He was also known as quite the tinkerer and getting the luck of having people send him stuff to play with, and he’d write about it in his column on Byte back in the day (starting in 1984!), and you can find his full BYTE credentials here.

Although at the time I had thought of it as very chaotic, all over the place, and full of, well just simple bonehead mistakes, in retrospect Jerry’s chaos had a tremendous impact on me, and in some unconscious way I had inadvertently followed in his style through virtualization.  And I can say that although some things are pretty obvious in hind sight, when you are in the middle of it, some bad things seem like good ideas!!  Although the price for ‘bricking’ a virtual machine is a lot lower, and the ability to quickly go back and forth, and experiment more pretty much consequence free is definitely a plus!

He, along with John C Dvorak were frequent guests on TWiT, with I think his last appearance in 2015, which I have to say I had always admired their cantankerous old man style.  One that I find myself increasingly take on with age.

From Jerry’s son Alex:

I’m afraid that Jerry passed away.
We had a great time at DragonCon.
He did not suffer.

(8 Sep 2017 – 3:45pm PDT)

He was 84

WRP for QT-Webkit

(note this is a guest post from Tenox)

Due to a popular demand, a previously mentioned Web Rendering Proxy has been ported to QT-Webkit, which allows it to run on Linux, BSD and other operating systems.

QT doesn’t support writing GIF images so JPEG is being used instead. You may want to adjust the option for image quality versus size.

The installation of required components is straight forward, on Ubuntu:

apt-get  install  python-qt4  libqt4-webkit

Generaly you if you can get qt-webkit2png to run, WRP will also work. Note for Windows users, you will need a X11 display server like the one that comes with Cygwin.

The script is available here.

Surfing Modern Web With Ancient Browsers

(note this is a guest post by Tenox)

[Update: A full HTTP Proxy version has been made in this post.]

I spend a fair amount of time working with legacy operating systems. Apart from being obsolete themselves they suffer from a common problem – the web browsers are simply unusable on a present day Internet. You start by getting JavaScript error on google.com and it only gets worse once you go further. Try going to microsoft.com with IE 1.5 or qnx.com with the last version of Voyager. This just doesn’t work. With rapid progression of web standards, the situation will only be getting worse in time. Something had to be done.

Quite a while ago I’ve came across Opera rendering proxy for mobile browsers. This got me thinking. If you could render a web page on a proxy server to a simplified HTML, say 3.x., this would make a lot of web browsers happy! Also, for some unrelated purposes I have been using webkit2png which allows to create a whole web page snapshot in a single png image. What if such image had an image map of clickable regions pointing to the original links?

The idea was born, but was it possible to implement and would it work? Webkit2png was quite far from having all the required functionality. Fortunately though after some additional research I have stumbled upon picidae network. To my utter surprise they actually made all or even more functionality that I wanted in their picidae.py script. All that had to be done to adapt picidae to my purpose was to save the image as a GIF image, generate a simple HTML page with imagemap, an input box and strip all the unwanted stuff.

Webrender.py came to life. It’s a cgi-bin application that resides on a machine in the middle. It renders a gif image and spits it out to the browser together with a simple web page, containing a URL and search input boxes plus the gif and image map.

After some initial debugging and massaging out few bugs the solution worked perfectly! I could finally get the old browsers happily navigate modern websites! Check out some examples:

Internet Explorer 1.5 on microsoft.com

Internet Explorer 1.5 on microsoft.com

 Yes! You can finally browse microsoft.com with IE 1.5 🙂

Netscape 4 visiting netscape.com

Netscape 4 visiting netscape.com

Or go to netscape.com in Netscape 4.x browser. This was impossible just a few hours ago!

How about some other browsers:

QNX Voyager going to qnx.com

QNX Voyager going to qnx.com

 

Mozilla on UnixWare

Mozilla on UnixWare

 

Old Firefox on Haiku

Old Firefox on Haiku

 

CNN on Mosaic

CNN on Mosaic

 

apple-mosaic

Apple.com using Mac Mosaic

 

IBM WebExplorer on OS/2

IBM WebExplorer on OS/2

 

RiscOS !NetSurf on Wikipedia

RiscOS !NetSurf on Wikipedia

 

netscape3

Netscape visiting DNA Lounge

 

NextStep OmniWeb on Reddit.com

NextStep OmniWeb on Reddit.com

 

Enjoy!

Update: A full HTTP Proxy version has been made in this post.