-
Notifications
You must be signed in to change notification settings - Fork 837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't mount ext4 partition under windows using WSL2. Fails to mount with error code: -1 #6319
Comments
Nevermind, solved it by adding --partition 1 to the end. A bit odd considering the disk only has one partition though. |
Thanks for reporting this @A-Random-Lantern. Also, to give some context on --partition: by default WSL attempts to mount the entire block device as if it was unpartitioned (ex: mount /dev/sda) Can you please follow 7) and 8) in these instructions so we can have a look at the logs ? |
Here's my logs And my feedback report. I tried ls /mnt/wsl to check earlier, all I got was "c" and "d" |
Sorry, accidentally closed the issue. |
Thanks @A-Random-Lantern . Can you confirm that you followed the Start recording steps in the 'Recreate your problem' section, and if not, can you please publish another entry with a problem recording ? |
Sorry, here's the new link. The G drive is my NTFS external drive by the way. https://aka.ms/AAamd0c |
Thanks @A-Random-Lantern . So if you're disk is ntfs, it's expected that
In your case, the way to mount this disk would be to first attach it to WSL2 with: Also ntfs-3g needs to be installed in your distro for this to work. What's interesting though, is that if your disk is ntfs, you should get an error message if you try to mount it. Can you show the output of |
Ah, the ntfs drive isn't the one I'm trying to mount. I was just clarifying that to avoid confusion, as there was no G drive in the original image above. Sorry for any confusion caused by this, the current drive I'm trying to mount is EXT4 |
No problems. Can you share the output of the above three commands then ? That would help us locate the source of the issue. |
Sure, here you go. Here's the output for powershell: And here's the outputs in WSL:
|
Interesting. Based on those logs, it looks like you're using WSL1, but wsl --mount is only supported in WSL2. Do you have distros in both WSL1 and WSL2 ? (you can find that out by running If you mount a disk, it's only accessible in WSL2 distros. |
Yeah, found the problem thanks to you. I installed the linux distro under WSL 1 since I haven't set the default to WSL 2. I just tried mounting again, the drive mounts correctly now and I can access it. Closing the issue, sorry if this was a time waste haha. |
Environment
Steps to reproduce
Open powershell with administrative privileges
run 'wsl --mount \.\PHYSICALDRIVE2'
Powershell will say
The disk \\.\PHYSICALDRIVE2 was attached from WSL2, but failed to mount (error code: -1). For more details, run 'dmesg' inside WSL2.
Expected behavior
The EXT4 partition to mount correctly allowing me to access it.
Actual behavior
EXT4 partition is attached but not mounted, causing me to not be able to access the contents.
The dmesg output is
[ 0.008340] Microsoft 4.4.0-20270.1-Microsoft 4.4.35
The text was updated successfully, but these errors were encountered: