From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1M8fdd-00053q-17 for garchives@archives.gentoo.org; Mon, 25 May 2009 19:15:09 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 617F6E0046; Mon, 25 May 2009 19:15:07 +0000 (UTC) Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by pigeon.gentoo.org (Postfix) with ESMTP id ED371E0046 for ; Mon, 25 May 2009 19:15:06 +0000 (UTC) Received: by ewy9 with SMTP id 9so3019462ewy.34 for ; Mon, 25 May 2009 12:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=UZWC0/NLTpgefbLrwbmD4sXxy/QBxylGQURki/tgFHk=; b=NQvhjKbawm5KxaSLn40UhnK7scsi13TVfe8zahleYPmrojtLkr+HWYNC6P1ASda0cW a+wIltlaZj3h4zlToG7u2kET79tbVrurQW2UdgcRpCp2DZOlo++jG38SAGAB/4bxKGEY 1x0mW0Ac4b6DXcHhqavrtK7K6fKrBeu2go+XE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=hqcjNKFUEiUpd2Pi4Yi3/BofUFv7PmuLdZwpjqIaEBqW+29jmO8YRj5ticag3XSPY6 T8IgPnBexKN8C7r6zJIjgxu9JbyMIG109qzq5/wcUP03BHhZDzRdvMIndaJ8EU2m+X7o +Maup8gRlztWjWl8AYMtzkjbkh3ZuVTladdS4= Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.216.45.78 with SMTP id o56mr2122562web.152.1243278906283; Mon, 25 May 2009 12:15:06 -0700 (PDT) Date: Mon, 25 May 2009 22:15:06 +0300 Message-ID: <7c65e4a70905251215t7c1183fg31f48f134d4732e6@mail.gmail.com> Subject: [gentoo-user] UDEV From: =?UTF-8?B?0JDQu9GM0YTQsNGA?= To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=0016367b6de690d61a046ac16de1 X-Archives-Salt: f3bf98e5-5378-49d5-8f92-7c2a168661e1 X-Archives-Hash: 47393e1bc5c18c6b4fbe5d10183f4c8a --0016367b6de690d61a046ac16de1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Bus 003 Device 010: ID 152d:2338 Device Descriptor: ... idVendor 0x152d idProduct 0x2338 bcdDevice 1.00 iManufacturer 1 iProduct 2 iSerial 5 bNumConfigurations 1 Shared with Flock - The Social Web Browser http://flock.com lsusb =E2=80=93v Shared with Flock - The Social Web Browser http://flock.com 2009/5/25 Mark Knecht > Hi, > I'm wondering what I need to read about and do to get a USB drive > to auto-mount reliably at boot time? I don't know anything about udev > so I tried what I thought used to work in my /etc/fstab file but it > doesn't work. The drive mounts by hand just fine: > > MacMini linux # cat /etc/fstab | grep video > /dev/sda1 /video ext3 auto,rw 0= 2 > MacMini linux # df > Filesystem 1K-blocks Used Available Use% Mounted on > /dev/hda4 75890040 60601600 11433376 85% / > udev 10240 164 10076 2% /dev > shm 257396 0 257396 0% /dev/shm > MacMini linux # mount /dev/sda1 /video > MacMini linux # df > Filesystem 1K-blocks Used Available Use% Mounted on > /dev/hda4 75890040 60601604 11433372 85% / > udev 10240 164 10076 2% /dev > shm 257396 0 257396 0% /dev/shm > /dev/sda1 157566568 192068 149370520 1% /video > MacMini linux # > > Must I use udev (and if so how - what do I study to make this work) > or can I do this in fstab and I've just forgotten something simple? > > Also, what's the feeling these days about the reliability of > automounting by device? Would I be better to use e2label on the > partition? > > Thanks in advance, > Mark run *lsusb =E2=80=93v* you will see somethin like this *Bus 003 Device 010: ID 152d:2338* *Device Descriptor:* *...dVendor 0x152d* * idProduct 0x2338* * bcdDevice 1.00* * **iManufacturer 1* * iProduct 2* * iSerial 5* * bNumConfigurations 1* Now make file /etc/udev/rule.d/z98-usb-flash.rules with this content *SUBSYSTEM**=3D=3D"block**", SYSFS**{idProduct**}=3D=3D"2338", SYSFS**{idVendor**}=3D=3D"152d**", NAME**=3D"name**" **RUN+=3D"/bin/mount /dev/name /media/name"* * Change idProduct and idVendor and to your data. And name too. With this name your device will apear in /dev. And of course mkfir /media/name * ** --0016367b6de690d61a046ac16de1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Bus 003 Device 010: ID 152d:2338

Device Descriptor:

...

idVendor 0x152d

idProduct 0x2338

bcdDevice 1.00

iManufacturer 1

iProduct 2

iSerial 5

bNumConfigurations 1

Shared with Flock - The Social Web B= rowser
http://flock.com
lsusb =E2=80= =93v

Shared with Flock - The Social Web Browser
http://flock.com


2009/5/25 Mark Knecht = <markknecht@gmail.com>
Hi,
=C2=A0 I'm wondering what I need to read about and do to get a USB dri= ve
to auto-mount reliably at boot time? I don't know anything about udev so I tried what I thought used to work in my /etc/fstab file but it
doesn't work. The drive mounts by hand just fine:

MacMini linux # cat /etc/fstab | grep video
/dev/sda1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /video =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0ext3 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0au= to,rw =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 2
MacMini linux # df
Filesystem =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1K-blocks =C2=A0 =C2=A0 =C2= =A0Used Available Use% Mounted on
/dev/hda4 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 75890040 =C2=A060601600= =C2=A011433376 =C2=A085% /
udev =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = 10240 =C2=A0 =C2=A0 =C2=A0 164 =C2=A0 =C2=A0 10076 =C2=A0 2% /dev
shm =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2= 57396 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0257396 =C2=A0 0% /dev/shm<= br> MacMini linux # mount /dev/sda1 /video
MacMini linux # df
Filesystem =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1K-blocks =C2=A0 =C2=A0 =C2= =A0Used Available Use% Mounted on
/dev/hda4 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 75890040 =C2=A060601604= =C2=A011433372 =C2=A085% /
udev =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = 10240 =C2=A0 =C2=A0 =C2=A0 164 =C2=A0 =C2=A0 10076 =C2=A0 2% /dev
shm =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2= 57396 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0257396 =C2=A0 0% /dev/shm<= br> /dev/sda1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0157566568 =C2=A0 =C2=A01= 92068 149370520 =C2=A0 1% /video
MacMini linux #

=C2=A0 Must I use udev (and if so how - what do I study to make this work)=
or can I do this in fstab and I've just forgotten something simple?

=C2=A0 Also, what's the feeling these days about the reliability of automounting by device? Would I be better to use e2label on the
partition?

Thanks in advance,
Mark




run lsusb =E2=80=93v

y= ou will see somethin like this

Bus 003 De= vice 010: ID 152d:2338

Device Descriptor:

...dVendor=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 0x152d

= =C2=A0 idProduct=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 0x2338

=C2=A0 bcdDevice=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1.00<= /p>

=C2=A0 iManufac= turer=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1

=C2=A0 iProduct=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2

=C2=A0 iSerial=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 5

<= em>=C2=A0 bNumConfigurations=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 1

Now make file /etc/udev/rule.d/z98-usb-flash.rules with this content
SUBSYSTEM=3D=3D"block"= , SYSFS{idProduct}=3D=3D"2= 338", SYSFS{idVendor}=3D= =3D"152d", NAME=3D&qu= ot;name" RUN+=3D"/bin= /mount /dev/name /media/name"

Change idProduct and idVendor and to your data. And name too.= With this name your device will apear in /dev. And of course mkfir /media/= name


--0016367b6de690d61a046ac16de1--