Thursday, April 07, 2016

Sweet UNIX Lovin



Sigala: Sweet Lovin


Subtitle: Microsoft and the UNIX lovin
(Verdict: Don't throw away your Cygwin just yet)

I already reported the surprise news that Microsoft has partnered with Ubuntu to deliver a Linux Subsystem within Microsoft Windows.  This will enable binary compatibility of Ubuntu applications within Windows and therefore also including numerous UNIX/Linux command line utilities including command shells like bash.
As of about April 6th Microsoft released the 14316 pre release build that gives you the option to install this subsystem.   Marcus decided to try it out.


Several sleepless hours later ....


When It Worked
If you follow this process and are lucky then you might just get bash and full Ubuntu Linux command line utilities installed on your Windows Installation

- This requires a fresh install :-(
- Further longer-term you will need an Installation Key for Activation
- Don't Forget this is Beta Software containing bugs
- Get yourself a Microsoft ID, preferable to a local userid 
- Join Microsoft Insider Programme
- Download Windows 10 Insider DVD build  14295
- Install that build  (key not actually needed, you can enter it later)



- Set to Fast Ring


- Wait until build 14316 is available to you





- Allow download (4GB?) and install 14316


- After rebooting and letting Windows finish booting




- With my current Slow disks the Upgrade took 1 hour!



- Set Developer Mode


- Control Panel, search  Add Features



- Add Windows Subsystem for Linux



- After Rebooting, run bash, first time prompts you to start and does a download



- I waited one hour, but it turns out I think it was done instantly, it is just they forgot to print out a prompt!

The Big Finish




Just one More Trivial Test


On the Plus Side







Numerous commands are there and do work


On the Very Negative Side

I tried to identically install ksh korn shell on a freshly installed ubunutu 14.04 and on the Windows bash ....




Full update real Ubuntu (not Windows)

Real Ubuntu system installing ksh, korn shell install works of course



Windows, apt-get install is failing because IP STACK SEEMS MISSING

So to Marcus right now, for me there is NO IP Stack, so the bash installation is basically useless.




When it did not work at all
Error 0x80070057

My principal Development and Test environment is of course virtualised.   This allows for duplication and easy rollback among other things


I followed the identical procedure on this already 14295 level Virtual Windows 10 installation which has been a 'reliable' system and multiply upgraded VM since build level 10162.  And that is an age ago I can tell you!

But it just DID NOT work.  After hours of fiddling I backed out to level 14295 and tried a physical not virtual computer as shown above.  That worked fine as detailed above.


Other Notes
- At time of writing you cannot download the .iso install of Insider level 14316

- Hyper V is NOT required to be running or installed for bash to work (I initially thought it was required)



Beta means Beta

Microsoft has the Insider program and Cyanogen Android has the nightly beta Build.  Apple has the Developer Programme.  Etcetera.

These days Enthusiasts want to get their hands on new features but often forget that Beta code can ship with some major defects.

I learnt this lesson with Windows 10 Mobile, build 14291  when I found the Email was 100% broken and Microsoft Band Syncing also screwed.   So it was time to backout!

Beta builds cannot be reliably used for Productive work!

You need to be prepared to revert to a prior build

Or in some cases completely re-install

Don't curse your vendor when this happens, it was your choice.


Mutual Benefits
You might wonder why this collaboration has happened at all.  Aren't both parties totally crazy.  IMHO it's a great partnership, benefit ting both parties

- Microsoft get native UNIX command line at last

- Programmers and Systems people just love the UNIX command line.  It's one reason why OSX, with it's UNIX underbelly,  despite it's proprietary nature is still respected by all Systems folk.

- Ubuntu gets massive exposure on the worlds most popular computing platform

- Ubuntu is likely to get many converts or try outs as a result

- Microsoft gets the UNIX command line kudos and remembers that UNIX/Linux, the Operating system that powers every Smartphone (except Windows mobile), and all of the world's more powerful computers bar bugger all, really cannot be ignored.

- It opens a very wide door to UNIX coexisting with Windows and makes everybody happy




Summary
bash install worked on at least one of my test systems. But the IP stack would seem to be missing from that environment, rendering the installation merely a curiosity but no more at this time.

In a nutshell: don't throw your Cygwin away just yet.  


Links
When Microsoft met bash and Ubuntu