News: 1637175553

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Ubuntu desktop team reports 'proof of concept' systemd on Windows Subsystem for Linux

(2021/11/17)


Canonical may be working on introducing systemd to Ubuntu on Windows Subsystem for Linux (WSL), according to a post by Ubuntu Desktop Team Technical Leader Didier Roche.

Roche's remarks were [1]posted on the Ubuntu Desktop Team Updates two days ago. "PoC of systemd on WSL at startup of an instance," he said, raising hopes (or fears) that the component will be introduced in a future WSL 2 update. The remark was first [2]spotted by Phoronix.

Systemd is an optional Linux component for managing services and other system software, and widely used by the most popular distributions, such as Debian, Ubuntu, SUSE, and the Red Hat family. The original WSL did not support systemd for technical reasons, starting with the fact it had its own init process.

[3]

When WSL 2 was introduced, with a new container-based model for running Linux on Windows, supporting systemd seemed feasible (Linux distros running on Micrsoft's Hyper-V hypervisor have no problem with it) but Microsoft continued with its own init presumably for reasons related to the integration between WSL and the rest of Windows.

[4]

[5]

WSL 2 users though have frequently requested systemd support. The reasons are many and varied, but the lack of systemd does introduce friction for users familiar with other distros that include it. Canonical's Snap packaging system depends on systemd, and since Canonical regards Snap as the future of application deployment one can understand why the company is keen to have it supported in WSL, particularly now that GUI Linux applications are supported in Windows 11.

Another problem is that users do not always realise that commands they use like systemctl for managing services are actually part of systemd. As far as some are concerned, this is a [6]bug in WSL 2, in this case because an attempt to start the SSH daemon gave the error "System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down."

[7]

There are a number of workarounds to enable systemd on WSL 2 but an official solution would still be welcome.

[8]Fedora 35 is out: GNOME 41 desktop, polished UI, easier-to-install closed-source apps

[9]Windows Subsystem for Android: What's the point?

[10]Microsoft turns Windows Subsystem for Linux into an app for Windows

[11]Windows 11 in detail: Incremental upgrade spoilt by onerous system requirements and usability mis-steps

[12]Penguin takeover: We tried running some GUI Linux apps on Windows the official way – and nothing exploded

It is important that systemd does not only run, but runs as PID 1, the first process in the operating system. A developer has come up with a project called [13]genie to ensure this happens.

Then there's [14]Distrod , which is described as "a systemd-based meta-distro for WSL2 that allows you to install Ubuntu, Arch Linux, Gentoo and many other distros with systemd in a minute, or make your current distro run systemd." We note such solutions are unofficial.

[15]

Here's Distrod, one of several unofficial solutions for systemd on Windows Subsystem for Linux 2

Both projects work by introducing another container. Distrod, for example, "is a binary that creates a simple container that runs systemd as an init process, and starts your WSL sessions within that container." According to its author, even WSLg, for GUI desktop application support, works with Distrod. Genie, so called because it creates a systemd "bottle," also works with WSLg but the docs state that "Linux GUI apps started from the Windows Start Menu items created by WSLg will run outside the bottle."

Canonical is not Microsoft, of course, but has worked closely with the WSL team. There is little doubt that systemd in WSL 2 is a desirable feature for various users, at least as an option, so we will be watching progress with interest. ®

Get our [16]Tech Resources



[1] https://discourse.ubuntu.com/t/desktop-team-updates-monday-15th-november-2021/25197/5

[2] https://www.phoronix.com/scan.php?page=news_item&px=PoC-Ubuntu-WSL2-systemd

[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2YZWJmmOeXZKJk2Xz2Co@SwAAAFg&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YZWJmmOeXZKJk2Xz2Co@SwAAAFg&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YZWJmmOeXZKJk2Xz2Co@SwAAAFg&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[6] https://github.com/microsoft/WSL/issues/7129

[7] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YZWJmmOeXZKJk2Xz2Co@SwAAAFg&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[8] https://www.theregister.com/2021/11/02/fedora_35/

[9] https://www.theregister.com/2021/10/29/windows_subsystem_for_android_hands_on/

[10] https://www.theregister.com/2021/10/12/wsl_offered_as_app/

[11] https://www.theregister.com/2021/10/05/windows_11_in_detail/

[12] https://www.theregister.com/2021/04/23/wslg_first_look/

[13] https://github.com/arkane-systems/genie

[14] https://github.com/nullpo-head/wsl-distrod

[15] https://regmedia.co.uk/2021/11/17/distrod.jpg

[16] https://whitepapers.theregister.com/



msobkow

WSL is a joke, and so is WSL2. Neither will let me work on the kind of projects I do; I tried. With WSL1, you couldn't even build a package for distribution because you couldn't do a chroot.

Nope. VMs for me. Started with Microsoft's limited VMs, and now I'm on VMWare Workstation 16. THAT is how you do Linux on Windblows. :)

"2 users though have frequently requested systemd support"

jake

That many, eh? Roughly twice as many as I expected.

More seriously, if Windows users want the systemd-cancer, they can have it. Hopefully they'll manage to make it completely incompatible with Linux along the way.

@jake - Re: "2 users though have frequently requested systemd support"

Anonymous Coward

Watch what you're wishing for!

Something tells me this is exactly Microsoft's plan. They'll make it incompatible, and as soon as Linux runs well within WSL, Microsoft will start shutting down any other distribution that doesn't run on Windows. This is where SecureBoot comes in handy, nobody will be able to run Linux unless they login to Windows with a Microsoft account. It took a while but they will soon have total control over every PC.

Re: @jake - "2 users though have frequently requested systemd support"

jake

"Microsoft will start shutting down any other distribution that doesn't run on Windows."

What, pray tell, would be the proposed mechanism for this fantasy?

Re: @jake - "2 users though have frequently requested systemd support"

Doctor Syntax

They have the signing keys for secure boot. So long as you can turn that off it's not an immediate problem but in essence it's a dangerous monopoly. If systems are sold with BIOSs that don't provide for that they have control of what can be booted on a PC. Strange things seem to be happening in the world of BIOS - my current laptop has a very strange one without the many parameters you could tweak on AMI and the like.

Re: "2 users though have frequently requested systemd support"

Anonymous Coward

Poettering has a friend?

WSL 2 users have frequently requested ...

DS999

Probably they aren't really WSL 2 users - they are users of proper Linux who figure if they have to suffer so should WSL 2 users!

karlkarl

As a BSD user, systemd hasn't really affected me but it has been interesting to watch from the sidelines.

One observation I have is that for too long Linux (and the rest of us) has been riding on the ancient UNIX/POSIX design that has proven to be fairly successful. Perhaps it is time for it to go its own way and prove to the world that it is Linux that is great, rather than the old crusty UNIX design. I see Systemd as the first step in doing so.

I'm certainly not saying that all Linux distros should do this. If anything Devuan, Alpine, void, etc can act as the "control" group so if systemd crumbles, we can blame it on that broken design rather than Linux in general.

After all, "GNU Is Not UNIX". It is possibly time for it to prove its worth and perhaps even surpass it? Who knows? GNU favours bigger, entangled software (Emacs, GTK, systemd). I personally am not convinced by this but time will tell.

As for Microsoft embracing it. This is a gimmick. A mere distraction whilst they slowly become irrelevant.

@karlkarl - I don't think so!

Anonymous Coward

No chance for Microsoft to become irrelevant, they have too much control.

Re: @karlkarl - I don't think so!

jake

"No chance for Microsoft to become irrelevant, they have too much control."

Don't you believe it, not even for a minute.

By it's very nature, FOSS will be around as close to forever as makes no nevermind. Corporate closed source software, on the other hand, is just as ephemeral as the company in question. IBM is doomed to die, eventually. So are Amazon, Goophabet, Metaface, Apple and yes, even Microsoft.

Before you poo-poo this, think about it. Where are Burroughs, Sperry, Allied Signal, Philco, Amdahl, Remington Rand, DEC and ROLM? We won't mention the likes of HP, the poor mewling thing, so senile it doesn't know it's dead yet. And that's just for a start.

Re: @karlkarl - I don't think so!

Adrian 4

Like IBM ? Or Rome ?

Their relics are everywhere but the power is long gone.

oiseau

I see Systemd as the first step in doing so.

Seriously?

Are you sure it was sugar you sprinkled on your tea?

From my point of view, after far too many years of work with M$ OSs, the one thing I can say is that systemd behaves just like M$'s infamous registry and that is no coincidence.

To quote another comentard on systemd, here at ElReg:

---

" ... takes root in its host, eats massive quantities of resources as it grows, spreads unchecked into areas unrelated to the initial infection, and refuses to die unless physically removed from the system, all the while doing absolutely nothing of benefit to the host."

---

ie: just like a malignant tumour.

In a nutshell: systemd is nothing but a developer endorsed registry-class© virus set up inside Linux distributions, just like the registry in MS OSs from W95 onwards.

I don't want that sort of crap inside my Linux distribution.

That's why I run Devuan.

O.

Might As Well Use Windows

bazza

Thing is, if one writes off Unix/Posix as a defunct outdated "style", really what other "styles" are there? Windows? MacOS?

SystemD is effectively threatening to overturn everything, eg you no longer program to the Posix API, but to the SystemD API (eg how name resolution is now done; SystemD would have you do that via a Dbus req to itself rather than established Posix API calls for host lookup).

The problem with this is that it is hell bent on nothing less than major revolutionary change when, at most, only minor tweaks to Posix are needed to fix whatever inadequacies are perceived to exist in current implementations like glibc.

This is nuts, because it creates a third ecosystem for the sake of having a third ecosystem, not because there's anything technically and irrevocably deficient about the existing ecosystems. Windows does work. UNIX/Posix does work. MacOS occasionally works (and can be fairly Posixish when squinted at). These things are already pretty heavily optimised (yes, even the Windows kernel plus API is pretty good).There's nothing really to be gained by porting one's code to do things the SystemD way. You lose a ton of portability as well.

Re: Might As Well Use Windows

jake

UNIX and Posix are not the same thing. Stop conflating them, it makes you look silly.

"you no longer program to the Posix API, but to the SystemD API"

Speak for yourself, Kemosabe.

jake

First of all, the systemd-cancer is nothing more than an init. A huge, grossly bloated, inefficient, unsecure, hideous, spaghetti-coded blob of an init, but just an init nonetheless. There are many inits.

Second, the systemd-cancer has absolutely nothing to do with Linux (the kernel). This isn't going to change any time soon, as the kernel maintainer has decreed it so.

Third of all, most of the other little bits & bobs that make up a running system aren't even aware that the systemd-cancer exists, much less require it in order to do their jobs.

Thus, it is easy to put together a very usable system based on the Linux kernel without requiring even a sniff of the stinking mess known as the systemd-cancer.

This is not going to change any time soon.

Also note, the systemd-cancer is not part of the GNU toolkit ... and most of that toolkit consists of small tools, each of which does one thing very well. The bloated monstrosities like EMACS (sorry, rms!) are the exception, not the rule.

Adrian 4

Emacs bloated ?

It might be 'eight megs and constantly swapping' but have you see VS Code ?

jake

Note that the "eight megs" was the amount of RAM in the machine, not the size of the code.

Yes, VS is bloated. That doesn't preclude other code from also being bloated ... and remember that bloated is a relative term.

Doctor Syntax

AFAIK the Gnome crowd are trying to make systemd essential to their stuff. As far as I'm concerned they're welcome to each other but if too much other stuff just assumes systemd and its tentacles are there to be used then it could become worrying time to move to BSD.

Doctor Syntax

"for too long Linux (and the rest of us) has been riding on the ancient UNIX/POSIX design"

The reason I use Linux is that it implements that design.

What I don't get..

Grumpy Rob

..is why you'd run Linux in a Windows subsystem??? If you want to run Linux (i.e. need the stability and security, don't need all the bloat and a bazillion services adding to your "user experience" barff), then just run it. If you need Windows to run a favourite program then run Windows in a VM, where it can't do too much damage.

It’s actually all fine

JamesTGrant

systemd stuff is fine - suffers from a common name where really it should have lots of different names ‘systemd-init’ ‘systemd-time’ ‘systemd-networkd’ etc etc. The thing is, it’s ALL optional, none of it is preventing good work on other projects and some of it (systemd vs initv) is actually good and handy for many people. So, chill out - no one is making you use it - a default is only a default you like if you like the default.

Folk spouting off about systemd is so boring, it’s like complaining about the colour of your neighbour’s car.

Retreating in 5,4,3…

Optimism is the content of small men in high places.
-- F. Scott Fitzgerald, "The Crack Up"