Gentoo Archives: gentoo-user

From: Jorge Almeida <jalmeida@××××××××××××.pt>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] confused udev?
Date: Thu, 17 Nov 2005 12:48:26
Message-Id: Pine.LNX.4.63.0511171208350.3944@weber.math.ist.utl.pt
In Reply to: Re: [gentoo-user] confused udev? by Dirk Heinrichs
1 On Thu, 17 Nov 2005, Dirk Heinrichs wrote:
2
3 > Am Donnerstag, 17. November 2005 10:26 schrieb ext Jorge Almeida:
4 >
5 > > I have a USB memory stick and an external USB box with an IDE disk.
6 > > I configured udev to assign device names to both items, or so I thought.
7 > > The external box is plugged, the memory stick isn't.
8 > > The problem is: the device for the box is not created, and the memstick
9 > > device exists but represents the box, not the stick. I read
10 >
11 > Some questions:
12 >
13 > What's your udev and kernel version?
14 >
15 sys-fs/udev-070-r1
16 2.6.13-gentoo-r3
17
18 > Did you configure your kernel to use USB storage (if in doubt, post your
19 > kernel config)?
20
21 Yes, and I can use the devices (write and read files...).
22
23 CONFIG_USB_STORAGE=y
24 (...)
25 # SCSI device support
26 #
27 CONFIG_SCSI=y
28 CONFIG_SCSI_PROC_FS=y
29
30 #
31 # SCSI support type (disk, tape, CD-ROM)
32 #
33 CONFIG_BLK_DEV_SD=y
34
35 >
36 > Does the system detect the devices when you plug them in (post the last few
37 > lines of dmesg output after plugging in each device)
38 >
39 ipt_recent v0.3.1: Stephen Frost <sfrost@×××××××.net>.
40 http://snowman.net/projects/ipt_recent/
41 spurious 8259A interrupt: IRQ7.
42 EXT3 FS on hda6, internal journal
43 usb 1-3: new high speed USB device using ehci_hcd and address 3
44 scsi0 : SCSI emulation for USB Mass Storage devices
45 usb-storage: device found at 3
46 usb-storage: waiting for device to settle before scanning
47 Vendor: Maxtor 6 Model: L250R0 Rev: BAH4
48 Type: Direct-Access ANSI SCSI revision: 00
49 SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
50 sda: assuming drive cache: write through
51 SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
52 sda: assuming drive cache: write through
53 sda: unknown partition table
54 Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
55 usb-storage: device scan complete
56 SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
57 sda: assuming drive cache: write through
58 sda: sda1
59 SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB)
60 sda: assuming drive cache: write through
61 sda: sda1
62 kjournald starting. Commit interval 5 seconds
63 EXT3 FS on sda1, internal journal
64 EXT3-fs: mounted filesystem with ordered data mode.
65 kjournald starting. Commit interval 5 seconds
66 EXT3 FS on sda1, internal journal
67 EXT3-fs: mounted filesystem with ordered data mode.
68 kjournald starting. Commit interval 5 seconds
69 EXT3 FS on sda1, internal journal
70 EXT3-fs: mounted filesystem with ordered data mode.
71 FAT: "conv=auto" option is obsolete, not supported now
72 FAT: "posix" option is obsolete, not supported now
73 FAT: bogus number of reserved sectors
74 VFS: Can't find a valid FAT filesystem on dev sda1.
75 kjournald starting. Commit interval 5 seconds
76 EXT3 FS on sda1, internal journal
77 EXT3-fs: mounted filesystem with ordered data mode.
78 kjournald starting. Commit interval 5 seconds
79 EXT3 FS on sda1, internal journal
80 EXT3-fs: mounted filesystem with ordered data mode.
81
82 The memstick has a vfat in it (original). The external disk has 1
83 partition with ext3.
84 The line in /etc/fstab corresponding to the memstick (the disk doesn't
85 have one, yet):
86 /dev/plextor_memstick1 /mnt/pen vfat noauto,user,noexec,nodev,rw,noatime,conv=auto,uni_xlate,posix 0 0
87
88 Now I plugged the memstick. dmesg says:
89
90 usb 1-7: new high speed USB device using ehci_hcd and address 4
91 usb 1-7: device descriptor read/64, error -71
92 scsi1 : SCSI emulation for USB Mass Storage devices
93 usb-storage: device found at 4
94 usb-storage: waiting for device to settle before scanning
95 usb 1-7: reset high speed USB device using ehci_hcd and address 4
96 Vendor: PLEXTOR Model: PlexFlash-2 Rev: 5.02
97 Type: Direct-Access ANSI SCSI revision: 00
98 usb 1-7: reset high speed USB device using ehci_hcd and address 4
99 usb 1-7: reset high speed USB device using ehci_hcd and address 4
100 usb 1-7: reset high speed USB device using ehci_hcd and address 4
101 usb 1-7: reset high speed USB device using ehci_hcd and address 4
102 usb 1-7: reset high speed USB device using ehci_hcd and address 4
103 usb 1-7: reset high speed USB device using ehci_hcd and address 4
104 sdb: Write Protect is on
105 sdb: Mode Sense: 45 00 80 08
106 sdb: assuming drive cache: write through
107 Attached scsi removable disk sdb at scsi1, channel 0, id 0, lun 0
108 usb-storage: device scan complete
109
110
111 > What does udevinfo -a -p $(udevinfo -q path -n /dev/sdX) tell you (replace X
112 > with the appropriate letter for each device)?
113 >
114 $ udevinfo -a -p $(udevinfo -q path -n /dev/sda)
115
116 udevinfo starts with the device the node belongs to and then walks up the
117 device chain, to print for every device found, all possibly useful attributes
118 in the udev key format.
119 Only attributes within one device section may be used together in one rule,
120 to match the device for which the node will be created.
121
122 device '/sys/block/sda' has major:minor 8:0
123 looking at class device '/sys/block/sda':
124 KERNEL=="sda"
125 SUBSYSTEM=="block"
126 SYSFS{dev}=="8:0"
127 SYSFS{range}=="16"
128 SYSFS{removable}=="0"
129 SYSFS{size}=="490234752"
130 SYSFS{stat}==" 105 547 1975 616 5584 619494 1250606 3500080 0 25620 3500696"
131
132 follow the "device"-link to the physical device:
133 looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/host0/target0:0:0/0:0:0:0':
134 BUS=="scsi"
135 ID=="0:0:0:0"
136 DRIVER=="sd"
137 SYSFS{device_blocked}=="0"
138 SYSFS{iocounterbits}=="32"
139 SYSFS{iodone_cnt}=="0x1642"
140 SYSFS{ioerr_cnt}=="0x0"
141 SYSFS{iorequest_cnt}=="0x1642"
142 SYSFS{max_sectors}=="240"
143 SYSFS{model}=="L250R0 "
144 SYSFS{queue_depth}=="1"
145 SYSFS{queue_type}=="none"
146 SYSFS{rev}=="BAH4"
147 SYSFS{scsi_level}=="3"
148 SYSFS{state}=="running"
149 SYSFS{timeout}=="30"
150 SYSFS{type}=="0"
151 SYSFS{vendor}=="Maxtor 6"
152
153 looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/host0/target0:0:0':
154 BUS==""
155 ID=="target0:0:0"
156 DRIVER=="unknown"
157
158 looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0/host0':
159 BUS==""
160 ID=="host0"
161 DRIVER=="unknown"
162
163 looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3/1-3:1.0':
164 BUS=="usb"
165 ID=="1-3:1.0"
166 DRIVER=="usb-storage"
167 SYSFS{bAlternateSetting}==" 0"
168 SYSFS{bInterfaceClass}=="08"
169 SYSFS{bInterfaceNumber}=="00"
170 SYSFS{bInterfaceProtocol}=="50"
171 SYSFS{bInterfaceSubClass}=="06"
172 SYSFS{bNumEndpoints}=="02"
173 SYSFS{modalias}=="usb:v067Bp3507d0100dc00dsc00dp00ic08isc06ip50"
174
175 looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3':
176 BUS=="usb"
177 ID=="1-3"
178 DRIVER=="usb"
179 SYSFS{bConfigurationValue}=="1"
180 SYSFS{bDeviceClass}=="00"
181 SYSFS{bDeviceProtocol}=="00"
182 SYSFS{bDeviceSubClass}=="00"
183 SYSFS{bMaxPacketSize0}=="64"
184 SYSFS{bMaxPower}=="100mA"
185 SYSFS{bNumConfigurations}=="1"
186 SYSFS{bNumInterfaces}==" 1"
187 SYSFS{bcdDevice}=="0100"
188 SYSFS{bmAttributes}=="c0"
189 SYSFS{configuration}==""
190 SYSFS{devnum}=="3"
191 SYSFS{idProduct}=="3507"
192 SYSFS{idVendor}=="067b"
193 SYSFS{manufacturer}=="Prolific Technology Inc."
194 SYSFS{maxchild}=="0"
195 SYSFS{product}=="Mass Storage Device"
196 SYSFS{serial}=="0"
197 SYSFS{speed}=="480"
198 SYSFS{version}==" 2.00"
199
200 looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7/usb1':
201 BUS=="usb"
202 ID=="usb1"
203 DRIVER=="usb"
204 SYSFS{bConfigurationValue}=="1"
205 SYSFS{bDeviceClass}=="09"
206 SYSFS{bDeviceProtocol}=="01"
207 SYSFS{bDeviceSubClass}=="00"
208 SYSFS{bMaxPacketSize0}=="8"
209 SYSFS{bMaxPower}==" 0mA"
210 SYSFS{bNumConfigurations}=="1"
211 SYSFS{bNumInterfaces}==" 1"
212 SYSFS{bcdDevice}=="0206"
213 SYSFS{bmAttributes}=="e0"
214 SYSFS{configuration}==""
215 SYSFS{devnum}=="1"
216 SYSFS{idProduct}=="0000"
217 SYSFS{idVendor}=="0000"
218 SYSFS{manufacturer}=="Linux 2.6.13-gentoo-r3 ehci_hcd"
219 SYSFS{maxchild}=="8"
220 SYSFS{product}=="Intel Corporation 82801EB/ER _ICH5/ICH5R_ USB2 EHCI Controller"
221 SYSFS{serial}=="0000:00:1d.7"
222 SYSFS{speed}=="480"
223 SYSFS{version}==" 2.00"
224
225 looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.7':
226 BUS=="pci"
227 ID=="0000:00:1d.7"
228 DRIVER=="ehci_hcd"
229 SYSFS{class}=="0x0c0320"
230 SYSFS{device}=="0x24dd"
231 SYSFS{irq}=="10"
232 SYSFS{local_cpus}=="1"
233 SYSFS{modalias}=="pci:v00008086d000024DDsv00001462sd00007280bc0Csc03i20"
234 SYSFS{subsystem_device}=="0x7280"
235 SYSFS{subsystem_vendor}=="0x1462"
236 SYSFS{vendor}=="0x8086"
237
238 looking at the device chain at '/sys/devices/pci0000:00':
239 BUS==""
240 ID=="pci0000:00"
241 DRIVER=="unknown"
242
243 After plugging the memstick:
244
245 $ udevinfo -a -p $(udevinfo -q path -n /dev/sdb)
246 no record for 'sdb' in database
247 udevinfo: option requires an argument -- p
248 Usage: udevinfo [-anpqrVh]
249 (etc)
250 > Maybe we can sort this out.
251 >
252 > Bye...
253 >
254 > Dirk
255 >
256 Thanks.
257
258
259 Jorge
260 --
261 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] confused udev? Dirk Heinrichs <ext-dirk.heinrichs@×××××.com>
Re: [gentoo-user] confused udev? Richard Fish <bigfish@××××××××××.org>