Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: unable to import images using an account with whitespace in its home directory path #72

Open
ghost opened this issue Sep 14, 2022 · 1 comment · May be fixed by #85
Open

[Bug]: unable to import images using an account with whitespace in its home directory path #72

ghost opened this issue Sep 14, 2022 · 1 comment · May be fixed by #85

Comments

@ghost
Copy link

ghost commented Sep 14, 2022

Describe the bug

Hello,

When I try to run Distrod on a User which has a white space in its home directory (e.g. C:\Users\My Account), the import of the downloaded archive breaks.

[Distrod][ERROR] Failed to register the distribution.

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

Steps to reproduce

  1. Create a new local user with a name separated by a whitespace, it is mandatory the user has its home directory with the same name format (C:\Users\My Account)
  2. Run distrod and choose to download a container image from linuxcontainers.org
  3. Choose Rocky Linux (21)
  4. Choose version 8
  5. Wait for the download and then the error should appear during the import

Expected behavior

Successful import of the downloaded distro image into WSL

Windows version

Windows 11 21H2 (Build SO 22000.856)

Linux kernel version

No distro installed

Distro

Rocky Linux 8

How did you install that distro?

Installed by Distrod wizard

Logs

C:\Users\My Account\Desktop\distrod_wsl_launcher-x86_64>distrod_wsl_launcher.exe

        ██████╗ ██╗███████╗████████╗██████╗  ██████╗ ██████╗
        ██╔══██╗██║██╔════╝╚══██╔══╝██╔══██╗██╔═══██╗██╔══██╗
        ██║  ██║██║███████╗   ██║   ██████╔╝██║   ██║██║  ██║
        ██║  ██║██║╚════██║   ██║   ██╔══██╗██║   ██║██║  ██║
        ██████╔╝██║███████║   ██║   ██║  ██║╚██████╔╝██████╔╝
        ╚═════╝ ╚═╝╚══════╝   ╚═╝   ╚═╝  ╚═╝ ╚═════╝ ╚═════╝
=================================================================================
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]: 2
[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]: 21
[Distrod] Fetching from linuxcontainers.org...
[1] 8
[2] 9
[Distrod] Choose a version from the list above.
[Distrod] Type the name or the index of your choice.
[Default: 9]: 8
[Distrod] Fetching from linuxcontainers.org...
[Distrod] Downloading 'https://images.linuxcontainers.org/images/rockylinux/8/amd64/default/20220914_02:35/rootfs.tar.xz'...
  [00:00:15] [##################################################] 107.93MiB/107.93MiB (7.17MiB/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]
...
_<output of wsl --help>_
...

[Distrod][ERROR] Failed to register the distribution.

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

additional comment

No response

@DanSibbernsen
Copy link

Same issue. Had to work around it by installing the distro manually and then enabling it with option 2 to get systemd started up

canton7 pushed a commit to canton7/wsl-distrod that referenced this issue Feb 14, 2023
This can happen when the user's full name is used at %USERPROFILE%.

Fixes: nullpo-head#72
canton7 pushed a commit to canton7/wsl-distrod that referenced this issue Feb 14, 2023
This can happen when the user's full name is used at %USERPROFILE%.

Fixes: nullpo-head#72
@canton7 canton7 linked a pull request Feb 14, 2023 that will close this issue
canton7 pushed a commit to canton7/wsl-distrod that referenced this issue Feb 14, 2023
This can happen when the user's full name is used as %USERPROFILE%.

Fixes: nullpo-head#72
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant