Giter Site home page Giter Site logo

vswsl / arch-wsl Goto Github PK

View Code? Open in Web Editor NEW
238.0 2.0 19.0 366 KB

This is an unofficial Arch WSL based on the rootfs of arch docker images with a few packages installed to make things easy.

Home Page: https://www.microsoft.com/store/apps/9MZNMNKSM73X

License: MIT License

C++ 86.73% C 3.33% Python 9.94%
archlinux uwp wsl wsl-archlinux

arch-wsl's People

Contributors

dependabot[bot] avatar vineelsai26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

arch-wsl's Issues

ARM support need

Hi there,
I have an arm PC that runs windows11, as microsoft wrote in his documents, wsl2 supports arm structure natively, I have tested it on ubuntu, and it really works well. Therefore, I think it will have a better performance if my computer can run archlinuxarm instead of x86 version. Hope you can take it consideration and give me a reply at leisure.
I'm Chinese and my English is not very well, if there are anything not so proper or even worse , please tell me about it, thank you.

About locale

First of all, thank you for allowing us to use archlinux in wsl.

The default locale is 'C.UTF-8', we can easily set it to 'en-US.UTF-8' through editing locale.gen and running command locale-gen, but other language will meet an error, just like chinese:

Generating locales...
  en_US.UTF-8... done
  zh_CN.UTF-8...[error] cannot open locale definition file `zh_CN': No such file or directory

However, after reinstalling glibc, it works!

why?
Is this because the glibc that comes with the docker version of archlinux has been streamlined?

Maybe we can add a description to the readme.

Rename distro during install?

First of all: nice project and thank you!

This isn't really an issue but more like a question:
Can I override the name that the distribution uses?

On my home PC I can use this package fine, but on my work PC I already had an Arch installation by myself (using rootfs) and now when I try to install your package via the Windows Store or AppX package it just opens up my old "Arch" instance...

WslRegisterDistribution failed

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007019e
Error: 0x8007019e ??????? Linux ? Windows ????

Press any key to continue...

Second Instance

Can I install a second instance? If so, could you explain how to do this?

yay and paru are tooooooo slow,they can never ever been proxied

i use the http_proxy and the proxychains(with WSL clash) they can never ever been proxied but curl can instead.

i don't know if someone else have the same issue, but i do need a favor.

it's the proxychains.conf file

...
# this might not work and/or cause crashes.
# proxy_dns
...

[ProxyList]
# add proxy here ...
# meanwile
# defaults set to "tor"
http    127.0.0.1 7890
socks5  127.0.0.1 7890
#https   127.0.0.1 7890

this is the export commend

 https_proxy=http://127.0.0.1:7890

add open source license

Hello, I am referring to the Arch-WSL project to write deepin-WSL. Where do I need to include your open source license information?

open gui error

gvim

E233: Cannot open display
Press ENTER or type command to continue

pacman NOEXTRACT on man pages

Hi,

In pacman.conf, noextract is set on man pages. That probably should not be set. (Took me a while today to figure out why man wasn't working.) There are several other noextract options there as well that probably should be explained and/or removed.

[QUESTION] - Publishing the WSL image

Hello mate, very nice project!

I would like to ask you how were you able to publish your WSL image to Microsoft Store. I have a Microsoft developer account but I don't find any documentation that describe how to publish a WSL image to Microsoft Store. Do you know the steps for doing this?

what is the root password

Hello
Thanks for this repo.

I want to login as root! How can i do that? When I enter su root or just su I cannot login with my own user password? But my password works on sudo command.

Thank you

open gui error

gvim

E233: Cannot open display
Press ENTER or type command to continue

Remove /.dockerenv

There is a .dockerenv file in the root of the filesystem. This can confuse certain pieces of software and make them think they are running under a Docker environment. Sharship, for example, runs into this issue. If possible, could this file be removed from the filesystem as part of the installation process?

Thanks for your packaging, there are few suggestions by packaging to implement later :)

Prior following text wall - thanks for packaging for MS Store :) Almost zero fixups required after installation, but I have bad feeling on usage upstream distro name for publication due to trademark policy and CoC... Anyway, not my business, but Antergos used own branding, and used mainline repos with few own decorative packages (and graphical installer) optional repo, built from AUR.

For those, who look for ready recipes without 3hrs waste of MSDN weird documentation reading (can be safely ignored otherwise, as this setup way is somewhat dumb and beer-inspired...):

Prepare Windows host for WSL2

  • PS > DISM.exe /Online /Enable-Feature /FeatureName:VirtualMachinePlatform /All
  • PS > wsl.exe --shutdown
  • PS > wsl.exe --update
  • PS > wsl.exe --set-version Arch 2

Setting up Arch

  • # cat /etc/wsl.conf
[automount]
enabled = true
# For sharing storage with other WSL instances.
crossDistro = true
root = /mnt/
# dirs = 755, files = 644, disable char case check.
options = "metadata,uid=1000,gid=1000,umask=0000,fmask=0033,dmask=0022,case=off"
# UID/GID 1000 is default, can be omitted.
# options = "metadata,umask=0000,fmask=0033,dmask=0022,case=off"
# mountFsTab = true

[network]
hostname = archlinux.wsl
generateHosts = true
## LATE EDIT - there are few more undocumented (on MSDN at least) options for this section, like bridged mode setup:
## https://github.com/microsoft/WSL/issues/4150#issuecomment-1310028257
## By default Hyper-V network stack doesn't support IPv6 for WSL2 instances, if you have IPv6-primary ISP connection - worth to try.
generateResolvConf = true

# Set both keys to false to disable ability to call windows binaries from WSL envinroment
[interop]
enabled = true
appendWindowsPath = true

[user]
default = defaultuser

[boot]
systemd = true
  • PS > cat %USERPROFILE%/.wslconfig (on windows host)
[wsl2]
memory = 6GB
processors = 8
kernelCommandLine = mmio_stale_data=off
swap = 4GB
pageReporting = true
# Well, guess this key should break things if more than one WSL running... Enable direct access to WSL resources, listening on localhost/0.0.0.0 from host side using localhost as address.
localhostForwarding = true
nestedVirtualization = true
debugConsole = false
# flatpak applications looks like started without any issues (Wayland).
guiApplications = true
vmIdleTimeout = 60000
idleThreshold = 10000

Some fixup of default systemd unit configurations, due to somewhat messed implementation from WSL init side

  • # cat /etc/systemd/system/fixshm.service
[Unit]
Description=Fix the /dev/shm symlink to be a mount
DefaultDependencies=no
Before=sysinit.target
ConditionPathExists=/dev/shm
ConditionPathIsSymbolicLink=/dev/shm
ConditionPathIsMountPoint=/run/shm

[Service]
Type=oneshot
ExecStart=/usr/bin/rm /dev/shm
ExecStart=/usr/bin/mkdir /dev/shm
ExecStart=/bin/umount /run/shm
ExecStart=/usr/bin/rmdir /run/shm
ExecStart=/bin/mount -t tmpfs -o mode=1777,nosuid,nodev,strictatime tmpfs /dev/shm
ExecStart=/usr/bin/ln -s /dev/shm /run/shm

[Install]
WantedBy=sysinit.target
Another fix...
  • # cat /etc/systemd/system/systemd-sysctl.service.d/override.conf
  • # cat /etc/systemd/system/systemd-sysusers.service.d/override.conf
    • Or use # systemctl edit systemd-sysusers.service; systemctl edit systemd-sysctl.service
[Service]
LoadCredential=

After this modifications -

  • PS > wsl.exe --shutdown

Next boot should be systemd-backed.

  • # systemctl list-units --type=service - to check if systemd is working. At least podman works fine :)

Solution source links to be added later via UPD.

Known sound journald entries

  • WSL (2) ERROR: InitCreateSessionLeader:1088: /sbin/init failed to start within 10000ms - can be safely ignored, no impact observed in 2 hours.
  • 9pnet_virtio: no channels available for device drvfs - guess can be ignored too, everything seems working.

Suggestions:

I don't see any reason to additionaly modify/update upstream docker image during package preparation, to be honest, as it rebuilds daily on GitLab, and weekly - pushed on DockerHub. Maybe it is more suitable to use full pipeline to prepare image from scratch, and replace sudo (someone using other privilege escalation options, worth to mention - su is provided from base group) configuration with systemd-firstboot :) Well, it needs to be configured - but Arch, for painless usage, anyway requires recently added WSL2 features, as I remember - there are no packages in "main" repositories with other init options, but systemd... Yes, they are all in AUR, and WSL anyway will configure system each run.
So, I guess, less "vanilla" image packaging suitable in this case - polishing required anyway just to run Arch not in single-user mode under WSL.

if this wsl-distribution don't support systemed?

i run
sudo systemctl

and i got this error

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

if this wsl-distribution don't support systemed?

service command isn't working

I freshly installed Arch WSL from microsoft store. After registering and setting proxy when I tried to run this command while being root "service ssh enable" it gives the following output "bash: service: command not found". I guess the system is using SysVinit as its init system, but still service command don't work.

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.