Skip to content
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

exFAT Filesystem Fails to Work with VeraCrypt on WSL2 #1464

Open
dam2452 opened this issue Jan 15, 2025 · 1 comment
Open

exFAT Filesystem Fails to Work with VeraCrypt on WSL2 #1464

dam2452 opened this issue Jan 15, 2025 · 1 comment
Labels

Comments

@dam2452
Copy link

dam2452 commented Jan 15, 2025


Expected behavior

Creating a VeraCrypt volume with the exFAT filesystem on WSL2 (Windows Subsystem for Linux 2) should work without errors.

Observed behavior

When attempting to create a VeraCrypt volume with the exFAT filesystem on WSL2, the following error occurs:
Error: device-mapper: create ioctl on veracrypt1 failed: Device or resource busy

Using the --filesystem=FAT option works, but only when the -m=nokernelcrypto flag is used.

Steps to reproduce

  1. Run the following command in WSL2:
    sudo veracrypt --text --non-interactive -m=nokernelcrypto --create ./testporeboot.tc \
      --password=1234 --size=200M --volume-type=normal \
      --encryption=AES --hash=SHA-512 --filesystem=exFAT
  2. Observe the error output.
  3. Change the --filesystem option to FAT and re-run the command.
  4. Notice that the command succeeds only with the -m=nokernelcrypto flag.

Screenshots

signal-2025-01-14-162032_002

Your Environment

VeraCrypt version: 1.26.14

Operating system and version:
Microsoft Windows
Windows 11
Version 24H2 (OS Build: 26100.2605)

WSL version:

  • WSL Version: 2.3.26.0
  • Kernel Version: 5.15.167.4-1
  • WSLg Version: 1.0.65
  • MSRDC Version: 1.2.5620
  • Direct3D Version: 1.611.1-81528511
  • DXCore Version: 10.0.26100.1-240331-1435.ge-release

WSL Distribution: Kali Linux
Kernel version in WSL2: 5.15.167.4-microsoft-standard-WSL

System type: 64-bit


@dam2452 dam2452 added the bug label Jan 15, 2025
@dam2452
Copy link
Author

dam2452 commented Jan 15, 2025

Additional Information and Troubleshooting Steps

I have tested this issue on two different machines running Windows 11 with WSL2, and the problem persists across both setups. Below is a summary of the troubleshooting steps that I have attempted:

  1. Tested Fixes:

    • Manually closing any mapped volumes using:
      sudo cryptsetup close <volume_name>
    • Restarting WSL2 using:
      wsl --shutdown
    • Verifying the behavior persists after a full system reboot.
  2. Behavior Observed on Other Platforms:

    • The issue does not occur on native Linux distributions (e.g., Ubuntu) or macOS. This suggests that the problem is specific to WSL2's handling of the exFAT filesystem.
  3. WSL2 exFAT Support:

    • The exFAT filesystem is supported by WSL2. For example, I tested this by using the native VeraCrypt application on Windows to mount an exFAT volume. I then attached the mounted volume to Linux within WSL2, and it worked as expected.
    • This confirms that exFAT functionality is available in WSL2 when using this indirect approach, but the issue remains when attempting to use VeraCrypt directly within WSL2.
  4. Why I Use WSL2 Instead of Windows:

    • I use WSL2 to avoid the limitations of the Windows version of VeraCrypt. On Linux, VeraCrypt provides a native text interface, making it much easier to run commands directly, debug issues, and integrate with scripts.
    • In contrast, the Windows version lacks a native command-line interface (CLI). Commands need to be run "blindly" using the /q and /s ) flags, which is cumbersome and unsuitable for automation or workflows that require precise control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant