New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Mount USB stick under /home/storage/usb/ ?

Got problems with Bubba? Then this forum is for you.
Locked
roel
Posts: 6
Joined: 12 Oct 2007, 05:46

Mount USB stick under /home/storage/usb/ ?

Post by roel »

Hi,

I am playing around with my new bubba (pictures forthcoming :-), and I was wondering if I can make Bubba automatically mount a usb stick at /home/storage/usb/ ?

I tried the following:
First I inserted the usb stick in Bubba's usb port, and found this after running 'dmesg' in a terminal:
usb 1-1: new full speed USB device using at91_ohci and address 2
usb 1-1: configuration #1 chosen from 2 choices
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
Vendor: Apple Model: iPod Rev: 2.70
Type: Direct-Access ANSI SCSI revision: 04
SCSI device sda: 2031872 512-byte hdwr sectors (1040 MB)
sda: Write Protect is off
sda: Mode Sense: 64 00 00 08
sda: assuming drive cache: write through
SCSI device sda: 2031872 512-byte hdwr sectors (1040 MB)
sda: Write Protect is off
sda: Mode Sense: 64 00 00 08
sda: assuming drive cache: write through
sda: sda1
sd 0:0:0:0: Attached scsi removable disk sda
usb-storage: device scan complete
So I did a 'mount -t vfat /dev/sda1 /home/storage/usb' and tried to copy some files from bubba to the usb stick. However, that didn't work. I got an error that I couldn't write to it. :( Does anyone have a clue how I can fix this?

Another question: can I automatically make Bubba mount the usb stick once I have inserted it?

Thanks in advance, fellow Bubba's! :)
pa
Posts: 308
Joined: 06 Dec 2006, 04:38
Location: Sweden
Contact:

Post by pa »

Can you check persmissions? Did you try to copy the files as root or a a standard user?

/PA
roel
Posts: 6
Joined: 12 Oct 2007, 05:46

Post by roel »

pa wrote:Can you check persmissions? Did you try to copy the files as root or a a standard user?

/PA


Actually, I tried it both as root and normal user. It didn't work. So I guess I did something wrong along the way...
tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor »

roel,

Does the mount command work? You can list contents of the usb-memory? Could you provide the output of the commands,

Code: Select all

ls -ld /home/storage
and

Code: Select all

cat /proc/mounts
When you have the stick mounted.

And regarding automount of attached usb storage devices. That sure is possible see http://usbmount.alioth.debian.org/ fx.

/Tor
Co-founder OpenProducts and Ex Excito Developer
roel
Posts: 6
Joined: 12 Oct 2007, 05:46

Post by roel »

hi tor,

Thanks for the reply. :)
Yes, the mount command works (at least, there is not output so I guess it works). After mounting the usb sticjk like described above, this is the output you asked for for both commands:

Code: Select all

bubba:/home/roel# ls -ld /home/storage/
drwxrwxrwx  6 1008 users 4096 Oct 12 10:56 /home/storage/
bubba:/home/roel# ls -ld /home/storage/usb/
drwxr-xr-x  2 root root 8192 Jan  1  1970 /home/storage/usb/ 

Code: Select all

bubba:/home/roel# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,noatime,data=ordered 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/root /dev/.static/dev ext3 rw,data=ordered 0 0
tmpfs /dev tmpfs rw 0 0
devpts /dev/pts devpts rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
/dev/root /home/storage ext3 rw,noatime,data=ordered 0 0
/dev/root /home/web ext3 rw,noatime,data=ordered 0 0
/dev/sda1 /home/storage/usb vfat rw,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1 0 0 
Thanks!
Locked