Skip to content

plans for alternative distributions: e.g. Fedora, ArchLinux, etc? #8

Closed

Description

My Windows machines always have a dual-booting Linux partition: playing games in Windows, and getting work done in Linux. As such, I'm extremely excited about WSL and Ubuntu on WSL.

I'm curious about whether or not there is room for more choice in distributions? Is there an open specification that describes what was necessary for Ubuntu to do? Can alternative distribution images that conform to this specification be used instead? Is it possible to build such an image myself, or is there a signing requirement?

I'd love to see ArchLinux and Fedora alternatives, once the dust settles of course.

Activity

  1. primeinc commented on Apr 7, 2016

    @primeinc

    This was the first question I had when watching the demo video +1

  2. jokeyrhyme commented on Apr 7, 2016

    @jokeyrhyme
    Author

    An effort to release an open specification could be related to #1 ?

  3. Krutonium commented on Apr 7, 2016

    @Krutonium

    I would be all over an Arch version of this.

  4. jernejs commented on Apr 7, 2016

    @jernejs

    I replaced the userland with a Gentoo stage 3, which didn't seem to break anything (however, emerge doesn't work due to failing sanity checks on /dev).

  5. eugenelet commented on Apr 7, 2016

    @eugenelet

    I think that Manjaro is a great arch distribution

  6. RaeesBhatti commented on Apr 13, 2016

    @RaeesBhatti

    I would say that they should make Windows Subsystem for Linux open-source, so that, developers can add their own flavors. Because WSL team will never have enough resources to meet the expectations of such broad community.

    UserVoice issue for making Windows Subsystem for Linux open-source

  7. tkelman commented on Apr 15, 2016

    @tkelman

    WSL doesn't need to be open source for this to be possible. WSL is kernel mode code anyway (I think, correct me if I'm wrong) so I don't think the community would have the ability to compile and run custom patched copies of WSL easily. But for this item, all we'd need is documentation on what modifications Canonical made between the standard Ubuntu distribution (iso or whatever) and the userland-only version that Bash on Windows downloads. And either documentation or source for the C:\Windows\System32\bash.exe launcher/installer, which is a win32 executable so presumably anyone would be able to build an equivalent or modified version to pull down an alternate distro's userland.

  8. benhillis commented on Apr 15, 2016

    @benhillis
    Member

    Tony Kelman (@tkelman) You are correct. We would not need to make the project open source to open up to other distributions. Currently we're focused on delivering a solid bash shell but there are many other exciting potential applications of our technology, including allowing people to select their distro of choice.

    As far as the image we got from Canonical it has absolutely zero modifications. Dustin Kirkland from Canonical has a great blog post with some more info if you are interested.

  9. tkelman commented on Apr 15, 2016

    @tkelman

    I read that blog post when it went up, I'm curious on the technical specifics of which image it's using though. Is it literally the exact http://releases.ubuntu.com/releases/trusty/ubuntu-14.04.4-server-amd64.iso image, or is it a userspace-only version derived from it with the Linux kernel removed?

  10. benhillis commented on Apr 15, 2016

    @benhillis
    Member

    You are correct, it's just the userspace pieces. It's kind of hidden in his post but he points you to the exact .tar.gz:

    So as part of the engineering work, I needed to wrap the stock Ubuntu root filesystem into a Windows application package (.appx) file for suitable upload to the Windows Store.

    (his link points to the xenial version and we're using trusty, but you get the idea)

  11. tkelman commented on Apr 15, 2016

    @tkelman

    D'oh, thanks for that! Does make sense that this would have some commonality with "cloud images" you might use in a container. So it's the "wrap [...] into a Windows application package" equivalent step that we'd need to reverse engineer or get source or documentation of some kind to be able to recreate on a different distro. Should look into whether any other distros have equivalent userspace-only images already prepared.

  12. sjenning commented on Apr 19, 2016

    @sjenning

    I've done it for Fedora:
    https://www.youtube.com/watch?v=lRg0BXhxncM

    How to:
    https://www.variantweb.net/blog/running-fedora-on-windows-10-using-wsl/

    The install is not user friendly as lxrun.exe is hardcoded for the Ubuntu userspace tarball and seems to be the only utility in all of Windows that can actually create proper symlinks on NTFS.

    Need the source for lxrun.exe please!

    # strings lxrun.exe | grep base
    base\subsys\lxss\lxrun\main.cpp
    base\subsys\lxss\lxrun\download.cpp
    base\subsys\lxss\lxrun\install.cpp
    base\subsys\lxss\lxrun\uninstall.cpp
    base\subsys\lxss\lxrun\update.cpp
    base\subsys\lxss\lxcmdlineshared\console.cpp
    base\subsys\lxss\lxcmdlineshared\svccomm.cpp
    base\subsys\lxss\lxcmdlineshared\helpers.cpp
    base\subsys\lxss\tar2lx\lib\tar2lx.cpp   <-- I assume this is the symlink magic
    
  13. 15 remaining items

  14. RoliSoft commented on Sep 1, 2016

    @RoliSoft

    fpqc I wrote a small lib which you can put in /etc/ld.so.preload, and will only affect pacman, so it's safe:

    #define _GNU_SOURCE
    #include <unistd.h>
    #include <libgen.h>
    #include <dlfcn.h>
    #include <linux/limits.h>
    #include <string.h>
    
    int chroot(const char *path)
    {
        // return 0 for pacman
    
        char dest[PATH_MAX];
        if (readlink("/proc/self/exe", dest, PATH_MAX) != -1) {
            char* file = basename(dest);
            if (strcmp(file, "pacman") == 0) {
                return 0;
            }
        }
    
        // passthrough for others,
        // currently results in -1 and errno=38
    
        int (*_chroot)(const char*);
        _chroot = dlsym(RTLD_NEXT, "chroot");
        return (*_chroot)(path);
    }

    Compile it with:

    $ gcc libmockchroot.c -shared -fPIC -ldl -o /lib64/libmockchroot.so
    $ echo "/lib64/libmockchroot.so" >> /etc/ld.so.preload
    
  15. fpqc commented on Sep 1, 2016

    @fpqc

    Roland Bogosi (@RoliSoft) I hope you are putting this in your project, I pull it every time you update it!

  16. RoliSoft commented on Sep 1, 2016

    @RoliSoft

    Further search revealed the fakechroot package, which hooks the file I/O functions and actually rewrites the paths.

    After installation with pacman, you can add /usr/lib/libfakeroot/fakechroot/libfakechroot.so to /etc/ld.so.preload, which will cause all chroot-using applications to not only not fail, but behave as expected if chroot was available.

    This does, however, load the library into all applications. I haven't tested the performance implications just yet, but based on the source, not many operations are done, if chroot is not called by the process.

  17. turbo commented on Sep 1, 2016

    @turbo

    If you are brave, you can try the (undocumented, unstable) dev branch of alwsl.

    alwsl is really two parts:

    • the alwsl.bat management utility (manage WSL, users, snapshots etc.) on the windows side and
    • a custom archlinux distribution containing many custom builds of pacman, root-related libs, makepgk, yaourt etc. in order to operate smoothly within WSL.

    The batchfile version is not the final product, more like a proof-of-concept. The final version of alwsl will be released at some point next week. The final version contains a plugin system for user-defined addons to alwsl systems (like Audio from WSL, a better X setup etc.).

    As I said, ATM the dev branch is undocumented. Download a copy of the alwsl.bat and run it without arguments to see usage information.

  18. fpqc commented on Sep 1, 2016

    @fpqc

    minxomat Have you tried Roland Bogosi (@RoliSoft) 's scripts? I looked at the alwsl.bat thing, and it doesn't even look like it is fixing chroot and fakeroot (fakechroot and fakeroot-tcp). Roland Bogosi (@RoliSoft) has got all the little Arch compatibility hacks ready to go, just remove the ".sample" from the hook script.

  19. turbo commented on Sep 1, 2016

    @turbo

    fpqc If you looked at the script and my above post, I clearly stated that this is a custom distribution. it contains all fixes necessarily for WSL. The distro is downloaded during the install task. It not only fixes fakeroot, but every other error or warning (that I know of atm) you might get in WSL otherwise.

  20. turbo commented on Sep 1, 2016

    @turbo

    Think of it as a replacement for lxrun. Instead of installing and managing a ubuntu server WSL, it does the same with archlinux. Sure you can make a vanilla arch compatible, but this is meant for folks who look for something as simple to run as lxrun itself.

  21. fpqc commented on Sep 1, 2016

    @fpqc

    minxomat Interesting, I'll try it out. It won't delete my /home and /root, will it?

    Also, in the readme you really ought to explain what changed packages you're using.

  22. turbo commented on Sep 1, 2016

    @turbo

    fpqc Well, I don't recommend to use it just now. But you can try. Backup everything in any case.

    Full documentation is ofc included in the final version. Also, not all mods are applied in the dev branch, so there might be some warnings until testing is finished. If you find something, open an issue. It's better to have duplicate issues to be reminded of important things 😄

  23. WSLUser commented on Oct 23, 2017

    @WSLUser

    Are there plans for Red Hat Linux, Kali, and SELinux to be added to the Windows Store?

  24. marcthe12 commented on Oct 31, 2017

    @marcthe12

    Can we sdk to create our own from chroot or tarball

  25. WSLUser commented on Jan 17, 2018

    @WSLUser
  26. WSLUser commented on Mar 7, 2018

    @WSLUser

    Both Kali Linux and Debian are now available on the Windows Store

  27. Biswa96 commented on Mar 7, 2018

    @Biswa96

    My questions Tara Raj (@tara-raj) 1. Who does provide the install.tar.gz file? Does Microsoft make that own or the developer of that distro? 2. Who publish the appx in Windows Store? 3. And last, who build the added distro_name.exe in Appx package?

  28. bitcrazed commented on Mar 27, 2018

    @bitcrazed
    Contributor

    Biswapriyo Nath (@Biswa96) - Tara Raj (@tara-raj) is currently working with several Linux distro vendors to help them bundle & publish their distros to the store - we feel it's best for the distro owners to control and manage the release of their distros on their schedule.

    We believe that it's best for all concerned, if a distro is published from the store under the auspices of the owning organization. This way, when you see "Ubuntu" published by "Canonical Inc.", you can feel confident that it's the real-deal, whereas if you saw "Ubuntu" published by "Joe Bloggzzz the MegaGeek", you might pause and question whether the app is legitimate.

    Distro owners are responsible for everything that goes into their APPX- the distro tar.gz itself, along with the launcher, and any icons/images etc.

    Distro owners fork the sample distro launcher, modify a few settings, and build their launcher app. The launcher app is (deliberately) very simple, and basically handles registering a distro and launching of a distro instance when the user clicks a start menu tile, or calls the launcher's app execution alias (e.g. "ubuntu.exe").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions