how to: assign permanent driveletters to dosdevices?

Questions about Wine on Linux
Locked
abraxa
Level 2
Level 2
Posts: 27
Joined: Sat Feb 13, 2016 5:48 am

how to: assign permanent driveletters to dosdevices?

Post by abraxa »

here is my problem: whenever i manually assigned all of my dosdevices within wine (usb stick f:\, usb hd g:\, sdcard h:\), this very config does not last for long.

for instance, my usb stick (which is connected permanently) gets an additional driveletter j:\ and is listed twice in winecfg.

even when i delete it via winecfg it gets recreated. the same goes for all other devices.

so, is it possible to have a fixed config once and for all?
User avatar
dimesio
Moderator
Moderator
Posts: 13201
Joined: Tue Mar 25, 2008 10:30 pm

Re: how to: assign permanent driveletters to dosdevices?

Post by dimesio »

Sounds like this longstanding bug: https://bugs.winehq.org/show_bug.cgi?id=22080.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: how to: assign permanent driveletters to dosdevices?

Post by Bob Wya »

Wine uses udisks under the "hood" to get device mappings. Wine uses special :: notation for drive physical (Linux) devices in the "${WINEPREFIX}/dosdevices" directory.

So for my default WINEPREFIX:

Code: Select all

cd ~/.wine/dosdevices
'ls' -l                                                                                                                                                                                         
total 0
lrwxrwxrwx 1 robert users 10 Aug  3 06:48 c: -> ../drive_c
lrwxrwxrwx 1 robert users  8 Aug  3 06:48 d:: -> /dev/sr0
lrwxrwxrwx 1 robert users  8 Aug  3 06:48 e:: -> /dev/sdc
lrwxrwxrwx 1 robert users 27 Aug  4 22:10 f: -> /run/media/robert/Easy2Boot
lrwxrwxrwx 1 robert users  9 Aug  3 06:48 f:: -> /dev/sdc1
lrwxrwxrwx 1 robert users  9 Aug  3 06:48 g:: -> /dev/sdc2
lrwxrwxrwx 1 robert users  9 Aug  3 06:48 h:: -> /dev/sdc4
lrwxrwxrwx 1 robert users  9 Aug  4 22:10 i:: -> /dev/sdc3
lrwxrwxrwx 1 robert users  1 Aug  3 06:48 z: -> /
  • F:: is just a place holder symbolic link to the physical (Linux) device path (disk partition 1).
  • F: is the actual symbolic link to the mountpoint of the associated device (USB drive: partition 1).
You could "game the system" by using UUID device paths - in your WINEPREFIX - to your desired USB device partition (as root):

Code: Select all

cd /dev/disk/by-uuid/
'ls' -l
total 0
...
lrwxrwxrwx 1 root root 10 Aug  4 22:09 34DA2680DA263F0C -> ../../sdc1
...
So to actually create a permanent mount point for the USB partition 1 on my system:

Code: Select all

cd ~/.wine/dosdevices
rm 'e::' 'f::'
ln -s '/dev/disk/by-uuid/34DA2680DA263F0C' 'e::'
So now I should (in theory) have a permanent (maybe) E: drive for my USB device partition!!

Give that solution a try and report back if you have any issues... :)

Bob
abraxa
Level 2
Level 2
Posts: 27
Joined: Sat Feb 13, 2016 5:48 am

Re: how to: assign permanent driveletters to dosdevices?

Post by abraxa »

thanks for your replies.

will test this workaround, although i hope there will be a fix for that bug, as it is a very crucial setting.
Locked