From: Marc Wilson on
On Mon, Feb 06, 2006 at 08:45:58PM -0800, Rob Blomquist wrote:

<deleted>

> Nothing here leads me to believe this is how the automounting happens. I also
> looked at my Ubuntu udev scripts and rules and saw nothing there.

No one told you that this was how the device got mounted. These are the
udev rules that create the sd* devices.

--
Marc Wilson | Don't marry for money; you can borrow it cheaper.
msw(a)cox.net | -- Scottish Proverb


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Andrew Sackville-West on
On Mon, 6 Feb 2006 20:45:58 -0800
Rob Blomquist <rob.blomquist(a)verizon.net> wrote:

> On Monday 06 February 2006 9:58 am, Andrew Sackville-West so eloquently
> stated:
>
> > Now, I am not sure which of these would be used for a flash drive, but I
> > can tell that a few won't be....
>
> look in /etc/udev/rules.d/050_hal* and see what that says. That is the rule
> that creates sd* devices.
>
> OK, in /etc/udev/hal.rules:
> # put removable IDE/SCSI devices into the hal group instead of 'disk'
> BUS="scsi",KERNEL="sd[a-z]*", PROGRAM="/etc/udev/scripts/device-removable.sh
> %k", RESULT="1", NAME="%k", MODE="0640", GROUP="hal"
> # BUS="ide", KERNEL="hd[a-z]*", PROGRAM="/etc/udev/scripts/device-removable.sh
> %k", RESULT="1", NAME="%k", MODE="0640", GROUP="hal"
> BUS="usb", KERNEL="ub[a-z]*", NAME="%k", MODE="0640", GROUP="hal"
>
> In /etc/udev/rules.d/:
> I have no 050_hal* files. I have a file called z_hal-plugdev.rules:
> # put removable IDE/SCSI devices into the hal group instead of 'disk'
> BUS="scsi",KERNEL="sd[a-z]*", PROGRAM="/etc/udev/scripts/device-removable.sh
> %k", RESULT="1", NAME="%k", MODE="0640", GROUP="hal"
> # BUS="ide", KERNEL="hd[a-z]*", PROGRAM="/etc/udev/scripts/device-removable.sh
> %k", RESULT="1", NAME="%k", MODE="0640", GROUP="hal"
> BUS="usb", KERNEL="ub[a-z]*", NAME="%k", MODE="0640", GROUP="hal"
>
> Since they point to /etc/udev/scripts/device-removable.sh:
> #!/bin/sh -e
> # print "1" if device $1 is either removable, on the ieee1394 or on the usb
> bus,
> # and "0" otherwise.
>
> check_bus() {
> # check if the DEVICE is on the given bus
> # This is done by checking if any of the devices on the bus is a prefix
> # of the device
> BUSDEVP="/sys/bus/$1/devices"
> for x in $BUSDEVP/*; do
> [ -L "$x" ] || continue
> if echo "$DEVICE" | grep -q "^$(readlink -f $x)"; then
> return 0
> fi
> done
> return 1
> }
>
> DEV="${1%[0-9]*}"
> BLOCKPATH="/sys/block/$DEV"
>
> if [ ! -d "${BLOCKPATH}" ]; then
> exit 1
> fi
>
> REMOVABLE="${BLOCKPATH}/removable"
> DEVICE="$(readlink -f "${BLOCKPATH}/device")"
> IS_REMOVABLE="0"
>
> if [ -e "$REMOVABLE" ]; then
> IS_REMOVABLE="$(cat $REMOVABLE)"
> fi
>
> if [ "$IS_REMOVABLE" = "1" ] || check_bus "usb" || check_bus "ieee1394" ; then
> echo 1
> else
> echo 0
> fi
> exit 0
>
>
> Nothing here leads me to believe this is how the automounting happens. I also
> looked at my Ubuntu udev scripts and rules and saw nothing there.
>
> Can someone enlighten me otherwise?

Rod, we have two issues here and the first (can't mount) needs to be solved before the second (automount). The second depends on the first. If you can't mount the flash drive manually, you certainly can't mount it automatically.

So:

We've got the output from your dmesg and we know that mount -t vfat /dev/sdb1... fails. What we don't know is whether udev is creating /dev/sdb1 for you when you insert the flashcard. Please check that: ls -l /dev | grep sdb should provide the relevant output.

I am assuming that udev is not providing this device. Frankly this doesn't make sense to me as mine works just fine without any special rules. But, systems are different. Based on my assumption above, you need to write a special udev rule for this card. incidentally, this will give you the oppportunity to give it a persistent name as well, such as /dev/flash or whatever. Once this problem is solved, and it mounts manually, you can look at the variety of automatic mounting solutions.
check this for udev rules: http://www.reactivated.net/writing_udev_rules.html

A
>
> Rob
>
> --
> Mountlake Terrace, WA, USA
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian..org
>
From: John W. M. Stevens on
On Mon, Feb 06, 2006 at 08:45:58PM -0800, Rob Blomquist wrote:
> On Monday 06 February 2006 9:58 am, Andrew Sackville-West so eloquently
> stated:
>
> > Now, I am not sure which of these would be used for a flash drive, but I
> > can tell that a few won't be....
>
> look in /etc/udev/rules.d/050_hal* and see what that says. That is the rule
> that creates sd* devices.

Excuse me, but we are jumping the gun here. First, let's rule out
other problems.

I didn't see any email that indicates that you looked in /dev and
did, or did not, find a device special file for your device.

If you didn't find one, that's OK, because you can simply create
one.

After creating it, try mounting your device. If that works, then
we know that everything else is fine, it's just your udev configuration
that needs to be debugged.

> Nothing here leads me to believe this is how the automounting happens. I also
> looked at my Ubuntu udev scripts and rules and saw nothing there.

Udev doesn't do automounting, it does automatic device special file
creation.

If you look in /dev and don't see your device special file, udev may
be the problem, but if you do look, and see it, then maybe something
else is wrong.

> Can someone enlighten me otherwise?

You need to post the contents of the /proc files I asked for.

When you dump what USB sees, you should see something like:

T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=03f0 ProdID=4002 Rev= 0.01
S: Manufacturer=HEWLETT-PACKARD
S: Product=HP PhotoSmart 935
S: SerialNumber=ZPP300000880
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 10mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 2 Ivl=255ms

The above indicates that there is a HP Photosmart 936 camera, in mass
storage mode, attached. Looking at this info I know that this is
a Bulk Only protocol device, that uses SCSI, so the SCSI sub-system
should be in play. I can check that by looking at what is in the
/proc/scsi directories.

Poke around in your USB and SCSI /proc directories, let us know what
you find.

John S.
From: Ken Walker on
Please correct me if i'm wrong but isn't the answer right there in the very
first posting.

Feb 5 13:16:31 localhost kernel: Attached scsi removable disk sdb at scsi6

It's saying the device is scsi6

so shouldn't it be

mount -t vfat /dev/scsi6 /media/flash


?

:o)

> -----Original Message-----
> From: debian-user-request(a)lists.debian.org
> [mailto:debian-user-request(a)lists.debian.org]On Behalf Of John W. M.
> Stevens
> Sent: 07 February 2006 7:11pm
> To: Rob Blomquist
> Cc: debian-user(a)lists.debian.org
> Subject: Re: USB flash drive not automounting or mounting
>
>
> On Mon, Feb 06, 2006 at 08:45:58PM -0800, Rob Blomquist wrote:
> > On Monday 06 February 2006 9:58 am, Andrew Sackville-West
> so eloquently
> > stated:
> >
> > > Now, I am not sure which of these would be used for a
> flash drive, but I
> > > can tell that a few won't be....
> >
> > look in /etc/udev/rules.d/050_hal* and see what that says.
> That is the rule
> > that creates sd* devices.
>
> Excuse me, but we are jumping the gun here. First, let's rule out
> other problems.
>
> I didn't see any email that indicates that you looked in /dev and
> did, or did not, find a device special file for your device.
>
> If you didn't find one, that's OK, because you can simply create
> one.
>
> After creating it, try mounting your device. If that works, then
> we know that everything else is fine, it's just your udev
> configuration
> that needs to be debugged.
>
> > Nothing here leads me to believe this is how the
> automounting happens. I also
> > looked at my Ubuntu udev scripts and rules and saw nothing there.
>
> Udev doesn't do automounting, it does automatic device special file
> creation.
>
> If you look in /dev and don't see your device special file, udev may
> be the problem, but if you do look, and see it, then maybe something
> else is wrong.
>
> > Can someone enlighten me otherwise?
>
> You need to post the contents of the /proc files I asked for.
>
> When you dump what USB sees, you should see something like:
>
> T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
> D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
> P: Vendor=03f0 ProdID=4002 Rev= 0.01
> S: Manufacturer=HEWLETT-PACKARD
> S: Product=HP PhotoSmart 935
> S: SerialNumber=ZPP300000880
> C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 10mA
> I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50
> Driver=usb-storage
> E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
> E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
> E: Ad=83(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
>
> The above indicates that there is a HP Photosmart 936 camera, in mass
> storage mode, attached. Looking at this info I know that this is
> a Bulk Only protocol device, that uses SCSI, so the SCSI sub-system
> should be in play. I can check that by looking at what is in the
> /proc/scsi directories.
>
> Poke around in your USB and SCSI /proc directories, let us know what
> you find.
>
> John S.
>


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org