Yunohost@WSL2


Ok lets go with this now. But first i need to tell ONE IMPORTANT THING:

DO NOT USE IT ON PROD. ITS FOR LOCALHOST TESTING/DIY/TINKERING ONLY!

Ok. And it will NOT be secure ofcourse Lets Go. Ill try to explain on the go. First i suppose that you already have WSL2 -> https://learn.microsoft.com/en-us/windows/wsl/install and now we need Debian

wsl.exe --install -d Debian

Lets prepare it to install everything:

run command

sudo nano /etc/wsl.conf 

and inside type:

[boot]
systemd=true

get out using Ctrl+X and Yes to confirm file save.

in same way we need to ADD sth to /etc/apt/sources.list:

sudo nano /etc/apt/sources.list
#Add At the end
deb [trusted=yes] http://forge.yunohost.org/debian/ bullseye stable

now we will have a systemd running in debian after restart. But now lets do some other things. Yunohost installer forces us to make a root password:

sudo passwd

after that “su” command should work (exit to exit from root shell)

let install needed stuff and make system using iptables (yunohost requires so we will use it

sudo apt install iptables curl
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

now if you have a Nvidia GPU in your PC we need to go outside debian for a moment and think about THIS WSL ISSUE and make it working properly. In windows run CMD AS ADMINISTRATOR (press WIN key, type CMD and right click “run as administrator”) go into:

cd c:\windows\system32\lxdd\lib
del libcuda.so
del libcuda.so.1
mklink libcuda.so libcuda.so.1.1
mklink libcuda.so.1 libcuda.so.1.1
wsl.exe --shutdown

Let explain: libcuda.so, libcuda.so.1 and libcuda.so.1.1 ARE THE SAME and windows nvidia driver for some reason creates three files here instead of (how is it done in linux nv driver) creating only libcuda.so.1.1 and making symbolic link with anchors at libcuda.so and libcuda.so.1 directed on .1.1 file.

So we are “fixing” it in linux way AND at the end stopping WSL machine so debian will be rebooted AND all stuff that we done before will be “done” for example all mounting points will be reestablished, systemd will be started etc. So lets go now back into Debian console (it will take a while as we need to start it up)

ip a

find block with 172.xxx.yyy.zzz IP address and copy that. And let install stuff 😉

sudo apt install yunohost

Now it should go on and you an follow a “post installation config” as it is on yunohost docs. BUT instead of ::1 in “hosts” you should use this IP address from previous step.

Have Fun!


Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments