Re: Is there an official Fedora for WSL?
by Iñaki Ucar
On Sun, 7 Jun 2020 at 04:22, Gordon Messmer <gordon.messmer(a)gmail.com> wrote:
>
> On 6/2/20 4:52 AM, Code Zombie wrote:
> > Is there an official branch of Fedora for WSL or a plan to create one?
>
>
> The good news is that it's reasonably straightforward to install an
> unpackaged distribution, you just need a tarball of the distribution.
> And lots of those are available for use with podman (or docker). For
> example I can pull the CentOS 7 container image and then save that to an
> archive:
>
> podman pull centos:7
> podman save centos:7 -o centos7.tar
>
> Inside "centos7.tar" is another tar archive, which is the base layer for
> the centos:7 image. Copy centos7.tar to your Windows system, and
> extract it there. Now you can import that and then run it:
>
> wsl --import centos7 c:\Users\<user>\AppData\Local\Packages\Centos7
> centos7\*.tar
> wsl -d centos7
>
> You'll usually want to set a registry key to change the default user...
> (HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\{
> assigned GUID })
>
> It's not click and run by any means, but it's feasible.
>
> The bad news, though, is that current versions of rpm (and dnf) won't
> work under WSL if you're on a Windows version older than 2004, so you
> might be stuck with CentOS 7 if you're on an employer-managed laptop
> that is still running an older release of Windows (as I am, during the
> work day): https://github.com/Microsoft/WSL/issues/3939
I tried with Fedora rawhide (which already uses SQLite for the rpm
database) and it works fine, but:
- Instead of saving the image, a container must be exported:
$ podman run --name Fedora fedora:rawhide
$ podman export Fedora -o fedora.tar
- /etc/resolv.conf must be deleted, so that WSL creates its own one
and there's Internet access.
- You may want to delete tsflags=nodocs from /etc/dnf/dnf.conf
- I found that [1] does a pretty good job replacing /usr/bin/systemctl
[1] https://github.com/gdraheim/docker-systemctl-replacement
--
Iñaki Úcar
3 years, 11 months
Re: Is there an official Fedora for WSL?
by Gordon Messmer
On 6/2/20 4:52 AM, Code Zombie wrote:
> Is there an official branch of Fedora for WSL or a plan to create one?
The good news is that it's reasonably straightforward to install an
unpackaged distribution, you just need a tarball of the distribution.
And lots of those are available for use with podman (or docker). For
example I can pull the CentOS 7 container image and then save that to an
archive:
podman pull centos:7
podman save centos:7 -o centos7.tar
Inside "centos7.tar" is another tar archive, which is the base layer for
the centos:7 image. Copy centos7.tar to your Windows system, and
extract it there. Now you can import that and then run it:
wsl --import centos7 c:\Users\<user>\AppData\Local\Packages\Centos7
centos7\*.tar
wsl -d centos7
You'll usually want to set a registry key to change the default user...
(HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\{
assigned GUID })
It's not click and run by any means, but it's feasible.
The bad news, though, is that current versions of rpm (and dnf) won't
work under WSL if you're on a Windows version older than 2004, so you
might be stuck with CentOS 7 if you're on an employer-managed laptop
that is still running an older release of Windows (as I am, during the
work day): https://github.com/Microsoft/WSL/issues/3939
3 years, 11 months
Re: Fedora for WSL
by Dan Čermák
Hi Neal,
Neal Gompa <ngompa13(a)gmail.com> writes:
> On Thu, May 13, 2021 at 12:44 PM Matthew Miller
> <mattdm(a)fedoraproject.org> wrote:
>>
>> On Sun, May 09, 2021 at 12:32:00AM -0500, Greg Hellings wrote:
>> > I may be hair-brained to do this, but I've put together an installer for
>> > Fedora on WSL.
>>
>> Hi Greg! Not hair-brained at all -- this is awesome!
>>
>
> A couple of years back, I was working on porting WSL-DistroLauncher to
> be cross compiled with Fedora's MinGW stack. I stopped because of
> *reasons*, but it'd be nice to have the WSL stuff in Fedora and I
> could probably pick that back up and make it a package in Fedora for
> people to trivially generate their own WSL bundles.
Have you looked at openSUSE's patches:
https://github.com/openSUSE/WSL-DistroLauncher ? It works with their
MinGW stack, at the expense of adding autotools into the mix…
Cheers,
Dan
2 years, 12 months
Re: Fedora for WSL
by Neal Gompa
On Fri, May 14, 2021 at 1:40 AM Dan Čermák
<dan.cermak(a)cgc-instruments.com> wrote:
>
> Hi Neal,
>
> Neal Gompa <ngompa13(a)gmail.com> writes:
>
> > On Thu, May 13, 2021 at 12:44 PM Matthew Miller
> > <mattdm(a)fedoraproject.org> wrote:
> >>
> >> On Sun, May 09, 2021 at 12:32:00AM -0500, Greg Hellings wrote:
> >> > I may be hair-brained to do this, but I've put together an installer for
> >> > Fedora on WSL.
> >>
> >> Hi Greg! Not hair-brained at all -- this is awesome!
> >>
> >
> > A couple of years back, I was working on porting WSL-DistroLauncher to
> > be cross compiled with Fedora's MinGW stack. I stopped because of
> > *reasons*, but it'd be nice to have the WSL stuff in Fedora and I
> > could probably pick that back up and make it a package in Fedora for
> > people to trivially generate their own WSL bundles.
>
> Have you looked at openSUSE's patches:
> https://github.com/openSUSE/WSL-DistroLauncher ? It works with their
> MinGW stack, at the expense of adding autotools into the mix…
>
I had not. It seems that their approach was to autotoolize the tree. I
was working on making it build with CMake, mostly because I was
intending to eliminate the Visual Studio solution files entirely in
favor of CMake and submit those upstream.
--
真実はいつも一つ!/ Always, there's only one truth!
2 years, 12 months
Re: Fedora for WSL
by Neal Gompa
On Thu, May 13, 2021 at 12:44 PM Matthew Miller
<mattdm(a)fedoraproject.org> wrote:
>
> On Sun, May 09, 2021 at 12:32:00AM -0500, Greg Hellings wrote:
> > I may be hair-brained to do this, but I've put together an installer for
> > Fedora on WSL.
>
> Hi Greg! Not hair-brained at all -- this is awesome!
>
A couple of years back, I was working on porting WSL-DistroLauncher to
be cross compiled with Fedora's MinGW stack. I stopped because of
*reasons*, but it'd be nice to have the WSL stuff in Fedora and I
could probably pick that back up and make it a package in Fedora for
people to trivially generate their own WSL bundles.
--
真実はいつも一つ!/ Always, there's only one truth!
2 years, 12 months
Re: Is there an official Fedora for WSL?
by Gordon Messmer
On 6/7/20 5:22 AM, Iñaki Ucar wrote:
> I tried with Fedora rawhide (which already uses SQLite for the rpm
> database) and it works fine, but:
>
> - Instead of saving the image, a container must be exported:
Right, you can export a container, or you can save an image and use the
layer tarball inside the resulting tarball. The saved image isn't a
usable tarball itself, but it does contain a usable tarball.
> - /etc/resolv.conf must be deleted, so that WSL creates its own one
> and there's Internet access.
I didn't need to do that when using the "saved" image, for what that's
worth.
> - You may want to delete tsflags=nodocs from /etc/dnf/dnf.conf
Good call.
> - I found that [1] does a pretty good job replacing /usr/bin/systemctl
> [1] https://github.com/gdraheim/docker-systemctl-replacement
I only use WSL for an interactive shell, so I haven't needed to do much
of anything with systemd. Does it not run in WSL, out of curiosity?
3 years, 11 months
Re: Is there an official Fedora for WSL?
by Iñaki Ucar
On Mon, 8 Jun 2020 at 07:12, Gordon Messmer <gordon.messmer(a)gmail.com> wrote:
>
> > - I found that [1] does a pretty good job replacing /usr/bin/systemctl
> > [1] https://github.com/gdraheim/docker-systemctl-replacement
>
> I only use WSL for an interactive shell, so I haven't needed to do much
> of anything with systemd. Does it not run in WSL, out of curiosity?
No, because systemd needs to be PID 1, and WSL has its own init that
knows how to connect stuff back and forth. That script aims to emulate
systemctl and allows you to run services in a systemd-based image.
It's not perfect (I found e.g. that some child processes are not
properly killed), but it works reasonably well.
For WSL2, there's the same issue, and there's another workaround:
https://github.com/arkane-systems/genie
--
Iñaki Úcar
3 years, 11 months
Re: Is there an official Fedora for WSL?
by Florian Weimer
* Iñaki Ucar:
> On Mon, 8 Jun 2020 at 07:12, Gordon Messmer <gordon.messmer(a)gmail.com> wrote:
>>
>> > - I found that [1] does a pretty good job replacing /usr/bin/systemctl
>> > [1] https://github.com/gdraheim/docker-systemctl-replacement
>>
>> I only use WSL for an interactive shell, so I haven't needed to do much
>> of anything with systemd. Does it not run in WSL, out of curiosity?
>
> No, because systemd needs to be PID 1, and WSL has its own init that
> knows how to connect stuff back and forth. That script aims to emulate
> systemctl and allows you to run services in a systemd-based image.
> It's not perfect (I found e.g. that some child processes are not
> properly killed), but it works reasonably well.
>
> For WSL2, there's the same issue, and there's another workaround:
> https://github.com/arkane-systems/genie
Ugh. Thanks for the clarification. And people still think that the
alleged legal issues are the main issue here?
Florian
3 years, 11 months
Re: Is there an official Fedora for WSL?
by Iñaki Ucar
On Mon, 8 Jun 2020 at 10:37, Florian Weimer <fweimer(a)redhat.com> wrote:
>
> * Iñaki Ucar:
>
> > On Mon, 8 Jun 2020 at 07:12, Gordon Messmer <gordon.messmer(a)gmail.com> wrote:
> >>
> >> > - I found that [1] does a pretty good job replacing /usr/bin/systemctl
> >> > [1] https://github.com/gdraheim/docker-systemctl-replacement
> >>
> >> I only use WSL for an interactive shell, so I haven't needed to do much
> >> of anything with systemd. Does it not run in WSL, out of curiosity?
> >
> > No, because systemd needs to be PID 1, and WSL has its own init that
> > knows how to connect stuff back and forth. That script aims to emulate
> > systemctl and allows you to run services in a systemd-based image.
> > It's not perfect (I found e.g. that some child processes are not
> > properly killed), but it works reasonably well.
> >
> > For WSL2, there's the same issue, and there's another workaround:
> > https://github.com/arkane-systems/genie
>
> Ugh. Thanks for the clarification. And people still think that the
> alleged legal issues are the main issue here?
Whatever. The thing is that Ubuntu is there, Debian is there, openSUSE
is there, Kali Linux is there. They have that visibility; Fedora, does
not.
--
Iñaki Úcar
3 years, 11 months
Fedora for WSL
by Greg Hellings
I may be hair-brained to do this, but I've put together an installer for
Fedora on WSL.
It mostly follows the procedures that had been much talked about in a blog
post about running Fedora 33 in the WSL2, but it uses the direct installer
rather than the manual side-loads. It also will install Fedora 34.
Obviously, it's not released into the Windows Store as that requires more
than just some technical bit wrangling. But if you're feeling adventurous,
and you are sometimes relegated to the world of Windows but want to bring
your Fedora along, you can find it here:
https://github.com/greg-hellings/FedoraWSL
Am I crazy? Yep.
Does it work? "Works in dev."
Anything to watch out for? It uses the trustywolf/wslu COPR repository for
installing WSL integration packages. Otherwise it's just raw Fedora bits.
Feel free to flame me if this was a terrible idea.
--Greg
3 years