PDA


View Full Version : Linux (Maybe OSX) USB Mass Storage How-to


mobile619
01-06-2007, 03:52 PM
I read in this forum that some people were having problems with the Sanyo M1 while using it has a USB Mass Storage Device with Mac OSX.

I had some problems while using it with Ubuntu 6.10 and it might be the same problems so I decided to post my fix.

When I try to umount (eject) the Sanyo M1, it fails and none of the files are written to the phone.

Possible FIX for Ubuntu 6.10:
1. Plug phone in and put in Mass Storage mode
2. Wait for phone to be auto-mounted (My phone is mounted at /media/usbdisk)
3. Open terminal
4. Determine hardware location of phone in /dev/ folder typically (/dev/sda1) do this by running 'cat /etc/mtab' You should see something like this at the end of the file
/dev/sda1 /media/usbdisk vfat rw,nosuid,nodev,quiet,shortname=mixed,uid=1000,gid =1000,umask=077,iocharset=utf8 0 0
5. Umount (eject) the phone.
$ sudo umount /media/usbdisk
6. Re-mount phone with new options
$ sudo mount -t vfat -o uid=1000,gid=1000,umask=077,nosuid,sync /dev/sda1 /media/usbdisk

I think the 'sync' option is the key. And remember to replace '/dev/sda1' and '/media/usbdisk' with the values determined in previous steps.

I am also trying to find a way to change the defaults options to include the sync option.

I hope this helps.

mobile619
01-06-2007, 04:21 PM
WARNING: the sync option may shorten the life of a flash drive

From the mount man pages
sync
All I/O to the file system should be done synchronously. In case of media with limited number of write cycles (e.g. some flash drives) "sync" may cause life-cycle shortening.

mobile619
01-06-2007, 04:52 PM
Ok, I think I've determined a more permanent fix.

1. Open terminal
2. Edit HAL config file
sudo gedit /usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi
3. Scroll down until you reach the section below:
<!-- Attempt mount point 'ipod' for iPod's -->
<match key="@block.storage_device:portable_audio_player.type" string="ipod">
<merge key="volume.policy.desired_mount_point" type="string">ipod</merge>
</match>
4. Copy and paste the following text just below the ipod section

<!-- Attempt mount point 'sanyo_m1' for Sanyo -->
<match key="block.storage_device" string="/org/freedesktop/Hal/devices/storage_serial_Sanyo_Mass_Storage_000000000003">
<merge key="volume.policy.desired_mount_point" type="string">sanyo_m1</merge>
<merge key="volume.policy.mount_option.sync" type="bool">true</merge>
</match>

 
SprintUsers.com was created in January 2002 as a resource for users of Sprint PCS products and services to learn about and share information. We have cll phone reviews, Cellular Accessories, Downloads, PDA reviews, Ringtones, all of the latest Sprint PCS news and information, an area where you can find help in creating a ring tone or custom image for you phone, and so much more. The most popular section is the message board where visitors can read and write messages, ask questions, and get advice about their cellular phone from other users.