Skip to content

Instantly share code, notes, and snippets.

@fsworld009
Last active February 3, 2026 12:11
Show Gist options
  • Select an option

  • Save fsworld009/33adb703743520e68c54d6143a297559 to your computer and use it in GitHub Desktop.

Select an option

Save fsworld009/33adb703743520e68c54d6143a297559 to your computer and use it in GitHub Desktop.
Windows 11 Pro + WSL2

Trying out Windows 11 Pro + WSL2 setup to build dev environment on my Framework 13

Goal:

General travel device (with Windows as host so it can run most of the apps when needed) + WSL2 to setup Linux development environment:

General web dev?

  • VSCode
  • Docker
  • nvm
  • fish, tmux, git...etc
  • KVM? (Possible?)

Installation

Create a installation image to allow local account https://guides.frame.work/Guide/Windows+11+Installation+on+the+Framework+Laptop+13+(AMD+Ryzen%E2%84%A2+7040+Series)/214

Pick local account + password

Post-Installation

  1. Use wire internet to download Framework 13 Driver bundle
    1. After installation, wifi should be available
  2. https://github.com/Raphire/Win11Debloat
  3. IMEs
    1. https://github.com/EasyIME/PIME/releases
    2. https://www.google.co.jp/ime/
  4. https://github.com/Aetherinox/windows-update-killer

Drive encryption

Enabled after loging to MS account

Check encryption status

Run cmd with administrator permission

manage-bde -status C:

Ref: https://4it.com.au/kb/article/check-bitlocker-status-from-the-command-line/

Stuck at 99.9

Pause and resume https://superuser.com/questions/1121447/full-drive-encryption-with-bitlocker-freezes-at-99-9

upload recovery keys with latest computer name

Go to bitlocker settings -> back up your recovery key -> MS account

enable wmic

https://techcommunity.microsoft.com/blog/windows-itpro-blog/how-to-install-wmic-feature-on-demand-on-windows-11/4189530

Find my device

https://answers.microsoft.com/en-us/windows/forum/all/find-my-device-setting-is-turned-on-but-the/736d05b2-146d-4394-8299-e7c45a3f8f80

Need to turn on both "Find my device" and "Location services" so we can locate the device from MS website.

Enable WSL2

https://learn.microsoft.com/en-us/windows/wsl/install

after reboot, type wsl in cmd to finish install

Update kernel

~~Stable is still 5.x, update to pre-lease kernel https://www.reddit.com/r/wsl2/comments/1ed915b/how_to_upgrade_ubuntu_2404s_linux_kernel_in_wsl2/ ~~ but it's still 5.x, the 6.6 is currently pulled off from pre-release

guess we have to use 5.x?

2025/07/27: kernel is now 6.6

WSL2 Distro Manager

1.8.15+1 broken in Win11 bostrot/wsl2-distro-manager#269

Fedora

Guide: https://gist.github.com/kmatt/71603170556ef8ffd14984af77ff10c5

  1. Use distro manager to create the instance. The UI provides default user, but it doesn't work
    1. Use https://github.com/fedora-cloud/docker-brew-fedora/blob/41/x86_64/fedora-20241222.tar as rootfs
  2. Enter the instance, follow the guide to install basic packages and create user.

homebrew

https://brew.sh/ Need to install ps command, otherwise brew would fail

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/shellenv.sh: line 18: /bin/ps: No such file or directory
sudo dnf install procps

wslg

Tested firefox, can launch GUI, but problem: missing CJK fonts.

According to https://granule.medium.com/wsl2-gui-app-shortcuts-in-windows-with-wslg-fcc66d3134e7, the desktop file created inside distro will be picked by Windows and displayed in Start menu.

Problem:

Firefox:

  1. can't use anything from hamberger menu microsoft/wslg#1119
    1. has to disable Wayland in Firefox for now
  2. Bad performance with above workaround
  3. CJK fonts still don't work after syncing fonts from windows

Consider the limitation, it's probably better to run GUIs in windows and only use WSL for CLIs. VS Code has good support of working with WSL from Windows.

mount linux drive

luks https://gist.github.com/gtirloni/5b62ad835a06da21a6bd11aa78d3f7c4

Fonts

Since we are using Windows VS Code and Terminal app, the fonts for CLIs and VSCode need to be installed on Windows

choco install hackfont nerd-fonts-Hack dejavufonts

TODO:

  1. CJK Fonts and IME https://www.80shihua.com/archives/2994
  2. Build newer kernel, here's a guide for ubuntu https://learn.microsoft.com/en-us/community/content/wsl-user-msft-kernel-v6

Boot Windows Togo vhd

  • Best compatibility: fixed size vhd
  • Create and mount vhd in windows, use Rufus to create a Windows Togo installation into VHD
  • Use VirtualBox to boot the vhd directly to complete install (If boot via Ventoy, the install can't be completed).
    • Better to disable network on VM so it doesn't pull updates during installation
  • Once installation is finished, it can be copied to Ventoy and boot from there.
  • Problem: cannot encrypt with bitlocker, it will no longer boot. Seems impossible by design ventoy/Ventoy#3032
    • Considering what to put in the Togo insallation..
  • Veracrypt also seems unsupported https://forums.ventoy.net/showthread.php?tid=1963
Use Rufus to create a Windows 11 Togo installation.
## Enable bitlocket without TPM (Password unlock)
https://4sysops.com/archives/enable-bitlocker-on-windows-11-without-a-tpm-chip/
1. Group Policy editor
2. Computer Configuration > Administrative Templates > Windows Components > BitLocker Drive Encryption > Operating System Drives.
3. Require additional authentication at startup
4. Edit: Enabled, tick "Allow BitLocker without a compatible TPM (requires a password or a startup key on a USB flash drive)"
## 0x8004259a when enabling bitlocket
Error code
0x8004259a (technically VDS_E_SHRINK_DIRTY_VOLUME) typically occurs when BitLocker tries to shrink your partition to create the necessary "System Reserved" boot space but fails because the volume is marked as "dirty" or corrupted.
To fix this and proceed with your non-TPM encryption, follow these steps:
1. Repair the File System
Windows won't allow the partition resize required for BitLocker if it detects even minor file system errors.
Open Command Prompt as an Administrator.
Run the following command:
chkdsk C: /f /x
Type Y when asked to schedule the check for the next restart, then restart your computer. Windows will scan and fix the drive before booting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment