Skip to content
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

Bedrock will not install properly on WSL #107

Closed
shny-scott opened this issue Mar 7, 2019 · 8 comments
Closed

Bedrock will not install properly on WSL #107

shny-scott opened this issue Mar 7, 2019 · 8 comments

Comments

@shny-scott
Copy link

I decided to try installing Bedrock on the Windows Subsystem for Linux, as that's more convenient for me than rebooting into a Linux distro when I want to run the occasional Linux program. However, upon attempting to install Bedrock over Ubuntu, I was greeted with this:
image
As you can see in the image, I do have Fuse, as WSL comes with it. I have not tried uninstalling & reinstalling it, as when I asked some full-time linux users about that I heard removing Fuse horribly breaks WSL.

After creating the /bin/fuse directory manually on my backup distro (Debian, since you can only have 1 install of each distro), the installer did run and finish. However, after rebooting I found that brl simply left me with a command not found and neofetch still said I was running plain debian. The /bedrock folder does exist though, with (what I assume is, anyway) all its folders intact. Even when going into /bedrock/bin and typing brl or strat, I was simply greeted with another command not found. I tried going back into /bedrock and typing sudo nano compete-hijack-install to see if anything had been stored there, but it seemed to be completely empty.

@paradigm
Copy link
Member

paradigm commented Mar 7, 2019

While you have the fuse package installed, I don't think WSL supports the requisite kernel features for it to work. Copying /dev/fuse over is an interesting idea, but I don't think that will work, as it's not a traditional file, but rather a special interface to the Linux kernel. Other attempts to get FUSE to work under WSL appear to fail as well. For example, see here.

The hijack process takes place in two steps. The first happens when you run the hijack script, which takes over the init subsystem. My guess is by copying /dev/fuse you bypassed the installers sanity checks and got that bit to run. The second step happens upon the first reboot, which shuffles files around. The /bedrock/complete-hijack-install file is just a marker to Bedrock's init that the second part of the install process needs to be done. Based on this github issue, I don't think WSL supports an init subsystem that can be booted or rebooted, and thus the latter bit of the hijack process did not run for you.

Given the lack of FUSE support and the lack of proper init support I don't think we'll be able to get Bedrock working under WSL as it stands now. It might theoretically be possible to work around these issues (and likely other issues), but given our limited manpower I don't think we'll pursue this for the foreseeable future.

I'll look into adding another sanity check to the installer to check for WSL and provide an error message indicating it doesn't work with WSL. Please leave this issue open for now as a reminder for me to do so. I'll close it once I've pushed a release whose installer includes this check.

@paradigm
Copy link
Member

paradigm commented Mar 28, 2019

0.7.2 should report an error about not working on WSL if someone attempts to hijack a WSL instance.

@paradigm
Copy link
Member

Closing the issue assuming 0.7.2 does in fact generate an error message when attempting to hijack WSL. If someone finds it does not, please re-open the issue and let me know.

@lennihein
Copy link

Hi @paradigm,
with the new systemd availability in WSL, is this something that could make a Bedrock hijack possible?
Thanks for your time!

@paradigm
Copy link
Member

As far as I know there were two known blockers:

  • FUSE support, which I think was resolved in WSL2.
  • Init support, which your link seems to indicate is now resolved as well.

So quite possibly!

I don't have a system to test this on, but I know others have been interested in getting Bedrock to play nicely with WSL; I can prod them to take a look. If you have a NULL-safe editor, do feel free to remove the check from the script and give it a try yourself and report back.

@lennihein
Copy link

Sadly, it doesn't run out of the box and bricks the install

<3>WSL (629) ERROR: CreateProcessEntryCommon:570: execvpe /bin/bash failed 2
<3>WSL (629) ERROR: CreateProcessEntryCommon:579: Create process not expected to return

[process exited with code 1 (0x00000001)]

Maybe someone else with more insight on Bedrock can make this work, though :)
Definitely interested in what the future holds!

@paradigm
Copy link
Member

Alas, I don't have any ideas from that error message, but I did reach out to someone who might. If he finds something notable I'll update this issue accordingly.

Even if efforts to get the current Bedrock Linux 0.7.x to work on WSL dead end, I do have some ideas to make the future Bedrock Linux 0.8.x more flexible such that it might be easier to get working. This is something we'll probably get working eventually, in some fashion or another.

@Alxhr0
Copy link

Alxhr0 commented Nov 23, 2022

I think something broke with Path although I'm not sure because it failed to exec bash but it didn't give any useful error message..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants