logoAnerty's Lair - Info - DriveSort under Linux << News << Home

Info: DriveSort under Linux

Linux DriveSort

I've done some tests in Ubuntu Linux v8.04 using Wine v0.9.59 as Windows emulator, and it seems to allow DriveSort to run under Linux. I currently don't plan to make a cross platform version of DriveSort, since my code base is tightly bound to the Microsoft APIs. It would be easier to rewrite the whole thing from scratch, and I'm not even sure there are portable APIs for disk management somewhere.

Still, there are some issues involved in running DriveSort under Wine:

  • I only managed to sort something by running DriveSort using sudo wine DriveSort.exe, otherwise it complained of "Access denied" when I tried to open a mounted FAT filesystem.
    This might be due to my somewhat exotic testing conditions (I've tried to sort an USB key connected to my Windows machine by running DriveSort over Wine over Ubuntu Linux over VMWare Player over Windows). I've tried to sort a TrueCrypt volume mounted in Ubuntu to skip the virtual machine layer, but it doesn't seem to solve the problem, I can only open the FS by running Wine as root. It might also have something to do with my Ubuntu installation, which is a preinstalled image (The Ubuntu VM Image I use).

    If you find a way to open a disk in DriveSort without running Wine as root, please tell me.
  • There are some Windows functions used by DriveSort which are not supported by Wine at the moment. Some are important, the others less so:
    • Volume locking (FSCTL_LOCK_VOLUME): Enables DriveSort to prevent other programs from accidentaly modifying the filesystem which it sorts, and to prevent DriveSort from opening a filesystem while another program works on it. Without this, there is no guarantee that your FAT filesystem won't be modified by two programs at the same time, so it might lead to a corrupted filesystem. You can try to prevent this by not doing anything on that filesystem, but it's still a bit dangerous.
      Reported by Wine as fixme:ntdll:NtFsControlFile stub! return success - Unsupported fsctl 90018 (device=9 access=0 func=6 method=0)
    • Volume Unlocking (FSCTL_UNLOCK_VOLUME): Enables DriveSort to release a volume lock when you close it. Not missed much when there is no way to lock the volume, but still important if Wine implements the locking without implementing the unlocking in a beta version.
      Reported by Wine as fixme:ntdll:NtFsControlFile stub! return success - Unsupported fsctl 9001c (device=9 access=0 func=7 method=0).
    • Drive Layout (IOCTL_DISK_GET_DRIVE_LAYOUT): Gives more details on the disk partitions to DriveSort.
      Reported by Wine as fixme:mountmgr:harddisk_ioctl unsupported ioctl 7400c.
    • Internet file read (InternetReadFileExW): Enables DriveSort to read the last DriveSort version from the net asynchronously when looking for uptades. Since the Wine placeholder function does nothing, the updater will complain that it can't tell the latest version of DriveSort with "Success" as a reason, which does not tell much.
      Reported by Wine as err:wininet:InternetReadFileExW (0x3, 0x14eae0, 0x8, 0x14ead0): not implemented in native
  • There's a Windows DLL which is not packaged with Wine: mfc42u.dll. To run DriveSort under Wine you need to put it either with DriveSort.exe or in the Wine system files. You can easily find it with Google mfc42u.dll.
  • Usually, when DriveSort closes a disk it just sorted, it attempts to dismount it to force the operating system to reload its filesystem caches. Under Windows the disk is automatically remounted, so this is transparent for the user. Under Wine, the disk is not automatically remounted, so don't freak out if your disk disappears when you close it under Wine, since it was only dismounted.

Using Wine allows to run DriveSort under Linux, but it won't be as safe as running it under Windows until Wine implements the volume locking.