VeraCrypt icon indicating copy to clipboard operation
VeraCrypt copied to clipboard

VeraCrypt on FreeBSD: "Error: mount: /dev/md0: No such file or directory"

Open strfry opened this issue 5 years ago • 7 comments

This has already been posted, but the sourceforge bugtracker doesn't seem to be getting much attention: https://sourceforge.net/p/veracrypt/tickets/263/

As the description implies, handling of memory disks has changed on recent FreeBSD versions, which hasn't been corrected in Veracrypt yet. I haven't tested if this actually works with FAT partitions, as described by the original reporter.

Still, i need this for work, and would be willing to look into it. I would appreciate some guidance though, where to look for the thing that went wrong here.

strfry avatar Jan 14 '20 10:01 strfry

I found an answer to this problem. Apparently, the FreeBSD backend doesn't even bother about detecting any fs types than FAT. And even if it did, mount -t ntfs would not work, as ntfs read support has been removed from kernel, and we're left with ntfs-3g, which has so be specified via -o mountprog=/usr/local/bin/ntfs-3g.

Which works for me as a hardcoded fix (i don't actually need FAT at all in Veracrypt), but it would be nice to have a general solution. Since coding a filesystem is a bit of a task, i wonder if there is another way to influence what is passed as filesystemType to CoreFreeBSD::MountFileSystem?

I found Veracrypt a bit hard to debug and follow because of the forking multi-process architecture. So a little advise would be appreciated, on to make a proper fix for this issue.

strfry avatar Jan 14 '20 21:01 strfry

@idrassi maybe you can give @strfry a little advise where to fix the issue so he can create a pull request.

andreas-becker avatar Feb 27 '20 20:02 andreas-becker

I also need to mount ntfs devices on FreeBSD and would be very glad if this issue is resolved in the future. @strfry Can you please tell me what exactly you patched in order to get this to work?

ghost avatar Aug 08 '20 12:08 ghost

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 30 '20 05:12 stale[bot]

This issue has been automatically closed because it has not had recent activity. This probably means that it is not reproducible or it has been fixed in a newer version. If it’s an enhancement and hasn’t been taken on for so long, then it seems no one has the time to implement this. Please reopen if you still encounter this issue with the latest stable version. You can also contribute directly by providing a pull request. Thank you!

stale[bot] avatar Jan 06 '21 05:01 stale[bot]

@idrassi Reopen please. Still reproducible.

https://sourceforge.net/p/veracrypt/discussion/technical/thread/667da9e7e7/?limit=25 https://sourceforge.net/p/veracrypt/tickets/263/

I'm trying to mount an ext3 partition instead.

Is there any chance this would work on OpenBSD? Did anyone try? I'm about to.

o-alquimista avatar Aug 23 '23 13:08 o-alquimista

Indeed, it seems the automatic fs detection doesn't work anymore in FreeBSD. I'm not sure about mdconfig link since VeraCrypt volume requires on-the-fly encryption/decryption while mdconfig is just for RAM disks. This seems to be more related to how filesystem is detected rather than the virtual device itself. i'm not sure I can fix this as I work mainly on Windows, Linux and macOS support in VeraCrypt. Any hints are welcome.

idrassi avatar Aug 23 '23 14:08 idrassi