Windows 10 Ubuntu 16.04 upgrade to 18.04: package systemd 235-3ubuntu3 failed to install/upgrade: installed systemd package post-installation script subprocess returned error exit status 1

Bug #1748659 reported by Sjors
30
This bug affects 11 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Critical
Balint Reczey

Bug Description

This was fresh Ubuntu 16.04 instance on Windows 10, running inside a Virtual Box on an iMac. I did an apt-get dist-upgrade before attempting to upgrade to 18.04.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: systemd 235-3ubuntu3
ProcVersionSignature: Microsoft 4.4.0-43-Microsoft 4.4.35
Uname: Linux 4.4.0-43-Microsoft x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
CurrentDmesg: Error: command ['dmesg'] failed with exit code 1: dmesg: read kernel buffer failed: Function not implemented
Date: Sat Feb 10 18:59:28 2018
Dmesg:

ErrorMessage: installed systemd package post-installation script subprocess returned error exit status 1
Lsusb: Error: command ['lsusb'] failed with exit code 1:
ProcInterrupts:

ProcKernelCmdLine: BOOT_IMAGE=/kernel init=/init ro
ProcModules: Error: command ['sort', '/proc/modules'] failed with exit code 2: sort: cannot read: /proc/modules: No such file or directory
RelatedPackageVersions:
 dpkg 1.19.0.5ubuntu1
 apt 1.2.24
SourcePackage: systemd
SystemdDelta:
 [EXTENDED] /lib/systemd/system/rc-local.service → /lib/systemd/system/rc-local.service.d/debian.conf
 [EXTENDED] /lib/systemd/system/user@.service → /lib/systemd/system/user@.service.d/timeout.conf

 2 overridden configuration files found.
Title: package systemd 235-3ubuntu3 failed to install/upgrade: installed systemd package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to xenial on 2018-02-10 (0 days ago)

Revision history for this message
Sjors (sjors-sprovoost) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I am not sure what you mean by "fresh Ubuntu 16.04 instance on Windows 10".

do you mean you used Ubuntu app from the Windows store?
You used virtualbox / vmware / hyper-v virtualisation on Windows?

I understand that windows 10 itself is running in a virtualbox machine, on top of Mac OS. But I need to also understand which virtualisation technology is used to perform the nesting to do the jump from Windows to Ubuntu.

Revision history for this message
Sjors (sjors-sprovoost) wrote :

> Do you mean you used Ubuntu app from the Windows store

Correct.

So my setup is:

iMac running MacOS 10.13.3
  Virtual Box 5.2.6
    VM running Windows 10 Home Edition

Then on Windows 10 I install Ubuntu from the Windows store and then ran:

do-release-upgrade -d

I tried the latter command again a few times but it always gets stuck at the same point.

Perhaps related: when I try to do an apt-get upgrade I get this version complaint:

udev : Depends: libudev1 (= 229-4ubuntu21.1) but 235-3ubuntu3 is installed

Maybe that's just because I got stuck in the middle of an upgrade.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Ubuntu 18.04 is not yet supported in the Ubuntu app on windows (WSL).
"Upgrading" like that will not work, and render the instance unusable / it will not be able to initialize at all.

Why are you doing this?

Why not simply run Ubuntu VM, in Virtual Box on your MacOS? We do publish Ubuntu virtualboxes I believe, and/or it is easy enough to install Ubuntu Server ISO in Virtual Box directly.

You can find current 18.04 bionic pre-releases server ISOs at http://cdimage.ubuntu.com/ubuntu-server/daily/current/

Revision history for this message
Sjors (sjors-sprovoost) wrote :

Ubuntu 18 in a Virtual Box directly on my Mac works fine.

However, I'm trying to make it easier for Windows 10 users to compile the Bitcoin Core application from source. This is currently problematic with Ubuntu 16, so I'm trying to see if it can be made to work with Ubuntu 18 (at least once that's ready). Since I don't have a dedicated Windows machine, I'm running Windows in a VM. I don't mind breaking it.

Where can I track progress for (experimental) Ubuntu 18.04 support for the Ubuntu app on Windows?

Revision history for this message
Sjors (sjors-sprovoost) wrote :

Current instructions for reference: https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md

Maybe a Virtual Box on Windows would be an alternative.

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 1748659] Re: Windows 10 Ubuntu 16.04 upgrade to 18.04: package systemd 235-3ubuntu3 failed to install/upgrade: installed systemd package post-installation script subprocess returned error exit status 1

Hey,

On 10 February 2018 at 21:34, Sjors <email address hidden> wrote:
> Current instructions for reference:
> https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md
>
> Maybe a Virtual Box on Windows would be an alternative.
>

You do not need windows at all to cross-compile..... the instruction
is to use cross-compilation on Ubuntu, to generate binaries that you
can use on Windows.
(They choose to use Ubuntu WSL, because they assume the host machine
is windows instead of Mac OS X, but you already have virtualbox so
install Ubuntu there)

You can use Ubuntu in a VirtualBox on MacOSX to do the cross
compilation, copy the binaries out of that VM, into the Windows 10 VM
to use them.

Or you could install mingw-w64 toolchain on mac os x -> e.g. using Homebrew.

You simply need *nix like environment with a mingw-w64 toolchain, of
which any Ubuntu or Homebrew should do.

Also they never ask you to _upgrade_ to 18.04, you should be able to
simply use the Ubuntu WSL app directly, without upgrading it to a new
release.

--
Regards,

Dimitri.

Revision history for this message
Sjors (sjors-sprovoost) wrote :

I know I don’t need Windows to compile for Windows, but I’m writing / updating those instructions for Windows users. Currently the Ubuntu 16 instructions tell the user to add sources from a newer release, which could cause problems.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
James Harris (wopian) wrote :

Same issue occurs with 17.10 -> 18.04 on WSL

Revision history for this message
Patrick M. Womack (ipat8) wrote :

I've gotten the release to upgrade to 18.04 on WSL, the issue I'm running into however is that systemd will not reinstall. TBH WSL does not require systemd to operate, but it defiantly makes the system angry if it can't setup a way to manage startup. Just for anyone reading this via google, if you want to push your WSL build to 18.04, DON'T. For those of you who are ignoring my warning, you can push it to 18.04 BUT YOU MUST HOLD SYSTEMD. If you try to run an upgrade and allow systemd to be upgraded the upgrade will fail and you will be left with a completely borked system. My thoughts at the moment is to try and grab a 16.04 systemd package and use that until we get a stable 18.04 one.

Revision history for this message
Patrick M. Womack (ipat8) wrote :

Update for you all. I forced systemd down to the 16.04 version, reconfigured it and it was happy. As for upgrading it to the 18.04 version, YOU MUST PURGE THE ENTIRE /usr/lib/tempfiles.d/ DIRECTORY. One I did that, even thought the install will fail, I was able to get systemd reconfigured. It now properly responds to dpkg --configure commands and the system is no longer in a broken state.

As for how to resolve this upstream, I have a felling this has to do with how WSL handles systemd (as, it doesn't, because WSL ignores systemd for the most part.) most likely related to the fact that we're not working with kernels, and systemd doesn't have anything to hook into during the upgrade.

If you're having trouble with a system you forced to the 18.04 beta let me know as I'm going to write a script here in a second to resolve the issue for you.

Revision history for this message
Patrick M. Womack (ipat8) wrote :

Ok, here it is. YMMV but this should theoretically fix systemd on 18.04 WSL.

Balint Reczey (rbalint)
Changed in systemd (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Balint Reczey (rbalint)
Revision history for this message
Balint Reczey (rbalint) wrote :

Create tmpfiles for persistent journal in postinst only when running systemd - that fixes the issue and the upgrade succeeds.

Changed in systemd (Ubuntu):
status: Confirmed → Triaged
tags: added: patch
tags: added: id-59ea8773d0c66354e179d305
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 237-3ubuntu10

---------------
systemd (237-3ubuntu10) bionic; urgency=medium

  * Create tmpfiles for persistent journal in postinst only when running
    systemd (LP: #1748659)

 -- Balint Reczey <email address hidden> Fri, 20 Apr 2018 18:55:56 +0200

Changed in systemd (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.