Is it possible to use Fedora Silverblue on GitHub codespaces and WSL-2? If so can I get a pointer to docs on how best to do this?
You got me looking. I’m sure you have found these but there are a couple similar guides, one by our own Fedora Magazine, on getting Fedora up and running on WSL2.
I don’t know that you can just get a Fedora Silverblue rootfs file, it sounds like the type of thing you are going to have to start from a minimal configuration and build up if you want to make it.
@mwoodpatrick I have never tried Silverblue on WSL, but I am eager to hear what steps you have already taken. I am constantly tinkering with WSL and Fedora, and happy to help out.
I am thinking that step 1 is to get a rootfs, but maybe I am thinking wrong…
If that is a good first step, then might you try using docker or podman to export quay.io/fedora-ostree-desktops/silverblue:37 (or whatever tag you want)?
podman run --name silverblue37 quay.io/fedora-ostree-desktops/silverblue:37
podman export -o silverblue-37-rootfs.tar silverblue37
Then:
wsl --import silverblue $HOME\wsl\silverblue $HOME\Downloads\silverblue-37-rootfs.tar
(Change the directory paths as appropriate).
Perhaps you already tried something similar? Curious what your experience has been since you first posted.
While you can probably manage to get a Silverblue rootfs running inside WSL-2, it’s not going to be the same experience and would require a lot of tweaking.
In short, WSL-2 does not run “just” your LInux distribution in a VM so you don’t have access to the kernel command line, the initrd, etc. which are used by ostree/rpm-ostree in Silverblue to set things up.
See linux - How does WSL/WSL2/WSLg work without systemd? - Super User for more details about how WSL-2 works.
Good points. So, even with modifying the kernel command line in .wslconfig, the Silverblue experience can’t be replicated? I know that initrd would not be an option, but I was still hopeful. I will try it soon, but perhaps I will find the barriers that @siosm is pointing out.