MS-DOS v1.25 and v2.0 Source Code now on github

This repo contains the original source-code and compiled binaries for MS-DOS 1.25 and MS-DOS 2.0.

These are the same files originally shared at the Computer History Museum on March 25th 2014 and are being (re)published in this repo to make them easier to find, reference-to in external writing and works, and to allow exploration and experimentation for those interested in early PC Operating Systems.

License

All files within this repo are released under the MIT (OSI) License as per the LICENSE file stored in the root of this repo.


At first I just thought it was simply just another mirror of the original source that had been released that had some incredible restrictions.

Original license:
To access this material, you must agree to the terms of the license displayed here, which permits only non-commercial use and does not give you the right to license it to third parties by posting copies elsewhere on the web.

However the restrictions have been lifted, and MS-DOS 1.25 & 2.0 are now available under a MIT license.

So this is actually very awesome!

You can download it here: https://github.com/Microsoft/MS-DOS.

the easy way bundle

The easy way bundle

I came across this hefty box, “the easy way bundle”, as it bills itself, the easy way to save over $1,000 on four popular software packages for your new Macintosh computer.  Clearly the box has seen better days over the last 27 years but amazingly the contents are just fine.

$399.00 USD

It’s amazing how much more cheaper software has gotten over the years.  Software used to be super expensive on the PC level, it really wasn’t until the office bundling with new machines that drove the price down.  Back in the 80’s and early 90’s it wasn’t uncommon to pay upwards of $500 USD for a single application, like a spreadsheet or word processor.

bundle contents

Inside the box is more boxes, and inside those boxes is a rare sight, manuals!  Actual printed manuals!  That is how you know this is something of near museum quality.  I kind of like being able to read a physical book from time to time, and it’s really great.

Oh and incidentally the disks all worked, much to my amazement.  I just needed to get a working Macintosh with a drive that can read 800kb disks and an Ethernet card.

4 great programs!

Although it does list four packages, it really is 3, featuring:

  • WordPerfect 
  • Lotus 1-2-3
  • SoftPC

AccessPC is simply a FAT driver for MacOS to read MS-DOS floppies & removable media.

So let’s take a quick look!

An actual software license

I haven’t seen something like this in a long while, an actual license printed on nice stock certificate stock paper (remember those?!), with a hologram tag.  Does WordPerfect even exist anymore?  Can I mail this in for an upgrade?  Does it even matter?

Install options for WordPerfect

While the install options give the impression that WordPefect is a really full featured word processor once loaded up for some reason it really felt barren.

Although it does have the important proofing tools, don’t expect a dictionary or thesaurus to have anything more than the words, no definitions or anything like a style guide.  It did ship on floppy and I guess I’ve just become so spoiled living in the future with terabytes of storage and an overwhelming supply of deference media.

Going back to 1992 is a real trip to not only how clean some of the UI elements feel, but just how seemingly feature sparse the more advanced applications feel.

Personally I never really liked WordPerfect so I more so installed it as a curiosity, much like when I had WordPerfect for Unix.  I’m the crazy one that likes MS Word.

Lotus 1-2-3 1.00 for the Mac

With that said, I went ahead and installed Lotus 1-2-3, and I was really surprised, that the installer was not only really appallingly bad, requiring you to copy the contents to the HD before installing it (so you need a lot of free space), but there was no copy protection at all either on the disks, or in the form of a certificate/serial code.  In school I did start with 1-2-3, but with the onslaught of Microsoft Office had quickly moved to Excel, and after 30+ years I really don’t remember much of the slash commands, let alone how to use if effectively.  Luckily the menu is okay to walk through, and of course there is Macintosh style menus so you don’t even have to deal with the slash menu if you don’t want to.

SoftPC

SoftPC didn’t come with a box within the box, just the two manual sets & the disks shoved into the manuals.  I doubt it came like that, but this is all I have.

SoftPC licensing stickers

Compared to the WordPerfect certificate, the stickers hidden in the folds of the SoftPC manual just feel cheap.  And the years have not been kind as you can see with the discoloration, and the cheap adhesive on them has completely dried off.  After I had scanned this they have all fallen off the backing paper.  Although I also have version 3.1, I didn’t want to lose this so I’ll just save it for prosperity.

And SoftPC is a great program, although it really is an absolute crutch, allowing you to run PC software on your Mac.  Flash forward 30 years, and the industry continues with VMware & Parallels.  What is more amazing is how so many leaders in PC emulation completely missed the virtualization market.  But most people would think you were a little strange to run a PC on a PC.  Or more than one at the same time.

The SoftPC platform

SoftPC emulates a really barebones PC, it only supports a maximum of 640kb of RAM, and the CGA graphics adapter.  For anything more advanced you really need to get SoftAT, which supports more options.  Or even better, get a copy of SoftPC 3.1, which not only allows more memory but bundles a copy of MS-DOS 5.0 and Windows 3.1

SoftPC 2.52 CGA running Space Quest 1

I found the emulation of the CGA kind of lacking when compared to version 3.1  Although some games like BattleTech render just fine, Space Quest just looks horrible in version 2.52.


SoftPC 3.1 CGA running Space Quest 1

Although to be fair it doesn’t look so much better in version 3.1 either.  However 3.1 emulates both EGA & VGA (along with expanded & extended memory) giving a far more richer 286 based emulation solution


SoftPC 3.1 EGA running Space Quest 1

As you can see there really is no comparison to the EGA version.

Although there are far more better solutions today to do PC emulation, for some reason there is always something cool to have an emulator running an emulator.. Sadly the 80386 based emulation didn’t come to the 68000 based platform, instead the later generation emulation was only available to the PowerPC.

I guess it goes to show, but of all the applications I have for MacOS, I enjoy SoftPC the most.  I suppose I need better softwares.

Wileyfox Windows phone back in production!

And people think Amiga & OS/2 fans are a little crazy!

Wileyfox was the last vendor selling Windows phones and it seems that they there was so much demand that the phone is back into production.

The WileyFox Windows phone

Specs include:

• 5″ HD Curved Screen, IPS Technology, Gorilla Glass 3
• 4G LTE
• Windows 10 Operating System
• Fingerprint Reader
• 8 Megapixel Rear Camera + Dual LED Flash + Auto Focus
• 2 Megapixel Rear Camera
• Qualcomm Snapdragon Quad Core Processor
• 16GB ROM (Storage)
• 2GB RAM
• 32GB Expandable Memory Card Slot
• 3D G Sensor
• Proximity Sensor
• Ambient Light Sensor

Also the price has dropped from £ 199 to £ 79!

Currently it seems that orders are only for the United Kingdom.

Loading the MS SQL 6.5 drivers on Windows 10

AKA accessing SQL Server 4.21 via Access 2016

It actually works!

I’ve been pretty dismayed for the longest while that newer versions of Windows bundle newer versions of ODBC that refuse to talk to any version of SQL Server prior to 2000 (at the moment).  Of course if I were ‘professional‘ Id be upgraded to the latest version, maybe even running on Linux.  But I’m not, and you didn’t come here for how to upgrade/update but rather how can you use tools from the 90’s in the 10’s.

If you try to use the current SQL Server driver, you’ll get this message.  Don’t be fooled, SQL Server 7.0 isn’t supported either (probably because of the SUN vs Microsoft Java debacle), it will only work with SQL Server 2000 or later versions.

SQL Server version 6.5 and all previous versions are no longer supported

It’s been this way since Windows 7, and I’ve just given up and gotten used to having to have a VM to access older databases.  That is, until today.

While I was dumping data and moving stuff for my blog (something I need to write about another BCP adventure), I wanted to do a simple Access database to make sure it’s looking sane.  And I figured I’d jump down to Windows 95, and load up Office 95.  Well sure enough there was no proper SQL Server ODBC driver.  Popping in the SQL Server 6.5 CD, naturally there is no ODBC drivers for Windows 95, but rather a 16bit driver for Windows 3.1, and 32bit drivers for Windows NT.  I installed the NT version, and was still unable to connect until I installed the SQL client which then let me run WINDBVER.EXE so I could configure the appropriate transport DLL (TCP/IP) and then I could connect.

Access 95 using the SQL 6.5 NT ODBC Driver + Client

And this got me thinking, is it possible to just take those DLL’s and move them onto Windows 10?  Well naturally that won’t work as the driver sqlsrv32.dll is a system protected file, and you can’t overwrite it without a lot of pain.  However this got me to thinking that it should be possible to just tell the system it’s a new driver with a different name.

Looking through the registry I notice that HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ODBC is where the 32bit ODBC stuff is stored, so this is where I’ll make my ‘OLD SQL’ driver.  I simply used the existing one and renamed the driver/setup DLL’s to sql65-sqlsrv32.dll so that way the 2 DLL’s can co-exist without freaking out.

OLD SQL Driver

With that done, the key Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ODBC\ODBCINST.INI\ODBC Drivers will need a new SZ string saying the ‘OLD SQL’ driver is installed.

Add the new driver to the available list.

I also copied the following files from the SQL 6.5 client into a subdirectory of SysWOW64 so I could configure the transport:

DBMSADSN.DLL
DBMSDECN.DLL
DBMSRPC3.DLL
DBMSRPCN.DLL
DBMSSOC3.DLL
DBMSSOCN.DLL
DBMSSPX3.DLL
DBMSSPXN.DLL
DBMSVIN3.DLL
DBMSVINN.DLL
SQLGUI32.DLL
SQLSVC32.DLL
ntwdblib.dll
WINDBVER.EXE

Now if you are going to use named pipes it’ll just work out of the box.  Running WINDBVER you’ll see that it’s set that way by default.

Named pipes, and notice it’s version 8.0.1.85 from 2016!

to change it to TCP/IP I coped the files DBMSSOC3.DLL & DBMSSOCN.DLL into the SysWOW64 directory and re-ran WINDBVER, and then selected TCP/IP.

TCP/IP via DBMSSOCN.DLL

Now we can go ahead and add a SQL DSN. Remember to use the 32-bit ODBC Data Source tool

Note this is the 32-bit version!

 If everything is setup correctly you should see the ‘OLD SQL’ Database driver.  Scrolling to the right you’ll see that it’s version 2.65.02.01 dated 7/7/1997

Use the ‘OLD SQL’ driver

Now we just need to configured the driver.  Be sure to hit the Options button and type in the database name, otherwise it’ll just go to the default database.  Since I’m just using the ‘sa’ user that would be the master database, but I want Access to instead use the ‘pubs’ database.

Configure the old driver

Sadly these old drivers don’t have any test functionality.  So there is no real way to know if it is working at this point, however I would imagine it should as we have added a regsitery key for the driver, added it to the available driver list, selected (if needed) a transport DLL, and populated the needed fields.  The next thing to do is to try to use it.

The ODBC option is in the ‘Other’ sources now.

Start Access, and select a blank database.  Go to the External Data tab, and then choose the New Data Source, and the From Other Sources option.  This will bring up the ODBC database wizard.

Link to the data source

I’m going with linked, as I want the data to be used from the SQL Server all of the time.  You will be then prompted to choose the Data Source

The dbtest ODBC connection should be under the Machine listings

You can select the DSN we setup earlier, and then it’ll prompt you to login.

Login to the SQL Server

Again I’m using SA because… why not.  And now for the moment of truth, if everything is correct you’ll be presented with the list of tables!  This means that it’s working!

The pubs database from SQL 4.21

You can choose to save the password, and if needed select unique fields, or just leave it as it is.  Now you should be able to access your SQL 4.21 database!

The Authors table from the pubs database

And there we have it.

If anyone is brave/crazy enough I extracted the driver here: 
sql65odbc-files.7z  SQL Server 6.5 should not only be able to access 4.21, and 6.0 but I think it ought to be able to access SQL Server 7.0, although I haven’t tested it out yet.

Installing .NET 1.1 on Windows 10

VirtualCenter client 1.3 needs .NET v1.1!

Yes, I know this is crazy but… I don’t know if anyone else would care.  Windows 10 (7 & 8 as well, I guess…) include a .NET 2.0 option or a 3.5 which includes 2.0 install but if you need the first real ‘release’ version of .NET v1.1 you cannot install it.  And some applications were pretty much hard coded to 1.1, even though the whole point of .NET was to avoid this kind of version/DLL hell.

.NET 1.1 setup  From here it’s all failure.

Well, I had come across this great post here on techjourney.net.  And yes, it sounds crazy, but it works!

All you need to do is download the version 1.1 framework + SP 1, and slipstream the SP 1 patch into the directory and run the setup..

  • dotnetfx.exe /c:”msiexec.exe /a netfx.msi TARGETDIR=C:\DotNet”
  • dotnetfxsp1.exe /Xp:C:\DotNet\netfxsp.msp
  • Run netfx.msi that was created in C:\DotNet\

I’ve gone ahead and combined the .NET v1.1 framework + SP1 into this zip file: dotnet1.1-withsp1.zip, so you can bypass those steps, and just go.  No more bizarre errors about the debugger not finding itself and crashing out the installer.

VMware VirtualCenter on Windows 10

And now I can manage my nested VMware ESX 2.5.2 cluster on Windows 10 natively as managing from a VM just wasn’t the great experience I’d been hoping for.

OpenNT 4.5 revisited

OpenNT 4.5 installed

It’s been a few years since Tenox had mentioned OpenNT 4.5, and in that time the project pages, repositories and well just about everything has vanished.  It seems that the hardest thing to do with OpenNT had become finding it.

Then I found this over on vetusware, and with my curiosity piqued, I thought I’d check it out.

As mentioned the first thing to do is combine the parts, and create the single 7zip file, and then extract that.

copy /B "OpenNT45(Source).z00" + "OpenNT45(Source).z01" + "OpenNT45(Source).z02" "OpenNT45(Source).7z"

Extracting that will give a simple ISO file, weighing in at 1.7GB!

While not obvious at first, there is a readme in the ISO that provides instructions on how to compile it.  Basically it boils down to a few main points:

  • xcopy the CD onto a ‘W’ drive, or subst any other drive to ‘W’ as apparently the build process requires it to be on W.  Did I mention that the CD needs to be copied onto the W drive?
  • Run the ‘setup.cmd’ file to configure the environment and get the build process ready
  • run zTESTBUILD and do a clean build.  It will run and eventually fail.
  • run zTESTBUILD again, but do not do the clean build, and it should finish
  • run \cdimg\genall to create the ISO image

So with those points basically figured out after the fact, let’s go!

The first thing to do is either create a VM to compile this in, or just xcopy and go.  The big requirement though is that it must be a 32bit version of Windows, as part of the build process requires the ability to use NTVDM.  For simplicity sake, I chose Windows 2000 server, so I could allocate 2GB of RAM, and 4 CPU cores.  During the build it doesn’t use that much memory, cores are more so important during various phases of the build that can seemingly use any and all cores, while various other parts only run on a single core.

OpenNT disk space after a build.

I chose to use a separate ‘C’ drive, and ‘W’ drive for the 2000 VM.  With no idea how much space to give it, I setup a 32GB W drive, which after the build takes up just under 4GB of space.  

With the VM installed, and the W drive formatted, and the contents of the CD copied over, it’s time to start the build.

Phase 1

So basically you just answer ‘Y’ to zTESTBUILD.cmd and it’ll do it’s thing.  For me this took about 42 minutes for this to run until it failed, as expected.

Failure building MVDM

Looking at the \binaries\nt directory there was now 1,274 files currently built.  Naturally with the failure this is not a complete build.

Starting phase 2

After this failure you then re-run zTESTBUILD.cmd but this time answer ‘No’ to the clean build.

This step took about 15 minutes to complete.


The \binaries\nt directory now has 1293 files.

Checking the binaries\nt directory there is now 1,293 files and looking at the entire directory there is 2,624 files taking up about 120MB of space.

With the OS compiled, all that remains is to create an install CD and boot it up.  running \cdimg\genall.cmd will create the ISO image.

Creating the ISO with CDIMAGE 2.47

This will compress almost all the files, and took another 15 minutes to create the CD.  After this is all done it’s just a matter of setting up a VM to run the NT45Wks.iso file.

Bluescreen bootup of OpenNT 4.5

The first thing you notice is the extra banners on OpenNT 4.5, when compared to a retail copy of NT 4.0.

OpenNT Project

And of course the different branding during setup.  One of the nice things about OpenNT is that it can format filesystems directly as NTFS, instead of the old way of first creating a FAT partition, and converting it to NTFS.  This ought to bypass all the limitations of disk/partition sizes for the older NT.

WOW Crash

Running OpenNT 4.5 on VMWare seemed to run the Win32 stuff okay, although Win16/WOW stuff immediately crashed, and MS-DOS was incredibly slow with screen redraw issues. I know that NT 4.0 builds prior to SP 6 have issues with many newer emulation/hypervisors even when CPU levels are set to regular Pentium.

MS-DOS DPMI stuff like DooM are incredibly slow, and seemingly lock up when launching.

Oddly enough the OS/2 subsystem works just fine.

So there it is, the nearly vanished ‘OpenNT 4.5’.

VMware Player and Device/Credential Guard are not compatible!

What is this?!

Well it turns out that by turning on all the SDK stuff for Windows 10, including the mobile dev, which includes the Windows phone emulator it naturally uses Hyper-V.

Hyper-V Hypervisor enabled

And obviously the two hypervisor’s wont play nice with each-other.  You could just disable it, and go back and forth re-enabling it when needed, or make a new boot selection without it!

I found this post here: Switch Easily Between VirtualBox And Hyper-V WithA BCD Edit Boot Entry In Windows 8.1

C:\> bcdedit /copy {current} /d "No Hyper-V" 
The entry was successfully copied to {ff-23-113-824e-5c5144ea}. 

C:\> bcdedit /set {ff-23-113-824e-5c5144ea} hypervisorlaunchtype off 
The operation completed successfully.

note: The ID generated from the first command is what you use in the second one. Don’t just run it verbatim.

When you restart, you’ll then just see a menu with two options…

  • Windows 10
  • No Hyper-V

Sounds easy enough, doesn’t it?

BCD Boot menu

And just like that on power up, I can switch between Hyper-v and no Hyper-V.

Oh yeah with the latest version of Windows 10 (October 2018) I had to list the BCD table with:

bcdedit /enum ACTIVE /v

As after the upgrade it had tagged both of my boot selections to enable Hyper-V everywhere. I had to delete the #2 entry and re-create the no hyperv dance. {current} doesn’t work anymore.

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.

win86emu: the greatest thing for Windows RT that Microsoft should have made.

While I’m writing this, I’m listening to Neuromancer via WinAmp & the ancient Speex plugin I had updated about 8 years ago.

x86 node running on Windows RT

I took my Surface, and downgraded it to the North American 8.0 version without updates, added my MS ID, and from there ran the jailbreak and win86emu (sometimes called x86node) and from there I was able to run some simple Win32 exe’s.

Even though I had done a simple cut down QuakeWorld port with the GDI only display, using win86emu it’ll run the 80386 build as well.  while I haven’t thrown much at it, I’m just amazed that so far things are working.

When you think that between the jail-break to unlock the ability to run programs combined with a CPU translator, and Win32 to Win32 thunk / translation program, why on earth did this thing ship without it?  It’s amazing that between trying to launch a platform with no inertial for applications after Android &  Apple were selling millions of hardware units, and billions of software units, and cutting the past applications.  It’s just crazy.

And then Microsoft did their normal thing when something goes wrong, which is basically end it, and destroy all evidence it existed.  There is no Windows 10 upgrade for the Surface, even though Windows 10 IOT has been hacked to run from a USB stick on the Surface, but it’s insanely slow.

I figured since this is kind of hard to find I’ll just mirror it on Source Forge… along with the source.