Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
keraba
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 9
Join Date: Nov 2008
Default mount via USB on Linux ?

I'm trying to mount my G1 via USB and can't seem to. When I plug it in, I see this in /var/log/messages:

Nov 17 05:20:03 flatcoat kernel: [112494.982744] usb 2-1: new full speed USB device using ohci_hcd and address 3
Nov 17 05:20:03 flatcoat kernel: [112495.210830] usb 2-1: configuration #1 chosen from 1 choice
Nov 17 05:20:04 flatcoat kernel: [112495.233817] scsi3 : SCSI emulation for USB Mass Storage devices

Then every few seconds, it prints:

Nov 17 05:20:14 flatcoat kernel: [112505.906093] usb 2-1: reset full speed USB device using ohci_hcd and address 3

Finally it prints:

Nov 17 05:20:52 flatcoat kernel: [112543.758318] scsi 3:0:0:0: Device offlined - not ready after error recovery

I see the notification on the G1, and tell it that I want to mount. (Does this mount something ? Or let it be mounted ?)

In any case, as I'm entering:

mount /dev/sdb1 /mnt

I get:

mount: special device /dev/sdb1 does not exist

I've also tried sdb2... and sdc1...

Any suggestions ?
 
jashsu
Old
#2  
jashsu's Avatar
Senior Member
Thanks Meter 4
Posts: 1,845
Join Date: Nov 2008
Until you activate the mount option on the G1, it will not expose any USB Mass Storage devices to the host. Try connecting G1 to your pc, activate mount on G1, then run dmesg on pc to see what name the device has been assigned.
 
quedijo
Old
#3  
Member
Thanks Meter 0
Posts: 80
Join Date: Jul 2007
What flavor of Linux are you runing?
What exactly are you trying to mount? The SD card or the phone?
Do you even know what the mount option on the G1 does?
Do you have USB Debbugin enabled?

If you can't answer some of these questions, I would recomend (and in no means am I trying to bash you) "UNDERSTANDING" your phone. Also, have you used the "search" option.

I can help, so answer those questions up top.
 
keraba
Old
#4  
Junior Member - OP
Thanks Meter 0
Posts: 9
Join Date: Nov 2008
Quote:
Originally Posted by jashsu View Post
Until you activate the mount option on the G1, it will not expose any USB Mass Storage devices to the host. Try connecting G1 to your pc, activate mount on G1, then run dmesg on pc to see what name the device has been assigned.
I guess I wasn't clear enough but that is exactly what I did, and showed the output of. My point is that no device (at least in the /dev/sdb1 sense) was displayed.

Does this mean a kernel module is missing ? (usb-storage does get loaded) or more that something like hal is not set up correctly ?
 
jashsu
Old
#5  
jashsu's Avatar
Senior Member
Thanks Meter 4
Posts: 1,845
Join Date: Nov 2008
I haven't had a linux not seamlessly auto-node and auto-mount my usb stuff for a long time.

Anyway if you have usb-storage and ohci_hcd then I don't think anything is missing. Try lsusb to see if the device is showing on the usb bus. Also, if you haven't already done so try mounting the G1 on another computer. Could possibly be a junk usb cable.
 
Constrabus
Old
#6  
Senior Member
Thanks Meter 11
Posts: 153
Join Date: Jun 2009
For future reference to anyone who runs across this issue:
Spent a while trying to figure this out...

In linux, before scanning for a partition, it waits for the device to settle. For some reason the G1 doesn't "settle."

To force scan for a partition run:
"fdisk -l /dev/sdb"
(depenind on devices currently mounted, you need to scan for the next partition letter
example /dev/sdc or /dev/sdd)

The reason this isnt a problem for Windows.. etc is because windows does not wait for the device to settle before scanning.

Good luck.
 
lbcoder
Old
#7  
Account currently disabled
Thanks Meter 83
Posts: 2,649
Join Date: Jan 2009
As has been suggested, you probably have a bad cable.
 
andrewes
Old
#8  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Aug 2009
Location: Minnetonka, MN
Default Finding and Mounting an HTC G1

dmesg is helpful. You need to have allowed mounting in the USB connection dialog (among alerts) on the phone. This must be done every time it is plugged into the USB.

Another way to see what device name your mass storage device landed on is to install and run lsscsi. Here's what mine looks like with my HTC G1 plugged in:

eshpc dev # lsscsi
[0:0:0:0] disk Generic USB SD Reader 1.00 /dev/sda
[0:0:0:1] disk Generic USB CF Reader 1.01 /dev/sdb
[0:0:0:2] disk Generic USB SM Reader 1.02 /dev/sdc
[0:0:0:3] disk Generic USB MS Reader 1.03 /dev/sdd
[2:0:0:0] disk HTC Android Phone 0100 /dev/sde
eshpc dev # fdisk -l /dev/sde

Disk /dev/sde: 1004 MB, 1004535808 bytes
7 heads, 38 sectors/track, 7375 cylinders
Units = cylinders of 266 * 512 = 136192 bytes
Disk identifier: 0x7e76f81a

Device Boot Start End Blocks Id System
/dev/sde1 1 7376 980864+ 6 FAT16
eshpc dev # mount /dev/sde1 /mnt/g1
eshpc dev # ls /mnt/g1
Music amazonmp3 dcim froogloid pdf tmp
albumthumbs appmanager download nandroid recovery-backup.img where

That is the contents of my sdcard.
 
nurre
Old
#9  
Senior Member
Thanks Meter 8
Posts: 183
Join Date: Jul 2007
Seen mounting errors happen twice, once was a bad cable, other time was too many devices plugged into a usb hub.
 
cyker
Old
#10  
cyker's Avatar
Junior Member
Thanks Meter 1
Posts: 13
Join Date: Feb 2010
Location: Beijing
Quote:
Originally Posted by Constrabus View Post
For future reference to anyone who runs across this issue:
Spent a while trying to figure this out...

In linux, before scanning for a partition, it waits for the device to settle. For some reason the G1 doesn't "settle."

To force scan for a partition run:
"fdisk -l /dev/sdb"
(depenind on devices currently mounted, you need to scan for the next partition letter
example /dev/sdc or /dev/sdd)

The reason this isnt a problem for Windows.. etc is because windows does not wait for the device to settle before scanning.

Good luck.
This is indeed helpful. Could you be more explicit about what you meant by 'settle'?
Keep it simple, stupid.
http://www.cykerway.com/

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...