Giter Site home page Giter Site logo

Comments (19)

RoliSoft avatar RoliSoft commented on July 19, 2024

Windows supports both / and \ even when mixed, so that shouldn't be a problem. I did test it before committing, and it worked for me.

Can you tell me which image are you using? Maybe it's somehow archive-specific.

Also, does it try to move to %localappdir%\lxss\home/usernameusr/bin or %localappdir%\lxss\home/username/usr/bin? If the former, then it's possible I left out a + '/' + during path concatenation somewhere, however, in that case my tests shouldn't have worked.

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

@RoliSoft It's the pritunl archlinux image, but I just tried installing a trusty one and it also seems to be broken for trusty.

Here's the log:

C:\Users\fpqc\Desktop\WSL-Distribution-Switcher>python install.py ubuntu:trusty
[*] Probing the Linux subsystem...
[*] Default user is fpqc at /home/fpqc.
[*] Reading /etc/{passwd,shadow,group,gshadow} entries for root and fpqc...
[*] Removing leftover rootfs-temp...
[*] Beginning extraction...
                            [=================================================> ] 100.00%[*] Backing up current rootfs to rootfs_ubuntu_xenial...
[*] Switching to new rootfs...
The system cannot find the file specified.
[!] Failed to switch to new rootfs: Command '['cmd', '/C', 'move', 'C:\\Users\\fpqc\\AppData\\Local\\lxss\\home/fpqc\\rootfs-temp', 'C:\\Users\\fpqc\\AppData\\Local\\lxss\\rootfs']' returned non-zero exit status 1
[*] Rolling back to old rootfs...

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on July 19, 2024

I actually met this issue once. Subsequent runs didn't say The system cannot find the file specified. anymore, so I just shrugged it off as a one-time thing.

Seems like it's not. I love Heisenbugs.

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

@RoliSoft Unfortunately turning the file manipulation software into a C library may have made it a bit harder to debug lol.

Anyway, just for the record I am experiencing this heisenbug 100% of the time.

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on July 19, 2024

I haven't turned everything into a C library. The extraction part is all Python, only after a file was extracted I invoke the WriteEa(path,"lxattrb",attribute_bytes) call to write the additional VolFS attributes.

Even the attribute_bytes are generated by Python, in ntfsea.py.

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

Weird. It seems like that folder isn't getting created for some reason, at least when I sat there looking at it, maybe I didn't refresh quick enough.

Sometimes I get this too:

C:\Users\fpqc\Desktop\WSL-Distribution-Switcher>python install.py ubuntu:trusty
[*] Probing the Linux subsystem...
[*] Default user is fpqc at /home/fpqc.
[*] Reading /etc/{passwd,shadow,group,gshadow} entries for root and fpqc...
[*] Beginning extraction...
    bin/znew                [==>                                                ] 4.43%[!] Failed to extract archive: special devices not supported by system

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

Sorry, meant to click cancel comment.

Checked if squashfs extraction works properly as well, Getting errors like this:

[*] Probing the Linux subsystem...
[*] Default user is fpqc at /home/fpqc.
[*] Reading /etc/{passwd,shadow,group,gshadow} entries for root and fpqc...
[*] Beginning extraction...
    usr/bin/e2fsck          [=>                                                 ] 3.53%[!] Failed to extract usr/bin/e2fsck: Compressed data ended before the end-of-stream marker was reached
    usr/bin/fsck.ext2       [=>                                                 ] 3.70%[!] Failed to extract usr/bin/fsck.ext2: Compressed data ended before the end-of-stream marker was reached
    usr/bin/fsck.ext3       [=>                                                 ] 3.70%[!] Failed to extract usr/bin/fsck.ext3: Compressed data ended before the end-of-stream marker was reached
    usr/bin/fsck.ext4       [=>                                                 ] 3.70%[!] Failed to extract usr/bin/fsck.ext4: Compressed data ended before the end-of-stream marker was reached
    usr/bin/fsck.ext4dev    [=>                                                 ] 3.71%[!] Failed to extract usr/bin/fsck.ext4dev: Compressed data ended before the end-of-stream marker was reached
    usr/bin/fsck.jfs        [=>                                                 ] 3.71%[!] Failed to extract usr/bin/fsck.jfs: Compressed data ended before the end-of-stream marker was reached
    usr/bin/gawk            [=>                                                 ] 3.74%[!] Failed to extract usr/bin/gawk: Compressed data ended before the end-of-stream marker was reached
    usr/bin/gawk-4.1.4      [=>                                                 ] 3.74%[!] Failed to extract usr/bin/gawk-4.1.4: Compressed data ended before the end-of-stream marker was reached
    usr/bin/jfs_fsck        [==>                                                ] 4.13%[!] Failed to extract usr/bin/jfs_fsck: Compressed data ended before the end-of-stream marker was reached
    usr/bin/zsh             [===>                                               ] 6.42%[!] Failed to extract usr/bin/zsh: Compressed data ended before the end-of-stream marker was reached
    usr/bin/zsh-5.2         [===>                                               ] 6.42%[!] Failed to extract usr/bin/zsh-5.2: Compressed data ended before the end-of-stream marker was reached
    usr/bin/zsoelim         [===>                                               ] 6.42%[!] Failed to extract usr/bin/zsoelim: Compressed data ended before the end-of-stream marker was reached
    usr/include/pr29.h      [======>                                            ] 12.25%Traceback (most recent call last):
  File "install.py", line 189, in <module>
    f.write(file.getContent())
KeyboardInterrupt

It does get a little further, and it only fails once you get to the setdefaultuser script part.

Anyway, no rush. I rolled back to the version that was working, but I manually dled the new postinstall script, and that worked for me to try arch but with working chroot.

I'm guessing that fakeroot doesnt work yet, since it's still ignored?

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on July 19, 2024

The SquashFS extractor is a much lower priority feature, since as far as I know not a lot of people actually use it. Plus, I've found SquashFS images are generally not meant to be booted as-is, but after an installer script runs some things. Even with the previous version, the AIROOT.SFS version was quite buggy.

Running bash after installing from AIROOT.SFS is not working, since WSL is expecting bash to be under /bin/bash, as far as I recall, and ArchLinux doesn't store them there, the /bin folder is simply empty, since they're in /usr/bin.

Symlink creation is currently not working for SquashFS images, since the PySquashfsImage module doesn't seem to indicate symlinks property properly. There is a symlink member on the SquashInode class, but I found it to be always set to 0, so there's not much I can do there.

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on July 19, 2024

PS: I'll probably bring back under WSL installation as a backup switch, until I'm 100% sure the native extractor is perfect.

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

Yeah, I was just testing it out, I know that the AIROOT.SFS one doesn't work because I tried it and you told me it doesn't work lol.

Also, yeah, looks like the native fakeroot doesn't work yet, needs fakeroot-tcp.

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on July 19, 2024

Native fakeroot uses Unix sockets, which WSL doesn't support yet. However, the hook script should install not the fakeroot-tcp package from AUR (which is a bit outdated, and also prints a few warnings) but the latest fakeroot from ABS with the --with-ipc=tcp configuration: https://github.com/RoliSoft/WSL-Distribution-Switcher/blob/master/hook_postinstall_all.sample.sh#L198

Is this also not working for some reason?

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

It's working, but I uninstalled it to test regular fakeroot and haven't gotten around to fixing it yet by reading your script lol. I wanted to strace fakeroot for the WSL issues page =].

I did makepkg fakeroot-tcp before removing yours so I didn't get stuck without being able to recompile the one you used.

from wsl-distribution-switcher.

nogweii avatar nogweii commented on July 19, 2024

I'm running into this as well. Trying to use base/archlinux, downloaded using get-prebuilt.py. Is there a work around that I'm missing?

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on July 19, 2024

The latest commits should fix these issues. Someone please confirm.

The plans to bring back the old installer as a switch are still on.

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

@RoliSoft Sorry away from my pc til tomorrow; will test asap though.

from wsl-distribution-switcher.

nogweii avatar nogweii commented on July 19, 2024

Failed again for me, this time complaining of charmap:

C:\Users\X\Downloads\WSL-Distribution-Switcher-master(1)\WSL-Distribution-Switcher-master>python get-prebuilt.py base/archlinux
[*] Requesting authorization token...
[*] Fetching manifest info for base/archlinux:latest...
[*] Downloading layer sha256:80ab3605368435aecb35af5cafa332aa4c04a12e0aceec02d052a36ffcbf5e51...
[*] Downloading layer sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4...
[*] Rootfs archive for base/archlinux:latest saved to rootfs_base_archlinux_latest.tar.gz.

C:\Users\X\Downloads\WSL-Distribution-Switcher-master(1)\WSL-Distribution-Switcher-master>python install.py rootfs_base_archlinux_latest.tar.gz
[*] Probing the Linux subsystem...
[*] Default user is evs at /home/evs.
[*] Reading /etc/{passwd,shadow,group,gshadow} entries for root and evs...
[*] Beginning extraction...
[!] Failed to extract bin: [Errno 2] No such file or directory: 'C:\\Users\\colin\\AppData\\Local\\lxss\\home/evs\\rootfs-temp/bin'
[!] Failed to extract etc/ssl/certs/3b2716e5.0: 'charmap' codec can't encode character '\u011f' in position 34: character maps to <undefined>
[!] Failed to extract etc/ssl/certs/65b876bd.0: 'charmap' codec can't encode character '\u0130' in position 3: character maps to <undefined>
[!] Failed to extract etc/ssl/certs/988a38cb.0: 'charmap' codec can't encode character '\u0151' in position 28: character maps to <undefined>
[!] Failed to extract archive: 'charmap' codec can't encode character '\u011f' in position 70: character maps to <undefined>

Edit this is from downloading the tarball of 628ef37

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on July 19, 2024

One of the fixes to the installer killed the ability to install multiple layers, such as the base/archlinux.

This will be fixed, however, please try pritunl/archlinux until then.

I will also take a look at the charmap issue.

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on July 19, 2024

@evaryont As of fc39758, multilayer images are supported again and the charmap issue was also fixed.

from wsl-distribution-switcher.

fpqc avatar fpqc commented on July 19, 2024

Thanks Roli!

from wsl-distribution-switcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.