nullpo-head / wsl-distrod

Distrod is a meta-distro for WSL 2 which installs Ubuntu, Arch, Debian, Gentoo, etc. with systemd in a minute for you. Distrod also has built-in auto-start feature on Windows startup and port forwarding ability.
MIT License
1.92k stars 91 forks source link

Request to share your successful setup/configuration #14

Open claudiusraphael opened 3 years ago

claudiusraphael commented 3 years ago

I would like to ask all of you to share your successful setup/configuration for Distrod.

Please include:

Why i am asking for it?

Because it helps everyone interested to use Distrod and might show up issues with the README, the general process, issues yet not identified although vaguely discovered with the core-routines, and so on.

Thank you.

yueyejinghun commented 2 years ago

Successfully installed on a nested virtualization VMware Workstation instance

Host Name:
OS Name:                   Microsoft Windows 11 Enterprise
OS Version:                10.0.22000 N/A Build 22000
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:
Registered Organization:
Product ID:
Original Install Date:     2021/10/3
System Boot Time:          2021/11/22
System Manufacturer:       VMware, Inc.
System Model:              VMware7,1
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 63 Stepping 2 GenuineIntel ~3492 Mhz
BIOS Version:              VMware, Inc. VMW71.00V.18452719.B64.2108091906, 2021/8/9
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             en-us;English (United States)
Input Locale:              en-us;English (United States)
Time Zone:                 (UTC-08:00) Pacific Time (US & Canada)
Total Physical Memory:     8,191 MB
Available Physical Memory: 2,885 MB
Virtual Memory: Max Size:  16,383 MB
Virtual Memory: Available: 9,642 MB
Virtual Memory: In Use:    6,741 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:
Hotfix(s):                 3 Hotfix(s) Installed.
                           [01]: KB5006363
                           [02]: KB5007215
                           [03]: KB5006755
Network Card(s):           3 NIC(s) Installed.
                           [01]: Wintun Userspace Tunnel
                                 Connection Name:
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]:
                                 [02]:
                                 [03]:
                           [02]: Intel(R) 82574L Gigabit Network Connection
                                 Connection Name: Ethernet0
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]:
                                 [02]:
                           [03]: Wintun Userspace Tunnel
                                 Connection Name:
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]:
                                 [02]:
Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

.\distrod_wsl_launcher.exe -d Ubuntu

Choose Ubuntu -> Focal to install. After installation, update the system, then run wsl.exe --shutdown to terminate all WSL instances.

The reason I use fail2ban as the proof is that if fail2ban is installed on Ubuntu Focal without systemd, it will prevent the WSL instance from successfully executing sudo do-release-upgrade, for during the upgrade process, it is trying to use systemctl to stop its daemon which is never actually running after the installation. Since systemctl cannot be found, forcing do-release-upgrade to roll back. Please note that if by editing /etc/apt/sources.list to change the codename then run sudo apt full-upgrade to upgrade Ubuntu, fail2ban would not cause any problem

sudo apt install fail2ban

Run Restart-Computer in PowerShell. After Windows reboot, launch the WSL instance

sudo systemctl status fail2ban

● fail2ban.service - Fail2Ban Service
     Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2021-11-23 01:10:25 PST; 1min 7s ago
       Docs: man:fail2ban(1)
    Process: 98 ExecStartPre=/bin/mkdir -p /run/fail2ban (code=exited, status=0/SUCCESS)
   Main PID: 103 (f2b/server)
      Tasks: 5 (limit: 4709)
     Memory: 17.0M
     CGroup: /system.slice/fail2ban.service
             └─103 /usr/bin/python3 /usr/bin/fail2ban-server -xf start

Nov 23 01:10:24 systemd[1]: Starting Fail2Ban Service...
Nov 23 01:10:25 systemd[1]: Started Fail2Ban Service.
Nov 23 01:10:26 fail2ban-server[103]: Server ready

Change Prompt=lts to Prompt=normal in /etc/update-manager/release-upgrades to see if fail2ban prevents the system from upgrade

sudo do-release-upgrade

After it prompt for restart, run wsl.exe --shutdown

then sudo systemctl status fail2ban

● fail2ban.service - Fail2Ban Service
     Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2021-11-23 01:24:49 PST; 1min 8s ago
       Docs: man:fail2ban(1)
    Process: 80 ExecStartPre=/bin/mkdir -p /run/fail2ban (code=exited, status=0/SUCCESS)
   Main PID: 85 (fail2ban-server)
      Tasks: 5 (limit: 4709)
     Memory: 18.6M
     CGroup: /system.slice/fail2ban.service
             └─85 /usr/bin/python3 /usr/bin/fail2ban-server -xf start

Nov 23 01:24:49 vsystemd[1]: Starting Fail2Ban Service...
Nov 23 01:24:49 systemd[1]: Started Fail2Ban Service.
Nov 23 01:24:49 fail2ban-server[85]: Server ready