Gentoo Archives: gentoo-user

From: "Альфар" <slaughterofshudras@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] UDEV
Date: Mon, 25 May 2009 19:15:09
Message-Id: 7c65e4a70905251215t7c1183fg31f48f134d4732e6@mail.gmail.com
1 Bus 003 Device 010: ID 152d:2338
2
3 Device Descriptor:
4
5 ...
6
7 idVendor 0x152d
8
9 idProduct 0x2338
10
11 bcdDevice 1.00
12
13 iManufacturer 1
14
15 iProduct 2
16
17 iSerial 5
18
19 bNumConfigurations 1
20
21 Shared with Flock - The Social Web Browser
22 http://flock.com
23 lsusb –v
24
25 Shared with Flock - The Social Web Browser
26 http://flock.com
27
28
29 2009/5/25 Mark Knecht <markknecht@×××××.com>
30
31 > Hi,
32 > I'm wondering what I need to read about and do to get a USB drive
33 > to auto-mount reliably at boot time? I don't know anything about udev
34 > so I tried what I thought used to work in my /etc/fstab file but it
35 > doesn't work. The drive mounts by hand just fine:
36 >
37 > MacMini linux # cat /etc/fstab | grep video
38 > /dev/sda1 /video ext3 auto,rw 0 2
39 > MacMini linux # df
40 > Filesystem 1K-blocks Used Available Use% Mounted on
41 > /dev/hda4 75890040 60601600 11433376 85% /
42 > udev 10240 164 10076 2% /dev
43 > shm 257396 0 257396 0% /dev/shm
44 > MacMini linux # mount /dev/sda1 /video
45 > MacMini linux # df
46 > Filesystem 1K-blocks Used Available Use% Mounted on
47 > /dev/hda4 75890040 60601604 11433372 85% /
48 > udev 10240 164 10076 2% /dev
49 > shm 257396 0 257396 0% /dev/shm
50 > /dev/sda1 157566568 192068 149370520 1% /video
51 > MacMini linux #
52 >
53 > Must I use udev (and if so how - what do I study to make this work)
54 > or can I do this in fstab and I've just forgotten something simple?
55 >
56 > Also, what's the feeling these days about the reliability of
57 > automounting by device? Would I be better to use e2label on the
58 > partition?
59 >
60 > Thanks in advance,
61 > Mark
62
63
64
65
66
67 run *lsusb –v*
68
69 you will see somethin like this
70
71 *Bus 003 Device 010: ID 152d:2338*
72
73 *Device Descriptor:*
74
75 *...dVendor 0x152d*
76
77 * idProduct 0x2338*
78
79 * bcdDevice 1.00*
80
81 * **iManufacturer 1*
82
83 * iProduct 2*
84
85 * iSerial 5*
86
87 * bNumConfigurations 1*
88 Now make file /etc/udev/rule.d/z98-usb-flash.rules with this content
89
90 *SUBSYSTEM**=="block**", SYSFS**{idProduct**}=="2338",
91 SYSFS**{idVendor**}=="152d**", NAME**="name**" **RUN+="/bin/mount
92 /dev/name /media/name"*
93 *
94 Change idProduct and idVendor and to your data. And name too. With
95 this name your device will apear in /dev. And of course mkfir
96 /media/name
97 *
98
99
100 **