With WSL 2 (included with Win10 v2004), it's gotten much better. What follows is a summary of the steps I followed:
- Make sure hardware virtualization is enabled in BIOS. (For my Ryzen 7 3800X on an MSI X570-A Pro, I had to go looking under the CPU overclocking settings for SVM, and enable that.)
- Log into Windows and open an administrator PowerShell prompt.
- Make sure WSL is installed:
Code: Select all
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform - Reboot and log into Windows again. Set the default WSL version to 2:
Code: Select all
wsl --set-default-version 2 - Grab a Gentoo stage3 AMD64 tarball (nomultilib recommended) from your favorite mirror. Uncompress it, but leave it in tar format.
- Import the tarball into WSL:
The first path is to an empty directory where the distro's virtual disk will be stored; the second is to the tarball you downloaded. If you want a name other than "gentoo," it's right after --import. If you're prompted to update the WSL kernel, download it from https://docs.microsoft.com/en-us/window ... sl2-kernel and install it, then repeat the import command.
Code: Select all
wsl --import gentoo C:\Users\salfter\gentoo\ C:\Users\salfter\Downloads\stage3-amd64-nomultilib-20200624T214505Z.tar --version 2 - Chroot into your new installation...you'll be logged in as root:
Code: Select all
wsl -d gentoo - Complete this minimal list of commands to set up a normal user for yourself:
Code: Select all
emaint sync -a emerge sudo useradd -mc "Your Name Here" -G wheel your_user_name passwd your_user_name - Use visudo to enable sudo for the wheel group (whether with or without passwords is up to you).
- Exit Gentoo back to PowerShell, then exit PowerShell and launch the Registry Editor.
- In Regedit, dig down through HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss\{some GUID here} for a key with "gentoo" as the DistributionName. Set DefaultUid to 1000 (0x3e8).
- Pick a WSL-compatible terminal and install it. I've been using wsltty (https://github.com/mintty/wsltty).
Update: (2 Sep 21) I've had a couple of installations fail to start up recently. One is my home workstation, which I hadn't been motivated to fix as it's booted into Gentoo probably 99%+ of the time. This morning, though, my work computer (which is only set up to boot into Windows) did the same thing: click the Gentoo Terminal that's pinned to the taskbar, a window pops up...and then it disappears. I went looking, and the fix is here: pop open an administrative command prompt, issue
Code: Select all
netsh winsock reset

