WSL2 rootfs with filesystem other than ext4


rez

New member
Local time
1:53 PM
Posts
2
Visit site
OS
AshOS
Hi everyone, I am very interested in finding a way to have the format of rootfs (/) in WSL2 (a.k.a. the vhdx file I believe) a filesystem other than ext4. For instance btrfs. Is it possible?
 
Windows Build/Version
Windows 11 Insider build 25236

My Computer

System One

  • OS
    AshOS
WSL does fully suport btrfs, don't think there is a WSL way to do what you want. Would be curious to build a Linux VM with btrfs and try swapping out the vhdx files and see what happens.
 

My Computer

System One

  • OS
    Windows 11
Oh really? Is it possible to boot a VM Linux installed in WSL?! I'm curious as well. Please do try and let me know!
 

My Computer

System One

  • OS
    AshOS
Hi everyone, I am very interested in finding a way to have the format of rootfs (/) in WSL2 (a.k.a. the vhdx file I believe) a filesystem other than ext4. For instance btrfs. Is it possible?
XFS is a really robust, fast and efficient file system for linux. Install XFSPROGS if not already installed on whatever Linux version you are running on your WSL system.

To create a file system -- mkfs.xfs /dev/xxxny

Building a bog standard Linux VM though is easy enough - and it can use the Windows EFI partition. Create your VM from an iso -- create the root ("/") and "/home" on the VM's virtual disk from the command line of your booted Linux iso (in the VM).

With modern gear and larger capacity SSD's etc I would go for this option now rather than choose WSL - but that's of course up to you.

Format the efi partition as fat32 so both Windows and Linux can boot from it.

Install the OS and then mount the EFI directory to /boot.

Install the system, update grub with something like grub-install --target=x86_64-efi --bootloader-id="Anything" --efi-directory = /boot/efi

grub-mkconfig -o /boot/grub/grub.cfg

depending on your chosen Linux VM the commands might be slightly different but the principle is the same.

cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
Is this able to boot in WSL?
 

My Computers

System One System Two

  • OS
    Windows 11 23H2 Current build
    Computer type
    PC/Desktop
    Manufacturer/Model
    HomeBrew
    CPU
    AMD Ryzen 9 3950X
    Motherboard
    MSI MEG X570 GODLIKE
    Memory
    4 * 32 GB - Corsair Vengeance 3600 MHz
    Graphics Card(s)
    EVGA GeForce RTX 3080 Ti XC3 ULTRA GAMING (12G-P5-3955-KR)
    Sound Card
    Realtek® ALC1220 Codec
    Monitor(s) Displays
    2x Eve Spectrum ES07D03 4K Gaming Monitor (Matte) | Eve Spectrum ES07DC9 4K Gaming Monitor (Glossy)
    Screen Resolution
    3x 3840 x 2160
    Hard Drives
    3x Samsung 980 Pro NVMe PCIe 4 M.2 2 TB SSD (MZ-V8P2T0B/AM) } 3x Sabrent Rocket NVMe 4.0 1 TB SSD (USB)
    PSU
    PC Power & Cooling’s Silencer Series 1050 Watt, 80 Plus Platinum
    Case
    Fractal Design Define 7 XL Dark ATX Full Tower Case
    Cooling
    Arctic Liquid Freezer III 420 RGB + Air 3x 140mm case fans (pull front) + 1x 120 mm (push back) and 1 x 120 mm (pull bottom)
    Keyboard
    SteelSeries Apex Pro Wired Gaming Keyboard
    Mouse
    Logitech MX Master 3S | MX Master 3 for Business
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
    Browser
    Nightly (default) + Firefox (stable), Chrome, Edge , Arc
    Antivirus
    Defender + MB 5 Beta
  • Operating System
    ChromeOS Flex Dev Channel (current)
    Computer type
    Laptop
    Manufacturer/Model
    Dell Latitude E5470
    CPU
    Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    Motherboard
    Dell
    Memory
    16 GB
    Graphics card(s)
    Intel(R) HD Graphics 520
    Sound Card
    Intel(R) HD Graphics 520 + RealTek Audio
    Monitor(s) Displays
    Dell laptop display 15"
    Screen Resolution
    1920 * 1080
    Hard Drives
    Toshiba 128GB M.2 22300 drive
    INTEL Cherryville 520 Series SSDSC2CW180A 180 GB SATA III SSD
    PSU
    Dell
    Case
    Dell
    Cooling
    Dell
    Mouse
    Logitech MX Master 3S (shared w. Sys 1) | Dell TouchPad
    Keyboard
    Dell
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
Is this able to boot in WSL?

Hi folks

I Don't think so as WSL is basically a Windows rather than a native Linux boot system. My feel on all this is that the idea was OK -- originally -- same as Windows 7 with "XP Mode" when support for XP ended -- is that now on modern hardware full VM's are so efficient you might as well use a proper full VM.

I liked the idea originally but I really can't see the value of it any more,

Others might have different views - but these days VMWare, HYPER-V, Oracle VBOX, KVM/QEMU, etc are so good at VM's -- even at running things like a Windows server 2022 VM in as little as 2GB RAM efficiently then what's the point any more of WSL

Here's an example of a W22K server on a VM running in 2GB RAM ("poodefaked" to run as a desktop OS too !!!!). Very fast and ultra efficient even on a VM.

Screenshot_20221015_105832.png

I do think though that the Windows subsystem for Android is a totally different ball game and that's where development should be focused on going forward, Since updated to 22H2 BTW. Just as good. I got the "Free 180 days trial" -- and BTW you can extend for 5 times after 180 days via slmgr rearm -- so great way of learning about servers etc.

Anybody wanting a Linux VM these days really should have no difficulty getting an efficient modern distro with the latest kernel and hardware to run on a Windows host these days requiring minimal resources to run it efficiently.

Cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
But the original question was specifically for WSL.
 

My Computers

System One System Two

  • OS
    Windows 11 23H2 Current build
    Computer type
    PC/Desktop
    Manufacturer/Model
    HomeBrew
    CPU
    AMD Ryzen 9 3950X
    Motherboard
    MSI MEG X570 GODLIKE
    Memory
    4 * 32 GB - Corsair Vengeance 3600 MHz
    Graphics Card(s)
    EVGA GeForce RTX 3080 Ti XC3 ULTRA GAMING (12G-P5-3955-KR)
    Sound Card
    Realtek® ALC1220 Codec
    Monitor(s) Displays
    2x Eve Spectrum ES07D03 4K Gaming Monitor (Matte) | Eve Spectrum ES07DC9 4K Gaming Monitor (Glossy)
    Screen Resolution
    3x 3840 x 2160
    Hard Drives
    3x Samsung 980 Pro NVMe PCIe 4 M.2 2 TB SSD (MZ-V8P2T0B/AM) } 3x Sabrent Rocket NVMe 4.0 1 TB SSD (USB)
    PSU
    PC Power & Cooling’s Silencer Series 1050 Watt, 80 Plus Platinum
    Case
    Fractal Design Define 7 XL Dark ATX Full Tower Case
    Cooling
    Arctic Liquid Freezer III 420 RGB + Air 3x 140mm case fans (pull front) + 1x 120 mm (push back) and 1 x 120 mm (pull bottom)
    Keyboard
    SteelSeries Apex Pro Wired Gaming Keyboard
    Mouse
    Logitech MX Master 3S | MX Master 3 for Business
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
    Browser
    Nightly (default) + Firefox (stable), Chrome, Edge , Arc
    Antivirus
    Defender + MB 5 Beta
  • Operating System
    ChromeOS Flex Dev Channel (current)
    Computer type
    Laptop
    Manufacturer/Model
    Dell Latitude E5470
    CPU
    Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2501 Mhz, 2 Core(s), 4 Logical Processor(s)
    Motherboard
    Dell
    Memory
    16 GB
    Graphics card(s)
    Intel(R) HD Graphics 520
    Sound Card
    Intel(R) HD Graphics 520 + RealTek Audio
    Monitor(s) Displays
    Dell laptop display 15"
    Screen Resolution
    1920 * 1080
    Hard Drives
    Toshiba 128GB M.2 22300 drive
    INTEL Cherryville 520 Series SSDSC2CW180A 180 GB SATA III SSD
    PSU
    Dell
    Case
    Dell
    Cooling
    Dell
    Mouse
    Logitech MX Master 3S (shared w. Sys 1) | Dell TouchPad
    Keyboard
    Dell
    Internet Speed
    AT&T LightSpeed Gigabit Duplex Ftth
Back
Top Bottom