-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down #8883
Comments
|
@TylerJaacks based on the kernel version you posted, you're using |
Yeah so I just figured it out now whenever I run the command and it just takes a while and gives me |
If I am not wrong then it's only available to insiders for now, or is it available for all? |
download 0.67.6 in |
So I just gave up on this Preview and will wait for Stable cause it works fine on Stable Windows 11 Branch and then Systemd just breaks and If I try to run |
So I have the same issue. It was working previously so I have no idea why it stopped working. I am using version from github releases. Here is the output for --version.
|
Problem solved: Thanks to @echoechoin. |
Although the question was asked for Windows 11, the same error also comes up in Windows 10 installations if some updates are missing. These steps are for W10 users.
This "install from Store" might also solve W11 problems. Check that first if this error happens. |
I'm having the same issue on windows 10 pro
|
@luc-languagetools your system seems ready to use it. I am guessing you have forgotten to activate it in |
I already have
in |
it is not
PS: this PS: please refer to this post down below for a short intro/warning about terminal editors: #8883 (comment) |
@yilmazdurmaz you are correct, I had been mistakenly editing %USERPROFILE%.wslconfig
should go into |
@yilmazdurmaz @luc-languagetools I cant find the /etc/wsl.conf on the filesystem, do I need to create it myself |
I have the latest release of WSL, but /etc/wsl.conf is not present in the filesystem, do i have to manually create it? |
@Oluadepe yes, if |
I just did and it worked. 🎉🎉🎉 |
Let me unify the answers
EDIT: 2023-03-07 in addition to /etc/wsl.conf with correct content:
|
Распределение по умолчанию: Ubuntu-20.04 I got an error:
I did all the things above:
I did run |
@Luxpy what version of WSL are you running? I can confirm that systemd works okay in Ubuntu 20.04 and WSL 1.0.0:
|
check this link if you haven't yet. https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/
You need to have the "Store version" from now on. Open "Microsoft Store" app and search "Windows Subsystem for Linux". I forgot where I read but there was a statement like "WSL will continue with the store version and receive all new 'feature' updates from there". and its latest version has the following signature (at least mine shows no update available). Also use
for a few other important details, check my above post: #8883 (comment) |
Yup. This worked like a charm! Thanks |
Hi @yilmazdurmaz , Thanks in advance. |
In case you use your own laptop, just find a permissive internet (a friend's maybe). If it is a company PC/laptop and you are in constant use of WSL, especially for docker containers, you need to contact your administrators to have it installed. otherwise, any other way you install it may seem offensive to them. |
if you use WSL. Systemd command => Sysvinit command |
Hi! im trying to make systemD work on WSL, followed all the instructions from above (i couldn't install KB5020030 as it keeps failing telling me This Update Is Not Applicable To Your Computer, tried from 21H1 version and upgraded to 22H2 version with no sucess). Tried with ubuntu 20.04 and upgraded to 22.04 but still didn't work: systemctl status --no-pager sudo cat /etc/wsl.conf any ideas? |
your wsl version is 1.1.3.0 which means you already have a compatible version. that KB update possibly fails since you try to use arm64 on x64, or vice versa (you downloaded a wrong version).
each distro is a new virtual machine, and each machine must be configured separately to start with systemd, then must be restarted.
there is one thing I am not sure about: this might require an x64 machine but you use x86 (32bit). and one more possible thing is, I don't know if has any relation, is WSL versus WSL2; can't say if 1.1.3.0 is possible with WSL but worth checking. try the above way first, then check these possibilities. EDIT: After receiving the next answer, I put the "set-version" step in case someone in the future reads these steps. we need WSL2. |
Hi, thanks for your resnpose: tried the x64 version but when it fails, just in case ive tried all versions, and tried with the 21H1 and 22H2 (i was on 21H1 before thinking having systemD was a good idea xD..) C:\Users\diegu>wsl --list C:\Users\diegu>wsl -d Ubuntu-20.04 About the wsl or wsl2 version you pointed me in the right direction: C:\Users\diegu>wsl -l -v
C:\Users\diegu>wsl --set-version Ubuntu-20.04 2 Conversión en curso. Esta operación puede tardar unos minutos. C:\Users\diegu>wsl -l -v
C:\Users\diegu> and 👍 tadaaa! thank you very much!!! |
nice! I wasn't sure about that. It is good to know WSL2 is required to get a working SystemD. |
Thank you very much! I met the same problem and with your help I solved it. |
+1 here... seeing this now on a fresh Windows 11 install (22631.3527) using "Turn Windows features on or off" and selecting "Windows subsystem for Linux". I used the dism.exe trick above with apparently updates it again with a newer version and sovles the issue. My understanding has always been that dism and "Turn Windows features ..." were basically the same thing. |
I can confirm, adding: [boot]
systemd=true inside
|
I'm facing similar issue and I've tried everything suggested here, still can't get it to work. |
I am still not able to resolve: WSL version: 2.2.4.0 added
in /etc/wsl.conf Please help |
@owlcode3 "tried everything" is a very misleading statement. you possibly missed one of the working solutions we discussed above. this is a long thread so please make sure you followed messages correctly, and if it still fails prepare a more detailed "help me" post, that includes WSL version, config file path and content etc. @suyash2819 did you copy-pasted as-is? you got a single line here, but it sould be at 2 lines (I am sure you have already seen how). for both of you, please make sure you restarted WSL at leat, or you PC to make sure, after you installed it clean. |
How'd you tagged my comment as misleading when you don't know all I've done to troubleshoot the issue? |
because everyone tell "I have tried everything", yet they do not tell us what they have really tried, and eventually we do find out that they haven't really tried everything because they have really missed something. And here you are telling us the same thing without giving us any details on what you have tried. Please, stop arguing and enlighten us in that issue you have created. I am in the hospital for a family member and don't have much time, so I may not be the one to give you a solution. yet, i will try to check your logs later. so please keep your cool and patience. |
@yilmazdurmaz I have written it in 2 lines, have shutdown the WSL and restarted - it didn't work, and I restarted my PC but still it's the same. do you think the config which I shared from WSL --version are correct? |
numbers seem to be alright, but reinstalling is worthy to try. check this link and try the it is another useful answer in this discussion, yet it is easy to miss among all the posts in the discussion. @suyash2819 other than that, file content and distro packages are important. hard to pinpoint, so please try to check my answers in the discussions. Over the years, I tried to compile in a few posts the problems we have seen and possible solutions we applied. I just could not work on them in last 7-8 months, but in that time other users have added new solutions mostly on installing the right version of WSL. |
Hi! just to check, execute from windows command line: *wsl --list -v* to
check if your vm is using wsl version 2.
Regards.
…On Tue, Jun 18, 2024 at 4:12 PM Yılmaz Durmaz ***@***.***> wrote:
Would you recommend uninstalling the WSL and installing it again from the
store?
numbers seem to be alright, but reinstalling is worthy to try. check this
link and try the dism command given there: #8883 (comment)
<#8883 (comment)>
it is another useful answer in this discussion, yet it is easy to miss
among all the posts in the discussion.
@suyash2819 <https://github.com/suyash2819> other than that, file content
and distro packages are important. hard to pinpoint, so please try to check
my answer in the discussions. Over the years, I tried to compile in a few
posts the problems we have seen and possible solutions we applied. I just
could not work on them in last 7-8 months, but in that time other users
have added new solutions mostly on installing the right version of WSL.
—
Reply to this email directly, view it on GitHub
<#8883 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYVPIDBNUJ6YN5NY72Z2Z6LZICIBBAVCNFSM6AAAAAAQU2YG6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWHA4DINBVGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I uninstalled, reinstalled, it gave another error which I had to correct from my BIOS and then it all worked. |
How were you able to do it? |
I did exactly what you stated here. for some reasons my kernel version still remains at 5.10.102.1 |
@owlcode3, I could not follow changes to WSL in recent months. It is possible 21H2 got old and current releases might not work/install on it. Small possibility, nonetheless a possibility Other than that, you might have enabled Hyper-V on your first install and it might be the reason yours don't update to newer versions. Check if this is the case and disable its traces. Also try to completely remove all WSL features along with Hyper-V. Then try again this "dism" command. I don't think it would be a thing for you, but also check your BIOS if the virtualization is enabled. |
I think It's called HypervisorPlatform on my system, and I've enabled and disabled It, It doesn't make any difference. |
Its still not working Error print:
/etc/wsl.conf:
latest version 2.2.4.0 and windows version info
on Ubuntu
|
@MeechaPooch you seem you have edited the config file to add default user. My guess is that you used an editor that changed the line endings from linux format (LF-0A) to dos format (CRLF-0D0A). system fails to load the config file in this case. try Fixing it depends on the editors to use and their settings for this format, and it will be long to give instructions here. Please search the internet about fixing this line ending problem. |
I've verified that it is properly loading the conf file and still not booting with systemd |
I am clueless now. Your system seems ready and you say the config file is fine. I wonder if something has changed (or a bug) about the "Home" editions. Do you guys have a chance to install from scratch including Windows? (chance to use another version?) |
I had a recent installation experience, and honestly it should be this easy now. My old pc/laptop all broke and I was on a borrowed Mac for a while until I found out to side install windows on it. Then had to try my old WSL disks since the disk they are on was giving errors. so I had to install WSL again. The link has a recent (from last december) steps to install WSL 2. First 3 steps are there to make sure WSL is installed. Then, on step 4, after running that kernel update package, I used the 'wsl --update' command and then 'wsl --version' command worked giving the current 2.2 number. (don't forget to step 5 after this) after importing one of my old images, it was running fine with systemd as the PID 1, showing these 4-5 steps are nowadays pretty enough to run systemd, unless your linux distro or config file has the problems I listed in my early answers. |
I want to share my experience about why it might be stuck at I had a few days to work on the install/update steps. (I messed up my registry keys, so had to reinstall). I have found out that I was just lucky not get any problem because of one of my usual system installation step: install system updates then do whatever else needed. This time around, I tried to install WSL/2 before any update: Yep, it totally got me unprepared, and messed with my sanity. As I had never have a problem getting the latest version before, it was though for me to identify the problem. That small update file from step 4 on the above link was installed, yet the version was still the old one. On Win 10 22H2, the default version that comes is In the next clean attempt, I have found the store link to the WSL/2 update (is missing from store nowadays) and installed it. Surprise!! It did not work as expected. Even after installing store version, it kept the Finally I went a little deeper. I have fount out that the new wsl version is installed under
I followed the link and found out that I had already posted about it, alas without knowing why exactly: At least update your system using As soon as I installed this update, my wsl was running the latest I reinstalled windows one more time and tried a slightly different approach: installed all windows updates that the Windows Update in the settings finds, and use only a single command that comes with default wsl, HERE ARE THE STEPS: Long story short, here are the 4 steps to install
PS: In the future, this discussion may go longer and this post might not be easy to find. Please warn user with the issue having stuck at 5.10.xx line to first update their system to latest or to the ones mentioned above. Only then discuss other issues, possibly tied to EDIT: "2.2.xx" is actually the WSL version, but "5.10.xx" is the kernel version. I didn't want to edit the text above, so a correction comes here: kernel versions for "2.2.xx" line is "5.15.xxx"; currently WSL version: 2.2.4.0 Kernel version: 5.15.153.1-2 WARNING: when using |
I still had issues with |
It worked after an update |
|
Version
Microsoft Windows [Version 10.0.22621.521]
WSL Version
Kernel Version
5.15.57.1
Distro Version
Ubuntu 22.04.1 LTS
Other Software
N/A
Repro Steps
Enable
systemd
via/etc/wsl.conf
Run
sudo systemctl list-units --type=service
Expected Behavior
List of services show.
Actual Behavior
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: