Boot different root / cloudimg filesystem
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
**Is your feature request related to a problem? Please describe.**
I've been experiencing random crashes on WSL2 (on ARM), where I need to force quit the WSL2 VM through `hcsdiag`. Anyways, I want to move to `btrfs` for better resiliency than `ext4` for some of my WSL2 installs.
Currently, WSL starts `ext4.vhdx`, I converted the VHD-image to `btrfs` by mounting it in a Hyper-V install. However, when I try to start the WSL installs they don't seem to boot (likely, some not open source ext4-mounting magic happens from CBL):
```
The operation timed out because a response was not received from the virtual machine or container.
Error code: Wsl/Service/CreateInstance/0x80370109
[process exited with code 4294967295 (0xffffffff)]
```
Tailing the logs from the `system` distribution, it's clear that it's trying to mount an `ext4` system:
```
[ 141.672913] scsi 0:0:0:3: Direct-Access Msft Virtual Disk 1.0 PQ: 0 ANSI: 5
[ 141.675431] sd 0:0:0:3: Attached scsi generic sg3 type 0
[ 141.677106] sd 0:0:0:3: [sdd] 536870912 512-byte logical blocks: (275 GB/256 GiB)
[ 141.678739] sd 0:0:0:3: [sdd] Write Protect is off
[ 141.679803] sd 0:0:0:3: [sdd] Mode Sense: 0f 00 00 00
[ 141.681069] sd 0:0:0:3: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 141.685502] EXT4-fs (sdd): VFS: Can't find ext4 filesystem
[ 141.686686] WSL (1) ERROR: Mount:1885: mount(/dev/sdd, /distro, ext4, 0x0, discard,errors=remount-ro,data=ordered
[ 141.686689] ) failed 22
[ 141.689013] WSL (1) ERROR: Invalid argument @main.cpp:3046 (ProcessMessage)
[ 141.690914] sd 0:0:0:3: [sdd] Attached SCSI disk
```
**Describe the solution you'd like**
Be able to mount a different rootfs on boot. Or, get some pointers where this is configured / where this error happens so I can do debugging and do a MR myself.
**Describe alternatives you've considered**
**Additional context**
Contributor guide
Research direction
Start with the WSL system-distribution logs and the failing mount of /dev/sdd as ext4. Trace where the root filesystem type is selected, then verify that a converted btrfs rootfs can boot without the ext4 mount failure.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100