How to mount an USB memory stick on Beaglebone?

13,371 views
Skip to first unread message

waltert

unread,
May 11, 2012, 9:49:26 AM5/11/12
to beagl...@googlegroups.com
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

Rob Clark

unread,
May 11, 2012, 10:03:02 AM5/11/12
to beagl...@googlegroups.com
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

waltert

unread,
May 11, 2012, 3:03:22 PM5/11/12
to beagl...@googlegroups.com

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

Dan Watts

unread,
May 11, 2012, 6:25:20 PM5/11/12
to beagl...@googlegroups.com
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.


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

Greg Limes

unread,
May 11, 2012, 10:35:48 PM5/11/12
to beagl...@googlegroups.com

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?


waltert

unread,
May 13, 2012, 6:54:46 AM5/13/12
to beagl...@googlegroups.com

Hi Dan,

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

Best regards
Walter

Trey

unread,
May 15, 2012, 8:49:07 PM5/15/12
to beagl...@googlegroups.com
Greg,

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

jstearns74

unread,
May 22, 2012, 6:12:08 PM5/22/12
to beagl...@googlegroups.com
I just tried to mount a USB thumb drive with a newer kernel: 3.2.16 which I downloaded from:



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

Has anyone made any progress on this?

Ross Morrison

unread,
May 23, 2012, 11:16:43 AM5/23/12
to beagl...@googlegroups.com
> 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>
> -- To join: http://beagleboard.org/discuss
> To unsubscribe from this group, send email to:
> beagleboard...@googlegroups.com
> Frequently asked questions: http://beagleboard.org/faq
>

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




David Lambert

unread,
May 23, 2012, 10:54:00 PM5/23/12
to beagl...@googlegroups.com
Same problem with 3.2.16 kernel.

Dan Watts

unread,
May 24, 2012, 10:01:10 AM5/24/12
to beagl...@googlegroups.com
Same problem with the recently released 3.2.18 kernel.  It looks like something changed as of the 3.2.14 kernel.

Dan.

jstearns74

unread,
May 24, 2012, 12:16:04 PM5/24/12
to beagl...@googlegroups.com
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....

Ross Morrison

unread,
Jun 6, 2012, 10:58:35 AM6/6/12
to beagl...@googlegroups.com
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

Koen Kooi

unread,
Jun 6, 2012, 11:28:31 AM6/6/12
to beagl...@googlegroups.com

Op 6 jun. 2012, om 16:58 heeft Ross Morrison het volgende geschreven:

> 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?

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 :(

Gerald Coley

unread,
Jun 6, 2012, 11:39:44 AM6/6/12
to beagl...@googlegroups.com
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
 

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



--
Gerald
 

Ross Morrison

unread,
Jun 6, 2012, 12:07:33 PM6/6/12
to beagl...@googlegroups.com
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

David Lambert

unread,
Jun 6, 2012, 12:12:20 PM6/6/12
to beagl...@googlegroups.com
It seems to work for the Beaglebone if I revert to kernel 3.2.11.

Koen Kooi

unread,
Jun 6, 2012, 1:19:58 PM6/6/12
to beagl...@googlegroups.com

Op 6 jun. 2012, om 18:07 heeft Ross Morrison het volgende geschreven:

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

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

Koen Kooi

unread,
Jun 7, 2012, 3:39:40 AM6/7/12
to beagl...@googlegroups.com

Op 6 jun. 2012, om 16:58 heeft Ross Morrison het volgende geschreven:

> 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?

opkg update ; opkg install kernel-image-3.2.18

That "fixed" usb mass storage for me.

Ross Morrison

unread,
Jun 7, 2012, 10:41:52 AM6/7/12
to beagl...@googlegroups.com
Thanks so much AK, this worked great.

Ross

On 06/06/2012 12:54 PM, Arkadiusz Karas wrote:
Hello,

I managed to solve this issue by enabling 'USB_SUSPEND=y' in kernel configuration. at:                                                                                                                          
Device Drivers
 -> USB support (USB_SUPPORT [=y])                                                                                                              
   -> Support for Host-side USB (USB [=y])
     -> USB runtime power management (autosuspend) and wakeup
    
Anyway, it seams to be really strange dependency somewhere in the code which causes scsi subsystem to not detect usb mass storage.


Best Regards
AK

Arkadiusz Karas

unread,
Jun 8, 2012, 3:07:27 AM6/8/12
to beagl...@googlegroups.com
Hi,

It happens also on TI sources - just disable "USB runtime power management (autosuspend) and wakeup" in kernel configuration and you can see it.

Best Regards
AK





W dniu środa, 6 czerwca 2012 17:39:44 UTC+2 użytkownik Gerald napisał:
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
 

On Wed, Jun 6, 2012 at 10:28 AM, Koen Kooi wrote:

Op 6 jun. 2012, om 16:58 heeft Ross Morrison het volgende geschreven:

> 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?

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 :(

-- To join: http://beagleboard.org/discuss
To unsubscribe from this group, send email to:

Frequently asked questions: http://beagleboard.org/faq

Andrea Pola

unread,
Jan 18, 2014, 9:03:00 AM1/18/14
to beagl...@googlegroups.com


I've the same problem, when i attach an Usb->Serial adapter on the USB Host port my lsusb not recognise it, what have you been for add kernel modules?
It's necessary to rebuild the sd?

Thanks

Il giorno giovedì 29 novembre 2012 01:39:53 UTC+1, AlanD ha scritto:
On Wednesday, June 6, 2012 8:28:31 AM UTC-7, Koen Kooi wrote:

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 :(

This was causing me great hair loss from all of my pulling on it...but I finally figured out this problem, I *believe*.

My problem was in using a 4-port FTDI USB->Serial device which we need on the project I'm working on.

The /dev/ttyUSBx devices were not created, just as this problem, and I tried several things, and I think we just now figured out what the problem was. This thread was very helpful.

By adding "kernel-modules" to the image recipe, the beaglebone is able to create the proper devices, rather than the usbdev1.x entries which do not work.

Interesting that the Angstrom-Cloud9 image that ships on the beaglebone doesn't include kernel-modules, AFAICT, but I couldn't find the recipe exactly. My recipe was copied from systemd-image.bb, and I've added packages from there, so added kernel-modules to my recipe and all is well.

Cheers,
Alan
Reply all
Reply to author
Forward
0 new messages