Coder Social home page Coder Social logo

wsl-arch-rootfs's Introduction

Arch Linux RootFS

This repository contains the automatic build script of minimal Arch Linux on WSL2 RootFS, provided by Azure Zeng.

This repo will build RootFS automatically at 07:24 AM UTC on every 1st day of the month.

⚠️ WARNING:

Please read this readme carefully before using this RootFS.

  1. Please read this README thoroughly before using any RootFS archives provided by this repository.

  2. Arch Linux on WSL installation is UNSUPPORTED BY OFFICIAL according to the official code of conduct. Before reporting problems to Arch Linux official, please ensure that the problems are REPRODUCIBLE in SUPPORTED Arch Linux installations.

  3. As mentioned above, you should be familiar with Arch Linux in SUPPORTED installations.

  4. The RootFS file provided in this repository is only intended to be installed in WSL2. WSL1 is not supported as Microsoft strongly advises using WSL2 now. If you are seeking Arch Linux on WSL1, ArchWSL provided by yuk7 might help.

Installation

Download the latest rootfs.tar.gz in the Repository Releases.

Then import RootFS by using wsl --import <Distro> <InstallLocation> <FileName>.

For example:

wsl --import Arch C:\Users\azurezeng\WSL\Arch rootfs.tar.gz

You can use the RootFS with yuk7's wsldl together to get more convenient installation. The manual of wsldl can be found at here.

After importing, remember to do pacman-key --init and pacman-key --populate immediately, otherwise pacman may not work.

Then, remember to do pacman -Syu to update all packages to the latest as soon as possible.

Hints

  1. Rename the file name of wsldl to customize your distro's name.

  2. You can place <distro-name>.exe and rootfs.tar.gz in the same directory, then double-click <distro-name>.exe to complete distro import.

UPDATE: rootfs-with-wsldl.zip contains both rootfs.tar.gz and wsldl.exe (renamed to Arch.exe). I would like to express sincere thanks to yuk7!

Contents in this RootFS

For detailed auto-build process, please visit build-rootfs.yml.

Summary:

  • Pre-installed packages: base curl wget vim nano sudo texinfo man-db man-pages

  • /etc/pacman.d/mirrorlist: Updated from https://archlinux.org/mirrorlist/all/, and all mirrorlist sites are enabled by default.

  • /etc/pacman.conf: Enabled Color and ParallelDownloads options by default.

  • /etc/locale.gen: Enabled en_US.UTF-8 UTF-8 by default. Then used locale-gen to generate localization files.

  • /etc/sudoers.d/wheel: Enabled %wheel ALL=(ALL:ALL) ALL, which means users in wheel group will be able to use sudo by default.

  • Removed auto-generated /etc/pacman.d/gnupg for security reason (since 7/20/2024).

  • /tmp is mounted as tmpfs by adding this mount option to /etc/fstab. This behavior is same as default Arch Linux installation.

Some tips

  1. After importing/installing the RootFS, it is advised to do pacman -Syu as early as possible, to ensure everything the latest.

  2. Install mesa mesa-utils to get WSL GPU acceleration.

  3. Intel graphics user may experience some problems (see this issue on ArchWSL). A workaround:

sudo ln -sf libedit.so /usr/lib/libedit.so.2
  1. To download all packages (without package re-installing):
pacman -Qq | sudo pacman -Sw -
  1. To enable systemd support, create /etc/wsl.conf with below content:
[boot]
systemd=true
  1. You can set the default user by putting the following content to /etc/wsl.conf:
[user]
default=USERNAME_IN_WSL

wsl-arch-rootfs's People

Contributors

azurezeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wsl-arch-rootfs's Issues

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.