I created a udev rule according to
https://wiki.archlinux.org/title/Udev. The device now shows up as /dev/onyx-mp3, but I get the error that it's not a block device when I try to mount it.
fdisk /dev/onyx-mp3 and cfdisk /dev/onyx-mp3 give me the error "Inappropriate ioctl for device." I will give the steps I took and someone please tell me where I went wrong:
1. I got a device path by running udevadm monitor and then plugging in the device. This gave me something like
Code:
KERNEL[370382.355286] add /devices/pci0000:00/0000:00:05.1/usb3/3-1 (usb)
KERNEL[370382.358628] add /devices/pci0000:00/0000:00:05.1/usb3/3-1/3-1:1.0 (usb)
UDEV [370382.375256] add /devices/pci0000:00/0000:00:05.1/usb3/3-1 (usb)
UDEV [370382.376176] add /devices/pci0000:00/0000:00:05.1/usb3/3-1/3-1:1.0 (usb)
(Actually this I got from just now connecting the device to the vm I'm posting this from. Originally I attached it outside the vm and got two more lines of output; they were identical to the first and third lines except there was "bind" in place of "add.)
2. Then I got device info with udevadm info --attribute-walk --path=/devices/pci0000:00/0000:00:05.1/usb3/3-1/3-1:1.0 (i.e., I used the device path from the output of udevadm monitor. I tried both the long and the short path; the output seems the same).
3. Then I wrote the udev rule with KERNEL and SUBSYSTEM equal to attributes from the first level and SUBSYSTEMS, ATTR{idVendor}, and ATTR{iProduct} equal to attributes from a parent two levels above. Also MODE="0660" and TAG+="uaccess".
Apparently I've created access to the USB interface and not the USB storage. /dev/onyx-3 is a character device; can I use that somehow to gain access to the USB storage?