* [gentoo-user] Fwd: Set mount point of external drive with udev rules
[not found] <4ebfceac1003300529s64df32d7m3e3b7ea139ecd649@mail.gmail.com>
@ 2010-03-30 16:10 ` mikey
2010-03-30 16:20 ` Paul Hartman
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: mikey @ 2010-03-30 16:10 UTC (permalink / raw
To: gentoo-user
Hi I have an external drive that I would like mounted with HAL, so
that it doesn't mount on boot (which takes ages for it to spin up) and
so that I can add and remove it easily.
As I understand it udev rules are the way of doing this.
I have spent quite a while reading about these and understand roughly
what i want but I can't get any response from the changes I have made
(and have had to guess about things I don't want to guess about) so
how do I set them:
My guess to see if I can select the right drive
/etc/udev/rules.d/10-local.rules:
SUBSYSTEMS=="block", ATTRS{serial}=="2HBEQTN2", KERNEL=="sd?",
NAME="%k", SYMLINK+="external", GROUP="storage"
SUBSYSTEMS=="scsi", ATTRS{serial}=="2HBEQTN2",KERNEL=="sd?1",
SYMLINK+="external", GROUP="storage"
Produces no /dev/external when I restart HALD
This is the info about my drive:
$ /sbin/udevadm info -a -p $(/sbin/udevadm info -q path -n /dev/sdb)
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/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0/4:0:0:0/block/sdb':
KERNEL=="sdb"
SUBSYSTEM=="block"
DRIVER==""
ATTR{range}=="16"
ATTR{ext_range}=="256"
ATTR{removable}=="0"
ATTR{ro}=="0"
ATTR{size}=="976773168"
ATTR{alignment_offset}=="0"
ATTR{capability}=="52"
ATTR{stat}==" 295 954 4852 38240 14 1
120 10 0 38130 38250"
looking at parent device
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2: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}=="Maxtor "
ATTRS{model}=="Basics Desktop "
ATTRS{rev}=="0122"
ATTRS{state}=="running"
ATTRS{timeout}=="30"
ATTRS{iocounterbits}=="32"
ATTRS{iorequest_cnt}=="0x14f"
ATTRS{iodone_cnt}=="0x14f"
ATTRS{ioerr_cnt}=="0x9"
ATTRS{modalias}=="scsi:t-0x00"
ATTRS{evt_media_change}=="0"
ATTRS{queue_depth}=="1"
ATTRS{queue_type}=="none"
ATTRS{max_sectors}=="240"
looking at parent device
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0':
KERNELS=="target4:0:0"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4':
KERNELS=="host4"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0':
KERNELS=="1-2: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{modalias}=="usb:v0D49p7410d0122dc00dsc00dp00ic08isc06ip50"
ATTRS{supports_autosuspend}=="0"
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-2':
KERNELS=="1-2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="c0"
ATTRS{bMaxPower}==" 2mA"
ATTRS{urbnum}=="1392"
ATTRS{idVendor}=="0d49"
ATTRS{idProduct}=="7410"
ATTRS{bcdDevice}=="0122"
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{version}==" 2.00"
ATTRS{maxchild}=="0"
ATTRS{quirks}=="0x0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Maxtor "
ATTRS{product}=="Basics Desktop "
ATTRS{serial}=="2HBEQTN2 "
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1':
KERNELS=="usb1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bMaxPower}==" 0mA"
ATTRS{urbnum}=="40"
ATTRS{idVendor}=="1d6b"
ATTRS{idProduct}=="0002"
ATTRS{bcdDevice}=="0206"
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{version}==" 2.00"
ATTRS{maxchild}=="10"
ATTRS{quirks}=="0x0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Linux 2.6.31-gentoo-r10 ehci_hcd"
ATTRS{product}=="EHCI Host Controller"
ATTRS{serial}=="0000:00:02.1"
ATTRS{authorized_default}=="1"
looking at parent device '/devices/pci0000:00/0000:00:02.1':
KERNELS=="0000:00:02.1"
SUBSYSTEMS=="pci"
DRIVERS=="ehci_hcd"
ATTRS{vendor}=="0x10de"
ATTRS{device}=="0x005b"
ATTRS{subsystem_vendor}=="0x1043"
ATTRS{subsystem_device}=="0x815a"
ATTRS{class}=="0x0c0320"
ATTRS{irq}=="21"
ATTRS{local_cpus}=="ffffffff"
ATTRS{local_cpulist}=="0-31"
ATTRS{modalias}=="pci:v000010DEd0000005Bsv00001043sd0000815Abc0Csc03i20"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
ATTRS{companion}==""
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Fwd: Set mount point of external drive with udev rules
2010-03-30 16:10 ` [gentoo-user] Fwd: Set mount point of external drive with udev rules mikey
@ 2010-03-30 16:20 ` Paul Hartman
2010-03-30 16:24 ` Neil Bothwick
2010-04-01 0:11 ` [gentoo-user] " »Q«
2 siblings, 0 replies; 8+ messages in thread
From: Paul Hartman @ 2010-03-30 16:20 UTC (permalink / raw
To: gentoo-user
On Tue, Mar 30, 2010 at 11:10 AM, mikey <abc.mikey@googlemail.com> wrote:
> Hi I have an external drive that I would like mounted with HAL, so
> that it doesn't mount on boot (which takes ages for it to spin up) and
> so that I can add and remove it easily.
>
> As I understand it udev rules are the way of doing this.
>
> I have spent quite a while reading about these and understand roughly
> what i want but I can't get any response from the changes I have made
> (and have had to guess about things I don't want to guess about) so
> how do I set them:
>
> My guess to see if I can select the right drive
> /etc/udev/rules.d/10-local.rules:
>
> SUBSYSTEMS=="block", ATTRS{serial}=="2HBEQTN2", KERNEL=="sd?",
> NAME="%k", SYMLINK+="external", GROUP="storage"
> SUBSYSTEMS=="scsi", ATTRS{serial}=="2HBEQTN2",KERNEL=="sd?1",
> SYMLINK+="external", GROUP="storage"
>
>
> Produces no /dev/external when I restart HALD
I recently did this with a bit more generic rule, this works for me:
#LaCie 2TB USB hard drive
SUBSYSTEMS=="usb", ATTRS{manufacturer}=="LaCie",
ATTRS{product}=="LaCie Hard Disk", NAME{all_partitions}="lacie",
SYMLINK="lacie"
It will create /dev/lacie1 for the first partition, /dev/lacie2 for second, etc.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Fwd: Set mount point of external drive with udev rules
2010-03-30 16:10 ` [gentoo-user] Fwd: Set mount point of external drive with udev rules mikey
2010-03-30 16:20 ` Paul Hartman
@ 2010-03-30 16:24 ` Neil Bothwick
2010-03-30 17:37 ` mikey
2010-04-01 0:11 ` [gentoo-user] " »Q«
2 siblings, 1 reply; 8+ messages in thread
From: Neil Bothwick @ 2010-03-30 16:24 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
On Tue, 30 Mar 2010 17:10:53 +0100, mikey wrote:
> This is the info about my drive:
>
> $ /sbin/udevadm info -a -p $(/sbin/udevadm info -q path -n /dev/sdb)
You need the output for /dev/sdb1.
--
Neil Bothwick
What's the difference between ignorance and apathy?
I don't know and I don't care
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Fwd: Set mount point of external drive with udev rules
2010-03-30 16:24 ` Neil Bothwick
@ 2010-03-30 17:37 ` mikey
2010-03-31 6:29 ` mikey
0 siblings, 1 reply; 8+ messages in thread
From: mikey @ 2010-03-30 17:37 UTC (permalink / raw
To: gentoo-user
$ /sbin/udevadm info -a -p $(/sbin/udevadm info -q path -n /dev/sdb1)
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/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0/4:0:0:0/block/sdb/sdb1':
KERNEL=="sdb1"
SUBSYSTEM=="block"
DRIVER==""
ATTR{partition}=="1"
ATTR{start}=="63"
ATTR{size}=="976768002"
ATTR{alignment_offset}=="0"
ATTR{stat}==" 30791 1166 1053460 192160 691 898
12712 204930 0 160890 397090"
looking at parent device
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0/4:0:0:0/block/sdb':
KERNELS=="sdb"
SUBSYSTEMS=="block"
DRIVERS==""
ATTRS{range}=="16"
ATTRS{ext_range}=="256"
ATTRS{removable}=="0"
ATTRS{ro}=="0"
ATTRS{size}=="976773168"
ATTRS{alignment_offset}=="0"
ATTRS{capability}=="52"
ATTRS{stat}==" 30806 1219 1054004 192220 691
898 12712 204930 0 160940 397150"
looking at parent device
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2: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}=="Maxtor "
ATTRS{model}=="Basics Desktop "
ATTRS{rev}=="0122"
ATTRS{state}=="running"
ATTRS{timeout}=="30"
ATTRS{iocounterbits}=="32"
ATTRS{iorequest_cnt}=="0x7b1a"
ATTRS{iodone_cnt}=="0x7b1a"
ATTRS{ioerr_cnt}=="0x0"
ATTRS{modalias}=="scsi:t-0x00"
ATTRS{evt_media_change}=="0"
ATTRS{queue_depth}=="1"
ATTRS{queue_type}=="none"
ATTRS{max_sectors}=="240"
looking at parent device
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0':
KERNELS=="target4:0:0"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device
'/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4':
KERNELS=="host4"
SUBSYSTEMS=="scsi"
DRIVERS==""
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0':
KERNELS=="1-2: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{modalias}=="usb:v0D49p7410d0122dc00dsc00dp00ic08isc06ip50"
ATTRS{supports_autosuspend}=="0"
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-2':
KERNELS=="1-2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="c0"
ATTRS{bMaxPower}==" 2mA"
ATTRS{urbnum}=="117284"
ATTRS{idVendor}=="0d49"
ATTRS{idProduct}=="7410"
ATTRS{bcdDevice}=="0122"
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{version}==" 2.00"
ATTRS{maxchild}=="0"
ATTRS{quirks}=="0x0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Maxtor "
ATTRS{product}=="Basics Desktop "
ATTRS{serial}=="2HBEQTN2 "
looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1':
KERNELS=="usb1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{configuration}==""
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bMaxPower}==" 0mA"
ATTRS{urbnum}=="40"
ATTRS{idVendor}=="1d6b"
ATTRS{idProduct}=="0002"
ATTRS{bcdDevice}=="0206"
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{version}==" 2.00"
ATTRS{maxchild}=="10"
ATTRS{quirks}=="0x0"
ATTRS{authorized}=="1"
ATTRS{manufacturer}=="Linux 2.6.31-gentoo-r10 ehci_hcd"
ATTRS{product}=="EHCI Host Controller"
ATTRS{serial}=="0000:00:02.1"
ATTRS{authorized_default}=="1"
looking at parent device '/devices/pci0000:00/0000:00:02.1':
KERNELS=="0000:00:02.1"
SUBSYSTEMS=="pci"
DRIVERS=="ehci_hcd"
ATTRS{vendor}=="0x10de"
ATTRS{device}=="0x005b"
ATTRS{subsystem_vendor}=="0x1043"
ATTRS{subsystem_device}=="0x815a"
ATTRS{class}=="0x0c0320"
ATTRS{irq}=="21"
ATTRS{local_cpus}=="ffffffff"
ATTRS{local_cpulist}=="0-31"
ATTRS{modalias}=="pci:v000010DEd0000005Bsv00001043sd0000815Abc0Csc03i20"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
ATTRS{companion}==""
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
On 30 March 2010 17:24, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Tue, 30 Mar 2010 17:10:53 +0100, mikey wrote:
>
>> This is the info about my drive:
>>
>> $ /sbin/udevadm info -a -p $(/sbin/udevadm info -q path -n /dev/sdb)
>
>
> You need the output for /dev/sdb1.
>
>
> --
> Neil Bothwick
>
> What's the difference between ignorance and apathy?
> I don't know and I don't care
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Fwd: Set mount point of external drive with udev rules
2010-03-30 17:37 ` mikey
@ 2010-03-31 6:29 ` mikey
2010-03-31 17:08 ` Paul Hartman
0 siblings, 1 reply; 8+ messages in thread
From: mikey @ 2010-03-31 6:29 UTC (permalink / raw
To: gentoo-user
I don't blame people for not wanting to touch this with a barge pole,
it's a complete nightmare. I have had success to a degree in that I
created a .fdi file which gives my device a pseudo label of music so
it now gets mounted as /media/music and I found a -rather basic -
script to mount devices via HAL and DBUS
(http://www.datapax.com.au/apps/halmount/), so if I run my script on
boot then my drive starts up mounted as a unique location. This is
however a hack.
I have still been unable to make any kind of match using UDEV rules on
my system and would like to know how or where I'm going wrong.
On 30 March 2010 18:37, mikey <abc.mikey@googlemail.com> wrote:
> $ /sbin/udevadm info -a -p $(/sbin/udevadm info -q path -n /dev/sdb1)
>
> 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/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0/4:0:0:0/block/sdb/sdb1':
> KERNEL=="sdb1"
> SUBSYSTEM=="block"
> DRIVER==""
> ATTR{partition}=="1"
> ATTR{start}=="63"
> ATTR{size}=="976768002"
> ATTR{alignment_offset}=="0"
> ATTR{stat}==" 30791 1166 1053460 192160 691 898
> 12712 204930 0 160890 397090"
>
> looking at parent device
> '/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0/4:0:0:0/block/sdb':
> KERNELS=="sdb"
> SUBSYSTEMS=="block"
> DRIVERS==""
> ATTRS{range}=="16"
> ATTRS{ext_range}=="256"
> ATTRS{removable}=="0"
> ATTRS{ro}=="0"
> ATTRS{size}=="976773168"
> ATTRS{alignment_offset}=="0"
> ATTRS{capability}=="52"
> ATTRS{stat}==" 30806 1219 1054004 192220 691
> 898 12712 204930 0 160940 397150"
>
> looking at parent device
> '/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2: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}=="Maxtor "
> ATTRS{model}=="Basics Desktop "
> ATTRS{rev}=="0122"
> ATTRS{state}=="running"
> ATTRS{timeout}=="30"
> ATTRS{iocounterbits}=="32"
> ATTRS{iorequest_cnt}=="0x7b1a"
> ATTRS{iodone_cnt}=="0x7b1a"
> ATTRS{ioerr_cnt}=="0x0"
> ATTRS{modalias}=="scsi:t-0x00"
> ATTRS{evt_media_change}=="0"
> ATTRS{queue_depth}=="1"
> ATTRS{queue_type}=="none"
> ATTRS{max_sectors}=="240"
>
> looking at parent device
> '/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4/target4:0:0':
> KERNELS=="target4:0:0"
> SUBSYSTEMS=="scsi"
> DRIVERS==""
>
> looking at parent device
> '/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/host4':
> KERNELS=="host4"
> SUBSYSTEMS=="scsi"
> DRIVERS==""
>
> looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0':
> KERNELS=="1-2: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{modalias}=="usb:v0D49p7410d0122dc00dsc00dp00ic08isc06ip50"
> ATTRS{supports_autosuspend}=="0"
>
> looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1/1-2':
> KERNELS=="1-2"
> SUBSYSTEMS=="usb"
> DRIVERS=="usb"
> ATTRS{configuration}==""
> ATTRS{bNumInterfaces}==" 1"
> ATTRS{bConfigurationValue}=="1"
> ATTRS{bmAttributes}=="c0"
> ATTRS{bMaxPower}==" 2mA"
> ATTRS{urbnum}=="117284"
> ATTRS{idVendor}=="0d49"
> ATTRS{idProduct}=="7410"
> ATTRS{bcdDevice}=="0122"
> 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{version}==" 2.00"
> ATTRS{maxchild}=="0"
> ATTRS{quirks}=="0x0"
> ATTRS{authorized}=="1"
> ATTRS{manufacturer}=="Maxtor "
> ATTRS{product}=="Basics Desktop "
> ATTRS{serial}=="2HBEQTN2 "
>
> looking at parent device '/devices/pci0000:00/0000:00:02.1/usb1':
> KERNELS=="usb1"
> SUBSYSTEMS=="usb"
> DRIVERS=="usb"
> ATTRS{configuration}==""
> ATTRS{bNumInterfaces}==" 1"
> ATTRS{bConfigurationValue}=="1"
> ATTRS{bmAttributes}=="e0"
> ATTRS{bMaxPower}==" 0mA"
> ATTRS{urbnum}=="40"
> ATTRS{idVendor}=="1d6b"
> ATTRS{idProduct}=="0002"
> ATTRS{bcdDevice}=="0206"
> 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{version}==" 2.00"
> ATTRS{maxchild}=="10"
> ATTRS{quirks}=="0x0"
> ATTRS{authorized}=="1"
> ATTRS{manufacturer}=="Linux 2.6.31-gentoo-r10 ehci_hcd"
> ATTRS{product}=="EHCI Host Controller"
> ATTRS{serial}=="0000:00:02.1"
> ATTRS{authorized_default}=="1"
>
> looking at parent device '/devices/pci0000:00/0000:00:02.1':
> KERNELS=="0000:00:02.1"
> SUBSYSTEMS=="pci"
> DRIVERS=="ehci_hcd"
> ATTRS{vendor}=="0x10de"
> ATTRS{device}=="0x005b"
> ATTRS{subsystem_vendor}=="0x1043"
> ATTRS{subsystem_device}=="0x815a"
> ATTRS{class}=="0x0c0320"
> ATTRS{irq}=="21"
> ATTRS{local_cpus}=="ffffffff"
> ATTRS{local_cpulist}=="0-31"
> ATTRS{modalias}=="pci:v000010DEd0000005Bsv00001043sd0000815Abc0Csc03i20"
> ATTRS{broken_parity_status}=="0"
> ATTRS{msi_bus}==""
> ATTRS{companion}==""
>
> looking at parent device '/devices/pci0000:00':
> KERNELS=="pci0000:00"
> SUBSYSTEMS==""
> DRIVERS==""
>
>
> On 30 March 2010 17:24, Neil Bothwick <neil@digimed.co.uk> wrote:
>> On Tue, 30 Mar 2010 17:10:53 +0100, mikey wrote:
>>
>>> This is the info about my drive:
>>>
>>> $ /sbin/udevadm info -a -p $(/sbin/udevadm info -q path -n /dev/sdb)
>>
>>
>> You need the output for /dev/sdb1.
>>
>>
>> --
>> Neil Bothwick
>>
>> What's the difference between ignorance and apathy?
>> I don't know and I don't care
>>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Fwd: Set mount point of external drive with udev rules
2010-03-31 6:29 ` mikey
@ 2010-03-31 17:08 ` Paul Hartman
2010-03-31 17:13 ` Neil Bothwick
0 siblings, 1 reply; 8+ messages in thread
From: Paul Hartman @ 2010-03-31 17:08 UTC (permalink / raw
To: gentoo-user
On Wed, Mar 31, 2010 at 1:29 AM, mikey <abc.mikey@googlemail.com> wrote:
> I don't blame people for not wanting to touch this with a barge pole,
> it's a complete nightmare. I have had success to a degree in that I
> created a .fdi file which gives my device a pseudo label of music so
> it now gets mounted as /media/music and I found a -rather basic -
> script to mount devices via HAL and DBUS
> (http://www.datapax.com.au/apps/halmount/), so if I run my script on
> boot then my drive starts up mounted as a unique location. This is
> however a hack.
>
> I have still been unable to make any kind of match using UDEV rules on
> my system and would like to know how or where I'm going wrong.
The {serial} in your rule does not contain the trailing spaces that
are in the actual udevadm output. Maybe that's the reason.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] Fwd: Set mount point of external drive with udev rules
2010-03-31 17:08 ` Paul Hartman
@ 2010-03-31 17:13 ` Neil Bothwick
0 siblings, 0 replies; 8+ messages in thread
From: Neil Bothwick @ 2010-03-31 17:13 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 365 bytes --]
On Wed, 31 Mar 2010 12:08:50 -0500, Paul Hartman wrote:
> The {serial} in your rule does not contain the trailing spaces that
> are in the actual udevadm output. Maybe that's the reason.
udev rules should match without trailing spaces,although things don't
always work as they should :(
--
Neil Bothwick
Top Oxymorons Number 9: Political science
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: Set mount point of external drive with udev rules
2010-03-30 16:10 ` [gentoo-user] Fwd: Set mount point of external drive with udev rules mikey
2010-03-30 16:20 ` Paul Hartman
2010-03-30 16:24 ` Neil Bothwick
@ 2010-04-01 0:11 ` »Q«
2 siblings, 0 replies; 8+ messages in thread
From: »Q« @ 2010-04-01 0:11 UTC (permalink / raw
To: gentoo-user
On Tue, 30 Mar 2010 17:10:53 +0100
mikey <abc.mikey@googlemail.com> wrote:
> My guess to see if I can select the right drive
> /etc/udev/rules.d/10-local.rules:
>
> SUBSYSTEMS=="block", ATTRS{serial}=="2HBEQTN2", KERNEL=="sd?",
> NAME="%k", SYMLINK+="external", GROUP="storage"
> SUBSYSTEMS=="scsi", ATTRS{serial}=="2HBEQTN2", KERNEL=="sd?1",
> SYMLINK+="external", GROUP="storage"
From <http://www.reactivated.net/writing_udev_rules.html>:
... while it is legal to combine the attributes from the device in
question and a single parent device, you cannot mix-and-match
attributes from multiple parent devices - your rule will not work.
From the output of `udevadm info` you posted later, the parent device
with ATTRS{serial}=="2HBEQTN2" has SUBSYSTEMS=="usb", not "block"
or "scsi". That's the only problem I noticed, but I didn't look too
hard after seeing that one.
--
»Q«
Kleeneness is next to Gödelness.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-04-01 1:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4ebfceac1003300529s64df32d7m3e3b7ea139ecd649@mail.gmail.com>
2010-03-30 16:10 ` [gentoo-user] Fwd: Set mount point of external drive with udev rules mikey
2010-03-30 16:20 ` Paul Hartman
2010-03-30 16:24 ` Neil Bothwick
2010-03-30 17:37 ` mikey
2010-03-31 6:29 ` mikey
2010-03-31 17:08 ` Paul Hartman
2010-03-31 17:13 ` Neil Bothwick
2010-04-01 0:11 ` [gentoo-user] " »Q«
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox