WSL2 Run fsck on Linux (Ubuntu) root file system at startup
Nobody has claimed this yet.
- 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.
As part of troubleshooting a separate issue (problems with Intellij on Win11 reading java source code and jar files on WSL2) I'd like to verify the integrity of the root file system in my WSL2 Ubuntu 20 image.
I've already done:
- chkdsk on the underlying physical SSD on my laptop
- run Test-VHD on the Ubuntu image
(both pass without issue)
The final step is to check the Ubunut file system as viewed from the linux side.
The catch is that fsck shouldn't be run on a mounted file system and following the standard instructions for getting fsck to run on the root file system of an Ubuntu machine don't appear to work...
Describe the solution you'd like
Clear instructions on how to get fsck to run on the root file system of WSL2 Linux (Ubuntu) as it starts up.
Describe alternatives you've considered
An alternative may be to attempt to run fsck on the WSL2 vxhd "under inspection" from another WSL2 instance, though it is not clear to me quite how to go about doing that either.
Additional context
This may not be a "proper" feature request, perhaps just some clarification in the doco around the WSL2 boot process would be sufficient.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the WSL2 boot process and Ubuntu fsck guidance first, focusing on how the root filesystem is mounted at startup. Compare that with the proposed check from another WSL2 instance. Done means documented, safe steps for checking the Ubuntu root filesystem without running fsck on a mounted filesystem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu
- Domain
- documentation, operating-systems
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100