nullpo-head / wsl-distrod

Distrod is a meta-distro for WSL 2 which installs Ubuntu, Arch, Debian, Gentoo, etc. with systemd in a minute for you. Distrod also has built-in auto-start feature on Windows startup and port forwarding ability.
MIT License
1.9k stars 91 forks source link

Failed to register the distribution #6

Closed alexeiz closed 2 years ago

alexeiz commented 2 years ago

System: Windows 10 Pro, WSL version 2. Here's the log:

[Distrod] Choose a linuxcontainers.org image from the list above.
[Distrod] Type the name or the index of your choice.
[Default: ubuntu]: 4
[Distrod] Fetching from linuxcontainers.org...
[1] 2.0.20210525.0
[2] current
[Distrod] Choose a version from the list above.
[Distrod] Type the name or the index of your choice.
[Default: current]:
[Distrod] Fetching from linuxcontainers.org...
[Distrod] Downloading 'https://images.linuxcontainers.org/images/amazonlinux/current/amd64/default/20211109_05:09/rootfs.tar.xz'...
  [00:00:02] [#########################################################################] 52.27MiB/52.27MiB (25.77MiB/s, 0s)
[Distrod] Download done.
[Distrod] Unpacking and merging the given rootfs to the distrod rootfs. This may take a while...
[Distrod] Now Windows is installing the new distribution. This may take a while...
Unspecified error
[Distrod][ERROR] Failed to register the distribution.
Caused by:
    Failed: cmd.exe /C wsl --import Distrod %LocalAppData%\Distrod "C:\\Users\\me\\AppData\\Local\\Temp\\.tmpdmQenr\\install.tar.gz"
nullpo-head commented 2 years ago

Thanks for reporting! Ah, this is related to the change I made in tar-rs. https://github.com/alexcrichton/tar-rs/pull/252 It looks I had to extend the builder side as well. I will work on it soon.

lisbonjoker commented 1 year ago

        ██████╗ ██╗███████╗████████╗██████╗  ██████╗ ██████╗
        ██╔══██╗██║██╔════╝╚══██╔══╝██╔══██╗██╔═══██╗██╔══██╗
        ██║  ██║██║███████╗   ██║   ██████╔╝██║   ██║██║  ██║
        ██║  ██║██║╚════██║   ██║   ██╔══██╗██║   ██║██║  ██║
        ██████╔╝██║███████║   ██║   ██║  ██║╚██████╔╝██████╔╝
        ╚═════╝ ╚═╝╚══════╝   ╚═╝   ╚═╝  ╚═╝ ╚═════╝ ╚═════╝
=================================================================================
Thanks for trying Distrod! Choose your distribution to install.
You can install a local .tar.xz, or download an image from linuxcontainers.org.

* linuxcontainers.org is a vendor-neutral project that offers distro images for
  containers, which is not related to Distrod. LXC/LXD is one of its projects.
  BTW, you can run Systemd with distrod, so you can try LXC/LXD with distrod!
=================================================================================
[1] Use a local tar.xz file
[2] Download an image from linuxcontainers.org
[Distrod] Choose the way to get a distro image from the list above.
[Distrod] Type the name or the index of your choice.
[Default: Download an image from linuxcontainers.org]:
[Distrod] Fetching from linuxcontainers.org...
[1] almalinux
[2] alpine
[3] alt
[4] amazonlinux
[5] apertis
[6] archlinux
[7] busybox
[8] centos
[9] debian
[10] devuan
[11] fedora
[12] funtoo
[13] gentoo
[14] kali
[15] mint
[16] opensuse
[17] openwrt
[18] oracle
[19] plamo
[20] pld
[21] rockylinux
[22] springdalelinux
[23] ubuntu
[24] voidlinux
[Distrod] Choose a linuxcontainers.org image from the list above.
[Distrod] Type the name or the index of your choice.
[Default: ubuntu]: archlinux
[Distrod] Fetching from linuxcontainers.org...
[1] current
[Distrod] Choose a version from the list above.
[Distrod] Type the name or the index of your choice.
[Default: current]:
[Distrod] Fetching from linuxcontainers.org...
[Distrod] Downloading 'https://images.linuxcontainers.org/images/archlinux/current/amd64/default/20221017_04:18/rootfs.tar.xz'...
  [00:00:15] [##################################################] 155.72MiB/155.72MiB (9.83MiB/s, 0s)
[Distrod] Download done.
[Distrod] Unpacking and merging the given rootfs to the distrod rootfs. This may take a while...
[Distrod] Now Windows is installing the new distribution. This may take a while...
Copyright (c) Microsoft Corporation. All rights reserved.

Usage: wsl.exe [Argument] [Options...] [CommandLine]

Arguments for running Linux binaries:

    If no command line is provided, wsl.exe launches the default shell.

    --exec, -e <CommandLine>
        Execute the specified command without using the default Linux shell.

    --
        Pass the remaining command line as is.

Options:
    --distribution, -d <Distro>
        Run the specified distribution.

    --user, -u <UserName>
        Run as the specified user.

Arguments for managing Windows Subsystem for Linux:

    --export <Distro> <FileName>
        Exports the distribution to a tar file.
        The filename can be - for standard output.

    --import <Distro> <InstallLocation> <FileName> [Options]
        Imports the specified tar file as a new distribution.
        The filename can be - for standard input.

        Options:
            --version <Version>
                Specifies the version to use for the new distribution.

    --list, -l [Options]
        Lists distributions.

        Options:
            --all
                List all distributions, including distributions that are currently
                being installed or uninstalled.

            --running
                List only distributions that are currently running.

            --quiet, -q
                Only show distribution names.

            --verbose, -v
                Show detailed information about all distributions.

    --set-default, -s <Distro>
        Sets the distribution as the default.

    --set-default-version <Version>
        Changes the default install version for new distributions.

    --set-version <Distro> <Version>
        Changes the version of the specified distribution.

    --shutdown
        Immediately terminates all running distributions and the WSL 2 lightweight utility virtual machine.

    --terminate, -t <Distro>
        Terminates the specified distribution.

    --unregister <Distro>
        Unregisters the distribution.

    --help
        Display usage information.
[Distrod][ERROR] Failed to register the distribution.

Caused by:
    Failed: cmd.exe /C wsl --import Distrod %LocalAppData%\Distrod "C:\\Users\\ARTURM~1\\AppData\\Local\\Temp\\.tmp55R2aT\\install.tar.gz"

Getting the same issue

I was able to install with for example ArchWSL

BenjaminBrienen commented 1 year ago

I am also having this issue with ArchLinux/Current.