Hi everybody!
I have read some topics of this forum (1, 2) about installation of OS in the WSL version 2.
I am interesting in the process to generate a WSL image (*.tar.gz) taking as a base the server/desktop Clear Linux distro. I do not have much knowledge about Linux image formats and file systems
Donāt know if it is possible starting with iso image of OS, extract the file system, and generate the WSL file
I will have to update it for showing how you can do the same from the Docker image.
If you have docker installed, here is a the commands (in a nutshell):
docker run -it --name wslclear clearlinux
[inside the container]
2.1 swupd update
2.2 useradd -m -s /bin/bash USERNAME # replace USERNAME by your own
2.3 vi /etc/wsl.conf # edit it to add your user to be the default
Windows Terminal
The issue (currently) is that WSL does not handle the hard links in the TAR files, so we need to extract and re-tar the content with the āāharde-dereferenceā
Hope this helps, and I will monitor this thread in case you have further questions or encounter any issues (hopefully not eheh)
Today I updated the program I was talking about, the changes done now are quite rushed, I plan to rewrite the tool a little.
However, right now, It allow to install ClearLinux images with a simple command:
.\wsld.exe -i clearlinux -d clearlinuxwsl
The documentation is on the github repo. Releases prior to the latest will fail to install clearlinux.
It has a lot of functionality, like being able to login to your docker account, upload wsl images into dockerhubā¦ and basically, download any dockerhub image as an wsl one
Thanks I recently made a new Windows installation and found that if wsl default version is not set to 2 the first time you use the program, Itāll fail to install any image (This is because the helper machine will install as WSL1 and it doesnāt support docker), in my next release Iāll fix that.
(If it happened to you, just convert it to WSL2 or unregister it, set default to 2 and rerun the program)
Thank you very much for your help!!
I will try to do it. I want to implement this solution in WSL2, but I will wait for including ānativeā this version in a Windows stable release.