14

Is there any possibility to update LXSS on Windows from 14.04 to 16.04?

sudo do-release-upgrade

does not work.

  • @Ramhound I found a solution :-) – vladon Jul 29 '16 at 16:09
11

Answer: YES. This wasn't possible before, but now you can now update to 16.04 - with a little bit of work and patience.

Step 1: Update Windows to build #14936 or greater. (As of 2016-10-06, this is on the Windows Insider "Fast Ring".) To check your build number, first press "Win+R" and then type "winver" and ENTER.

Step 2. Install or Upgrade Linux using one of these three options:

Option A: If you have not yet installed the Linux Subsystem, you can simply install it from "Add or Remove Windows Components" and it should install version 16.04 by default.

Option B: If you have already installed the Linux Subsystem and you want to keep your environment, you can update it to 16.04 by executing "do-release-upgrade" from bash.

Reference: https://msdn.microsoft.com/en-us/commandline/wsl/release_notes#build-14936

EDIT: The following "full reset" method does not appear to work:

> lxrun /uninstall /full
> lxrun /install
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty
3

There is a way now, but it's somewhat unsupported, and do read the caveats:

https://github.com/Microsoft/BashOnWindows/issues/482#issuecomment-274584657

Quote from the post by Whorfin:

sudo -S apt-get remove screen
sudo -S apt-mark hold procps strace
sudo -S env RELEASE_UPGRADER_NO_SCREEN=1 do-release-upgrade

Sometimes this works straightaway. Sometimes it breaks, requiring a retry as follows

sudo -S dpkg --configure -a
sudo -S env RELEASE_UPGRADER_NO_SCREEN=1 do-release-upgrade

Repeat until done and ready for next steps.

I had to answer a full-window prompt to "restart services"

On one system I had to review changes to /etc/default/rcS

On all systems so far I had to review a change which added the regular [non -security] distro to /etc/apt/apt.conf.d/50unattended-upgrades

...and miscellaneous saying "y" to continue etc

After all that, the following:

sudo -S rm /etc/apt/apt.conf.d/50unattended-upgrades.ucf-old
sudo -S dpkg --configure -a
sudo -S apt-get update
sudo -S apt-get upgrade
sudo -S apt-get dist-upgrade
sudo -S apt-get autoremove

And good to go!

An aside - before I knew all this, I did the upgrade w/o the apt hold, and broke ps.

Recovering required not only the advice from others, but one more shared library package, as libprocps.so.3 was missing.

So, recovering a system with broken ps looks like this:

wget http://mirrors.kernel.org/ubuntu/pool/main/p/procps/procps_3.3.9-1ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/s/strace/strace_4.8-1ubuntu5_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/p/procps/libprocps3_3.3.9-1ubuntu2_amd64.deb
sudo -S dpkg -i procps_3.3.9-1ubuntu2_amd64.deb
sudo -S dpkg -i strace_4.8-1ubuntu5_amd64.deb
sudo -S dpkg -i libprocps3_3.3.9-1ubuntu2_amd64.deb
1

https://github.com/Microsoft/BashOnWindows/issues/482

sudo do-release-upgrade -f DistUpgradeViewNonInteractive -d # Screen is broken.
1

Canonical and Microsoft have released Ubuntu as a Windows app store application. To install the Ubuntu on Windows app you must have Windows 10 version 16190.0 or later installed.

enter image description here

  1. The uninstall process will overwrite everything from the old bash on Ubuntu on Windows environment, so backup all the data you want to save from the old bash on Ubuntu on Windows environment.

  2. Uninstall your previous environment. Open a command line (cmd.exe) with elevated permissions and type:

    lxrun /uninstall /full
    

    This only applies to WSL on Windows 10 1703 and 1607. WSL on Windows 10 1709+ can be installed from within the Windows Store UWP application.

  3. To find the app in the Microsoft store, just type Ubuntu in the search bar, and click install to install it.

Update

Ubuntu 18.04 is currently available in the Microsoft store.

0

To fix screen, just create the directory /var/run/screen as root: sudo mkdir /var/run/screen. Unfortunately, this is not persistent.

0

A few packages need to be held back (ref: BoW Issue 482) and the upgrade needs to be invoked without use of screen:

$ sudo -S apt-mark hold procps strace sudo
$ sudo -S env RELEASE_UPGRADER_NO_SCREEN=1 do-release-upgrade

Source: github.com/kennethreitz/wsl-guide/blob/master/update.rst

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.