microsoft / windows-dev-box-setup-scripts

Scripts to simplify setting up a Windows developer box
MIT License
1.65k stars 382 forks source link

Add script to automatically side-load distros for WSL #32

Open WSLUser opened 6 years ago

WSLUser commented 6 years ago

Aside from the user downloading the required tar.gz file and renaming to install.tar.gz (which could also be part of the automation process), there should be a way to automate the https://github.com/Microsoft/WSL-distrolauncher process so we can side-load distros not currently in the Store without going through the build process itself (a time-consuming effort). I would recommend pulling the Docker images if we do automate the download of distros. All of this would be commented out by default. Best place currently to place this is in the dev_app.ps1 script.

yodurr commented 6 years ago

Sounds like a useful addition. Please feel free to try it and submit a PR and I expect we'll take it in. I expect a new script which is one of the base web dev scripts + "customdistro" for this would work well but whatever seems best to the group.

WSLUser commented 6 years ago

Yeah I may be able to build a distro manually following the instructions on the page but I've never created an automation script for something like this. Is there a "help wanted?" label? I've noticed some open-source projects use it so you may want to create one.

bcurran3 commented 5 years ago

I might be able to help.

Here are some scripts I made to install various distros via Chocolatey:

https://chocolatey.org/packages/wsl-ubuntu-1804 https://chocolatey.org/packages/wsl-ubuntu-1604 https://chocolatey.org/packages/wsl-debiangnulinux https://chocolatey.org/packages/wsl-kalilinux https://chocolatey.org/packages/wsl-opensuse https://chocolatey.org/packages/wsl-archlinux https://chocolatey.org/packages/wsl-sles

WSLUser commented 5 years ago

Is that from the official ArchLinux GitHub? (Yes it never came to fruition for Store, but the initial build out was done) Also should probably add the new kid on the block: Wlinux. From there, other popular distros such as Gentoo and ParrotSec need to be added based on user feedback on various forums (Twitter, GitHub, Reddit, etc.)

Thanks for the work you've done so far!

bcurran3 commented 5 years ago

RE: ArchLinux - source is https://github.com/bilguun0203/WSL-ArchLinux/releases/download/v1.0.3.0/ArchLinux-Appx_1.0.3.0_x64.zip

Haven't heard of the others...but thanks (sarcastic) for adding to my TDL - Need Urls! :) :( :)

WSLUser commented 5 years ago

That's the page I'm referring to.

Sorry, wasn't saying those specific ones needed to be added but it would be helpful to allow more options to be available until they can go into the Store.

bcurran3 commented 5 years ago

I'm a sucker for creating Chocolatey packages. Give me download locations and I'll most likely make them into Chocolatey packages in the near future. Packages for the people!

Foxboron commented 5 years ago

@DarthSpock The images are not from Arch Linux, and nothing have changed since the original discussion. https://lists.archlinux.org/pipermail/arch-dev-public/2018-January/029135.html

@bcurran3 It would be great if the description on the chocolatey package would state it's unofficial. Along with the "Sofware Author" section be amended so correct attribution is given to the software author, @bilguun0203

bcurran3 commented 5 years ago

@Foxboron

I'm completely open for continuous improvement.

Please open an issue with your thoughts and requests over at: https://github.com/bcurran3/ChocolateyPackages/issues

Foxboron commented 5 years ago

@bcurran3 wsl-archlinux is another distribution. Credits goes to the distribution author, not the original "creators". If anything the page implies the author of the software you are distributing comes from them, which is misleading at best.

yodurr commented 5 years ago

I initially commented on PR #78 but the comment belongs here:

I agree having choco install commands for these make it easier to install. Thank you to @bcurran3 for taking initiative in making these. I'd like the distro owners to review your choco packages before we reference them in the scripts in this project. I'll discuss with @tara-raj and we can start going through the list of distro owners. Also agree with the above comments that the choco packages should have a clearer statement on what is being installed and from where.

A challenge with installing a WSL distro as part of a boxstarter script is the default user creation so we can also automate the install of tools inside the distro. In the case of Ubuntu we use the default root user with empty password, allowing us to then automate install of packages. After the boxstarter script completes the user is encouraged to then create a new user in Ubuntu with a non-blank password. I see you do the same thing. As long as the user remembers to go in and create a user with a non-blank password and use that as the default then they're back in the same setup as when installing from the Store. It may be possible to improve on this so a choco install and Store install produce the same first run experience - this is a topic I'd love to hear feedback on from the community and distro owners.

bcurran3 commented 5 years ago

(I'll cross post too.)

@yodurr I'm game for improvements. My scripts for the installs are not the best, but the best I could do. I welcome feedback/changes/PRs. :)

WSLUser commented 4 years ago

Something that would help is wsl - import but we still need that edition check merged as some enterprises may not run a version of Windows that has the export/import functionality.