How to mount an USB memory stick on Beaglebone?

Hi all,

I want to store my logging data on an USB memory stick. But as newcomer, I was not able to mount it.
The 8 GB-stick has one ext2 and one Fat32 partition of 4 GB each. I tried it under Angstroem and Ubuntu
without success. I tried a 1 GB stick as well.

ubuntu@omap:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) 64MB QDI U2 DISK

The device has been detected properly, but it has not been mounted, as it did on my Ubuntu-PC.

ubuntu@omap:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mmcblk0p2 7784044 725892 6667704 10% /
udev 124236 4 124232 1% /dev
tmpfs 50320 176 50144 1% /run
none 5120 0 5120 0% /run/lock
none 125796 0 125796 0% /run/shm
/dev/mmcblk0p1 65390 11134 54256 18% /boot/uboot
ubuntu@omap:~$

This is just my SD-card.
Does the USB-host of BB support memory sticks? In the docu, I read only about Wifi-, Bluetooth-dongles, keyboard,
but not memory sticks.
Or must I install for this a dedicated software?

Any hint is welcome.
Best regards

Walter

If you type 'dmesg' shortly after inserting it you should see something like at the end:

[ 65.687316] usb 2-2.2: new high speed USB device using ehci-omap and address 5
[ 65.813812] usb 2-2.2: New USB device found, idVendor=8564, idProduct=1000
[ 65.821044] usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 65.835174] usb 2-2.2: Product: Mass Storage Device
[ 65.840393] usb 2-2.2: Manufacturer: JetFlash
[ 65.844940] usb 2-2.2: SerialNumber: 867890272
[ 65.856811] scsi0 : usb-storage 2-2.2:1.0
[ 70.868255] scsi 0:0:0:0: Direct-Access JetFlash Transcend 16GB 1.00 PQ: 0 ANSI: 5
[ 70.919067] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 70.938171] sd 0:0:0:0: [sda] 30871552 512-byte logical blocks: (15.8 GB/14.7 GiB)
[ 71.002319] sd 0:0:0:0: [sda] Write Protect is off
[ 71.026702] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
[ 71.026733] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 71.065856] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 71.072113] sda:
[ 71.107055] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 71.132446] sd 0:0:0:0: [sda] Attached SCSI removable disk

My drive is a JetFlash drive. You can see that it has been attached as /dev/sda by the [sda] bit in the last few lines (yours may will be different).

Make somewhere to mount it:
mkdir tempdir

You can then mount it:
mount /dev/sda tempdir

I only have one partition on mine, if you have multiple partitions you should be able you mount /dev/sda1, /dev/sda2 etc.

Rob

Hi Rob,

Many thanks for your hint.
I did it like you have decribed and it works perfectly.

I am surprised, that the info about the stick is hidden in dmesg.
And Ubuntu on the PC mounts the stick automatically. No way to get this comfort on BB?

Best regards

Walter

Walter,

One way of automounting USB drives is to add a udev rule. I believe this is how Ubuntu does it. I think that in the past Ubuntu or Angstrom for the BB included such a rule by default, but I just checked a couple of recent builds and neither of them has it.

You can various examples on this page: https://wiki.archlinux.org/index.php/Udev#Auto_mounting_USB_devices

If you are using a USB drive that is always connected to the BB, then an alternative is to add an entry to /etc/fstab that automatically mounts the drive at boot time, like

/dev/sda1 /media/disk1 vfat auto,umask=0 0 0

Dan

You can various examples on this page: https://wiki.archlinux.org/index.php/Udev#Auto_mounting_USB_devices

So, I’ve been working with an Angstrom image that refuses to mount my thumb drive;
the kernel sees the drive, but doesn’t make any /dev/sd* entries.

Here’s the dmesg:

[169469.679812] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[169469.823073] usb 1-1: New USB device found, idVendor=13fe, idProduct=3100
[169469.823123] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[169469.823158] usb 1-1: Product: Patriot Memory
[169469.823184] usb 1-1: Manufacturer:
[169469.823210] usb 1-1: SerialNumber: 07B31D01590167E5
[169469.830216] scsi1 : usb-storage 1-1:1.0

Entries added in /dev:

crw-rw-r-- 1 root root 189, 2 May 12 02:24 /dev/bus/usb/001/003
lrwxrwxrwx 1 root root 12 May 12 02:24 /dev/char/189:2 → …/usbdev1.3
crw------- 1 root root 189, 2 May 12 02:24 /dev/usbdev1.3

I’m assuming usb-storage should have been responsible for taking the next
step and generating the block device …

I’m pretty sure this is Angstrom-Cloud9-*-v2012.05-beaglebone-2012.04.22.img,
no extra stuff crammed into (or ripped out of) the kernel from my direction …

beaglebone# uname -a
Linux beaglebone 3.2.14 #1 Sat Apr 21 10:00:05 CEST 2012 armv7l GNU/Linux
beaglebone#

Any suggestions?

Hi Dan,

Many thanks for your advice. I will try to follow the description of your wiki-link.

Best regards
Walter

Greg,

Did you ever get this issue resolved? I am having exactly the same problem.

I just tried to mount a USB thumb drive with a newer kernel: 3.2.16 which I downloaded from:

http://downloads.angstrom-distribution.org/demo/beaglebone/

(I downloaded & installed: Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.05-beaglebone-2012.05.09.img.xz )

I get the same results as with 3.2.14 - there is no sda entries…

Has anyone made any progress on this?

I just tried to mount a USB thumb drive with a newer kernel: 3.2.16 which
I
downloaded from:

http://downloads.angstrom-distribution.org/demo/beaglebone/

(I downloaded & installed:
Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.05-beaglebone-2012.05.09.img.xz<http://downloads.angstrom-distribution.org/demo/beaglebone/Angstrom-Cloud9-IDE-GNOME-eglibc-ipk-v2012.05-beaglebone-2012.05.09.img.xz&gt;
)

I get the same results as with 3.2.14 - there is no sda entries...

Has anyone made any progress on this?

Greg,

Did you ever get this issue resolved? I am having exactly the same
problem.

You can various examples on this page:
udev - ArchWiki

So, I've been working with an Angstrom image that refuses to mount my
thumb drive;
the kernel sees the drive, but doesn't make any /dev/sd* entries.

Here's the dmesg:

[169469.679812] usb 1-1: new high-speed USB device number 3 using
musb-hdrc
[169469.823073] usb 1-1: New USB device found, idVendor=13fe,
idProduct=3100
[169469.823123] usb 1-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[169469.823158] usb 1-1: Product: Patriot Memory
[169469.823184] usb 1-1: Manufacturer:
[169469.823210] usb 1-1: SerialNumber: 07B31D01590167E5
[169469.830216] scsi1 : usb-storage 1-1:1.0

Entries added in /dev:

crw-rw-r-- 1 root root 189, 2 May 12 02:24 /dev/bus/usb/001/003
lrwxrwxrwx 1 root root 12 May 12 02:24 /dev/char/189:2 ->
../usbdev1.3
crw------- 1 root root 189, 2 May 12 02:24 /dev/usbdev1.3

I'm assuming usb-storage should have been responsible for taking the
next
step and generating the block device ...

I'm pretty sure this is
Angstrom-Cloud9-*-v2012.05-beaglebone-2012.04.22.img,
no extra stuff crammed into (or ripped out of) the kernel from my
direction ...

beaglebone# uname -a
Linux beaglebone 3.2.14 #1 Sat Apr 21 10:00:05 CEST 2012 armv7l
GNU/Linux
beaglebone#

Any suggestions?

Walter,

One way of automounting USB drives is to add a udev rule. I believe
this is how Ubuntu does it. I *think* that in the past Ubuntu or
Angstrom
for the BB included such a rule by default, but I just checked a
couple of
recent builds and neither of them has it.

You can various examples on this page:
udev - ArchWiki

If you are using a USB drive that is always connected to the BB, then
an
alternative is to add an entry to /etc/fstab that automatically mounts
the
drive at boot time, like

/dev/sda1 /media/disk1 vfat auto,umask=0 0 0

Dan

Hi Rob,

Many thanks for your hint.
I did it like you have decribed and it works perfectly.

I am surprised, that the info about the stick is hidden in dmesg.
And Ubuntu on the PC mounts the stick automatically. No way to get
this
comfort on BB?

Best regards

Walter

Walter,

One way of automounting USB drives is to add a udev rule. I believe
this is how Ubuntu does it. I *think* that in the past Ubuntu or
Angstrom
for the BB included such a rule by default, but I just checked a
couple of
recent builds and neither of them has it.

You can various examples on this page:
udev - ArchWiki

If you are using a USB drive that is always connected to the BB, then
an
alternative is to add an entry to /etc/fstab that automatically mounts
the
drive at boot time, like

/dev/sda1 /media/disk1 vfat auto,umask=0 0 0

Dan

Hi Rob,

Many thanks for your hint.
I did it like you have decribed and it works perfectly.

I am surprised, that the info about the stick is hidden in dmesg.
And Ubuntu on the PC mounts the stick automatically. No way to get
this
comfort on BB?

Best regards

Walter

-- To join: http://beagleboard.org/discuss
To unsubscribe from this group, send email to:
beagleboard+unsubscribe@googlegroups.com
Frequently asked questions: Frequently Asked Questions - BeagleBoard

I also am having this same problem. Just built an Angstrom 3.2.16 kernel
for my Beagleboard xM and the flash drive mounts as expected, but the
kernel (3.2.16) for the Beaglebone does not work.

I've tried the udev rules discussed above, but no changes on the bone.
Still doesn't work.

This is the extent of the console message when the flash drive is inserted
on the bone:

[ 284.483367] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[ 284.628479] usb 1-1: New USB device found, idVendor=13fe, idProduct=3623
[ 284.635498] usb 1-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[ 284.642944] usb 1-1: Product: USB DISK Pro
[ 284.647247] usb 1-1: Manufacturer:
[ 284.651611] usb 1-1: SerialNumber: 07AA0C0886E80C31
[ 284.658843] scsi1 : usb-storage 1-1:1.0

Here is the console message from the same unit using Angstrom 3.2.0+:

[ 60.230206] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[ 60.375260] usb 1-1: New USB device found, idVendor=13fe, idProduct=3623
[ 60.382293] usb 1-1: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[ 60.389736] usb 1-1: Product: USB DISK Pro
[ 60.394022] usb 1-1: Manufacturer:
[ 60.398386] usb 1-1: SerialNumber: 07AA0C0886E80C31
[ 60.405583] scsi0 : usb-storage 1-1:1.0
[ 61.440431] scsi 0:0:0:0: Direct-Access USB DISK Pro
PMAP PS
[ 61.455853] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 62.972304] sd 0:0:0:0: [sda] 31246336 512-byte logical blocks: (15.9
GB/14.)
[ 62.981806] sd 0:0:0:0: [sda] Write Protect is off
[ 62.987051] sd 0:0:0:0: [sda] No Caching mode page present
[ 62.992832] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 63.003027] sd 0:0:0:0: [sda] No Caching mode page present
[ 63.008768] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 63.040487] sda: sda1
[ 64.571768] sd 0:0:0:0: [sda] No Caching mode page present
[ 64.577504] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 64.583903] sd 0:0:0:0: [sda] Attached SCSI removable disk

All works fine with that kernel.

Thanks for any insight.

Ross

Same problem with 3.2.16 kernel.

Same problem with the recently released 3.2.18 kernel. It looks like something changed as of the 3.2.14 kernel.

Dan.

For what its worth, yesterday (5/23/12) there was some discussion on the IRC channel about this problem and I think that it is going to be fixed in the next release. Stay tuned…

I just built (6/5/12 18:00 PDT) a fresh Angstrom Beaglebone systemd-image which generated a 3.2.18 kernel and this problem still exists. Is there an existing fix, or will a future update resolve this issue?

Thanks,
Ross

We're waiting on TI to fix this problem. Till that happens, no fix available. It sucks, but not anything we can do about it :frowning:

The issue is not present on TI internal builds. So we are trying to figure out what the differences are and get Angstrom fixed.

Gerald

It is not present if one builds for the Beagleboard either. So it seems to be isolated to the Beaglebone builds.

Thanks to everyone for their continued efforts,
Ross

It seems to work for the Beaglebone if I revert to kernel 3.2.11.

beagleboard and beaglebone use completely different cpus and kernels, so any comparison between the 2 is stupid

opkg update ; opkg install kernel-image-3.2.18

That "fixed" usb mass storage for me.

Thanks so much AK, this worked great.

Ross