Udev not linking USB drive, unable to figure out why.
I have been trying to get my PowerPC install of Debian 7 to link /dev/sdc, or wherever the usb drive is, to /dev/usbdrive* with udev and I am unable to get this to work.
Here is my device walk through, my rule, and my syslog.
debian-powermac:/etc/udev/rules.d root 14:19:59$ udevadm info --attribute-walk --name /dev/sdc
custom logging function 0x101df008 registered
selinux=0
runtime dir '/run/udev'
calling: info
device 0x101df320 has devpath '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0/host4/target4:0:0/4:0:0:0/block/sdc'
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0/host4/target4:0:0/4:0:0:0/block/sdc':
KERNEL=="sdc"
SUBSYSTEM=="block"
DRIVER==""
device 0x101df9b0 has devpath '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0/host4/target4:0:0/4:0:0:0'
ATTR{range}=="16"
ATTR{ext_range}=="256"
ATTR{removable}=="0"
ATTR{ro}=="0"
ATTR{size}=="5860533160"
ATTR{alignment_offset}=="0"
ATTR{discard_alignment}=="0"
ATTR{capability}=="50"
ATTR{stat}==" 170 0 1360 7700 0 0 0 0 0 7700 7700"
ATTR{inflight}==" 0 0"
device 0x101dfe98 has devpath '/devices/virtual/bdi/8:32'
ATTR{events}==""
ATTR{events_async}==""
ATTR{events_poll_msecs}=="-1"
device 0x101dfe98 has devpath '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0/host4/target4:0:0/4:0:0:0'
looking at parent device '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0/host4/target4:0:0/4:0:0:0':
KERNELS=="4:0:0:0"
SUBSYSTEMS=="scsi"
DRIVERS=="sd"
ATTRS{device_blocked}=="0"
ATTRS{type}=="0"
ATTRS{scsi_level}=="3"
ATTRS{vendor}=="Seagate "
ATTRS{model}=="GoFlex Desk "
ATTRS{rev}=="0D1C"
ATTRS{state}=="running"
ATTRS{timeout}=="30"
ATTRS{iocounterbits}=="32"
ATTRS{iorequest_cnt}=="0xca"
ATTRS{iodone_cnt}=="0xca"
ATTRS{ioerr_cnt}=="0x3"
ATTRS{evt_media_change}=="0"
device 0x101e0ba0 has devpath '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0/host4/target4:0:0/4:0:0:0/scsi_generic/sg3'
ATTRS{queue_depth}=="1"
ATTRS{queue_type}=="none"
ATTRS{max_sectors}=="240"
device 0x101e0ba0 has devpath '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0/host4/target4:0:0'
looking at parent device '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0/host4/target4:0:0':
KERNELS=="target4:0:0"
SUBSYSTEMS=="scsi"
DRIVERS==""
device 0x101e10f8 has devpath '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0/host4'
looking at parent device '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0/host4':
KERNELS=="host4"
SUBSYSTEMS=="scsi"
DRIVERS==""
device 0x101e14d8 has devpath '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0'
looking at parent device '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0':
KERNELS=="1-4:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="usb-storage"
ATTRS{bInterfaceNumber}=="00"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bNumEndpoints}=="02"
ATTRS{bInterfaceClass}=="08"
ATTRS{bInterfaceSubClass}=="06"
ATTRS{bInterfaceProtocol}=="50"
ATTRS{supports_autosuspend}=="1"
device 0x101e2048 has devpath '/devices/pci0001:10/0001:10:14.2/usb1/1-4'
looking at parent device '/devices/pci0001:10/0001:10:14.2/usb1/1-4':
KERNELS=="1-4"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="c0"
ATTRS{bMaxPower}==" 0mA"
ATTRS{urbnum}=="641"
ATTRS{idVendor}=="0bc2"
ATTRS{idProduct}=="50a5"
ATTRS{bcdDevice}=="0100"
ATTRS{bDeviceClass}=="00"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="480"
ATTRS{busnum}=="1"
ATTRS{devnum}=="2"
ATTRS{devpath}=="4"
ATTRS{version}==" 2.10"
ATTRS{maxchild}=="0"
ATTRS{quirks}=="0x0"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Seagate"
ATTRS{product}=="GoFlex Desk"
ATTRS{serial}=="NA***YW"
device 0x101e3208 has devpath '/devices/pci0001:10/0001:10:14.2/usb1'
looking at parent device '/devices/pci0001:10/0001:10:14.2/usb1':
KERNELS=="usb1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bMaxPower}==" 0mA"
ATTRS{urbnum}=="30"
ATTRS{idVendor}=="1d6b"
ATTRS{idProduct}=="0002"
ATTRS{bcdDevice}=="0302"
ATTRS{bDeviceClass}=="09"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{bNumConfigurations}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{speed}=="480"
ATTRS{busnum}=="1"
ATTRS{devnum}=="1"
ATTRS{devpath}=="0"
ATTRS{version}==" 2.00"
ATTRS{maxchild}=="5"
ATTRS{quirks}=="0x0"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Linux 3.2.0-4-powerpc ehci_hcd"
ATTRS{product}=="EHCI Host Controller"
ATTRS{serial}=="0001:10:14.2"
ATTRS{authorized_default}=="1"
device 0x101e4470 has devpath '/devices/pci0001:10/0001:10:14.2'
looking at parent device '/devices/pci0001:10/0001:10:14.2':
KERNELS=="0001:10:14.2"
SUBSYSTEMS=="pci"
DRIVERS=="ehci_hcd"
ATTRS{vendor}=="0x1033"
ATTRS{device}=="0x00e0"
ATTRS{subsystem_vendor}=="0x9005"
ATTRS{subsystem_device}=="0x201f"
ATTRS{class}=="0x0c0320"
ATTRS{irq}=="54"
ATTRS{local_cpus}=="1"
ATTRS{local_cpulist}=="0"
ATTRS{dma_mask_bits}=="32"
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{enable}=="1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
ATTRS{companion}==""
ATTRS{uframe_periodic_max}=="100"
device 0x101e53b0 has devpath '/devices/pci0001:10'
looking at parent device '/devices/pci0001:10':
KERNELS=="pci0001:10"
SUBSYSTEMS==""
DRIVERS==""
debian-powermac:/etc/udev/rules.d root 14:20:09$ cat 00-custom.rules
SUBSYSTEMS=="scsi", ATTRS{model}=="GoFlex Desk ", SYMLINK+="usbdrive%n"
debian-powermac:/etc/udev/rules.d root 14:35:13$ /etc/init.d/udev restart
[ ok ] Stopping the hotplug events dispatcher: udevd.
[ ok ] Starting the hotplug events dispatcher: udevd.
debian-powermac:/etc/udev/rules.d root 14:35:22$ cat /var/log/syslog
Jul 31 14:35:22 debian-powermac udevd[14304]: custom logging function 0x10668008 registered
Jul 31 14:35:22 debian-powermac udevd[14304]: version 175
Jul 31 14:35:22 debian-powermac udevd[14304]: selinux=0
Jul 31 14:35:22 debian-powermac udevd[14304]: runtime dir '/run/udev'
Jul 31 14:35:22 debian-powermac udevd[14304]: mknod '/dev/autofs' c10:235
Jul 31 14:35:22 debian-powermac udevd[14304]: mknod '/dev/fuse' c10:229
Jul 31 14:35:22 debian-powermac udevd[14304]: mknod '/dev/btrfs-control' c10:234
Jul 31 14:35:22 debian-powermac udevd[14304]: mknod '/dev/loop-control' c10:237
Jul 31 14:35:22 debian-powermac udevd[14304]: mknod '/dev/net/tun' c10:200
Jul 31 14:35:22 debian-powermac udevd[14304]: mknod '/dev/ppp' c108:0
Jul 31 14:35:22 debian-powermac udevd[14304]: mknod '/dev/uinput' c10:223
Jul 31 14:35:22 debian-powermac udevd[14304]: mknod '/dev/mapper/control' c10:236
Jul 31 14:35:22 debian-powermac udevd[14304]: mknod '/dev/snd/timer' c116:33
Jul 31 14:35:22 debian-powermac udevd[14304]: mknod '/dev/snd/seq' c116:1
Jul 31 14:35:22 debian-powermac udevd[14305]: device 0x10668578 has devpath '/devices/pci0001:10/0001:10:14.2/usb1/1-4/1-4:1.0/host4/target4:0:0/4:0:0:0/block/sdc'
Jul 31 14:35:22 debian-powermac udevd[14305]: device 0x10668578 filled with db file data
Jul 31 14:35:22 debian-powermac udevd[14305]: restoring old watch on '/dev/sdc'
Jul 31 14:35:22 debian-powermac udevd[14305]: adding watch on '/dev/sdc'
... All other devices are displayed ...
Jul 31 14:35:22 debian-powermac udevd[14305]: reading '/etc/udev/rules.d/00-custom.rules' as rules file
... All other rules are loaded ...
Jul 31 14:35:22 debian-powermac udevd[14305]: rules use 277224 bytes tokens (23102 * 12 bytes), 42161 bytes buffer
Jul 31 14:35:22 debian-powermac udevd[14305]: temporary index used 75460 bytes (3773 * 20 bytes)
Jul 31 14:35:22 debian-powermac udevd[14305]: set children_max to 222
(I truncated some of the above as it's not necessary/I hit the limit of characters in a post.)
Can someone help me figure this out? My goal is to auto mount my USB HDD at boot. I tried using autofs with UUID, but I don't see any results or I don't know how it is suppose to work...
debian-powermac:/etc root 14:38:28$ cat auto.master | grep "/media/"
/media/Data /etc/auto.removable --timeout=2,sync,nodev,nosuid
debian-powermac:/etc root 14:37:30$ cat auto.removable
usb -fstype=ext4 UUID=dd4e3d6a-1ffc-427c-9ff4-ad8b4ad62914
I would expect the drive to be mounted at /media/Data or at /media/Data/Data, but I don't see it's files at those locations.
debian-powermac:/etc root 14:40:41$ blkid | grep "/dev/sdc"
/dev/sdc: LABEL="Data" UUID="dd4e3d6a-1ffc-427c-9ff4-ad8b4ad62914" TYPE="ext4"
Can someone help me understand this or get this to work?
Thanks
|