You are not logged in.
Pages: 1
I know I probably need to use UDEV to accomplish this - but I'm not certain how. I have an arcade machine that uses USB ports for it's memory card interfaces. I'm running custom software on the machine - using ArchLinux as the base. The original game software utilized Debian, however I no longer have a copy of it, and instead wish to recreate the experience proper using this configuration.
I need the LEFT USB port to always be /dev/sdb and the right usb port to always be /dev/sdc; furthermore, I would like them to always mount to /media/player1 and /media/player2 - which I think I can accomplish with autofs, but I'm also not 100% certain, I've been reading wiki entries on both, but I'm having difficulty articulating the data there to this particular usage scenario. Any help would be greatly appreciated.
Offline
Do you always use the same two usb storage devices?
Offline
Plug your device, find the device name, say /dev/sdb and do
find -L / -samefile /dev/sdc 2> /dev/nullThe output will be something like:
/dev/sdc
/dev/disk/by-path/pci-0000:00:1a.0-usb-0:1.4:1.0-scsi-0:0:0:0
/dev/disk/by-id/usb-0930_USB_Flash_Memory_08E0A2713040E927-0:0
/dev/block/8:32I think that /dev/disk/by-path/* point always to the same physical usb port. But usually it's better to use /dev/disk/by-id/* : they point to the port containg a given device, identified by its serial name. Do these link are sufficient for you? You could probably simply use them instead of /dev/sdb in your configuration. For your second question, if the cards are connected at boot simply edit the /etc/fstab file using the link as the device, or better use the file system UUID or label. For example, I have the following entry to always mount my backup usb disk at /mnt/dd_backup:
LABEL=DD_BACKUP /mnt/dd_backup ext4 ro,noauto,noatime 0 0you can use UUID= or /dev/.. instead of LABEL= ; remove the noauto if you want the device to be automatically mounted at boot.
Last edited by olive (2014-04-09 21:47:53)
Offline
To clarify - in theory any number of different USB sticks could be used as memory cards. Anything that a player decided to use to store his or her profile... which made it slightly more difficult to decide on the best method. That and I have to explicitly disable input devices for those two ports as well.
That said I think that /dev/disk/by - path seems to be sufficient for these purposes.
Last edited by Xaero252 (2014-04-10 03:24:17)
Offline
Pages: 1