LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-02-2009, 10:16 AM   #1
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Rep: Reputation: 30
How do I mount a USB drive?


I have Ubuntu 8.10. My phone is a USB drive. I do not think there is anything special about the phone as it acts exactly like my USB thumb drives when I plug it in. It plugs into the computer via a standard USB cable. When I plug into Vista or XP, the OS recognizes a USB device and mounts it as a USB drive. Windows behaves exactly like when I use a thumb drive or any other USB device like my camera. I copy files normally.

In Ubuntu, the OS does not automount the drive. I think there might be a way to mount it as a USB drive like in Windows, but I do not know how.

Is this possible or should I use Windows when working with my phone?
 
Old 02-02-2009, 10:41 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
look in dmesg for the drive when you plugin the phone.
then mount the drive
mount /dev/xxx /mnt
 
Old 02-02-2009, 10:59 AM   #3
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
It might help to see if it's listed by
Code:
$ lsusb
 
Old 02-03-2009, 07:27 AM   #4
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Original Poster
Rep: Reputation: 30
Thanks all.

Is dmesg a command or a file? Also I am not quite sure what I am looking for in dmesg? For example, am I looking to see if a new USB disk device is listed when I insert the USB cable into the USB port?
 
Old 02-03-2009, 07:47 AM   #5
vasmakk
Member
 
Registered: Jan 2009
Distribution: Debian Lenny, Ubuntu 9.04
Posts: 87

Rep: Reputation: 16
Quote:
Originally Posted by jdruin View Post
Thanks all.

Is dmesg a command or a file? Also I am not quite sure what I am looking for in dmesg? For example, am I looking to see if a new USB disk device is listed when I insert the USB cable into the USB port?
Hi!

dmesg is a command. As far as I know, this command prints out the kernel's boot messages (the stuff you see when you start your kernel). But I could be wrong! I guess lsusb is more appropriate here, as it lists your usb devices. What lsusb tells you when you plug in your device?

If your device is recognizable then, maybe you should check for tools like bitpim and gammu , especially designed for mobile phones, and are included in ubuntu distros. I don't know much about the issue though. Make your own research before install anything new!

Vas

Vas

Last edited by vasmakk; 02-03-2009 at 08:32 AM.
 
Old 02-03-2009, 09:34 AM   #6
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Suggest you unplug the phone, wait a few seconds, and then plug it in again. Then do:
Code:
$ dmesg|tail
This shows the last 10 lines of the output of dmesg which should be what the kernel has to say about the phone you have just plugged in. (If it does not talk about phones then much more fiddling is needed, since the kernel hasn't recognised the thing. It should says 'Acme Super Europhone' or something.)

Examine this output the device name should be in there somewhere. Try the same with a USB stick. It'll say something like sdc and sdc1 perhaps. This is what you are after: The stick's device is scd and the first partition (assuming it has only one partition) is called scd1 so the partition will be mounted on device /dev/scd1.

So look for something of the sort and this tells you the device name. It now occurs to me that I have no idea what use this is, not being a student of phones.

Suggest you install a phone program
Code:
$ apt-cache search phone|less 
or
$ apt-cache search --full phone
and it should set the thing up. This might need you to tell it the device name, so above not a complete waste of time.

Last edited by lugoteehalt; 02-03-2009 at 09:42 AM.
 
Old 02-03-2009, 09:41 AM   #7
zerobane
Member
 
Registered: Jan 2006
Posts: 47

Rep: Reputation: 16
you take a look at #cat /proc/partitions (not sure if ubunut has the old /proc structure or not)

typical I run

#tail -f /var/log/message
plugin usb
#dmesg
#mkdir /mnt/cell_phone
#mount /dev/sda1 /mnt/cell_phone note:sda1 will probaly need to be changed for your drive, i thought ubunutu used uda?
 
Old 02-03-2009, 12:35 PM   #8
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Original Poster
Rep: Reputation: 30
Thanks all. I think the consensus is that I need to mount the phone. I think where I was confused is that Ubuntu always auto-mounts my standard USB thumb drives, so I did not expect to have to manually mount the USB phone. I think the problem could be that Ubuntu actually does recognize the phone as a phone when I plug it in. Maybe that is messing something up.

Here is the sequence:

1) I plug the adapter cord into the phone.
2) I plug the other end of the adapter cord (the "USB" end) into the laptop.
3) On the phone, I hit a command that puts the phone into "USB Mode" which makes it a flash drive essentially.

Based on your comments and my observations I noticed:

Windows never "sees" the phone until I put the phone into "USB Mode". As soon as I activate the command, Windows "sees" for the first time a new USB drive.

Ubuntu on the other hand recognizes a new "phone device" immediately during step 2. With Ubuntu I never have a chance to get to step 3 because it is almost instantaneous. But I dont want Ubuntu to recognize the phone as a phone. I want to use the phone as a USB so I can get my MP3 onto the phone.

So, that being said, could the initial recognition by Ubuntu be blocking Ubuntu from seeing the phone as a USB drive in step 3?

I will try all the comments later today and see what happens.

Thanks for the tips on the /proc, dmesg, tail, lsusb. I will try those and post results tonight.
 
Old 02-03-2009, 02:48 PM   #9
vinnywrite
Member
 
Registered: Jan 2007
Location: lexington NC.
Distribution: Ultimalinux 8.4 & Slackware 12.0.0
Posts: 82

Rep: Reputation: 16
switch the phone into USB mode befor pluging in
 
Old 02-03-2009, 04:00 PM   #10
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Original Poster
Rep: Reputation: 30
Thanks Vinny. I tried. The phone won't go into USB mode unless it senses that the USB cord is plugged in. So the sequence seems to be fixed. The phone has to be plugged in then you set the phone to "USB mode".
 
Old 02-03-2009, 05:37 PM   #11
zerobane
Member
 
Registered: Jan 2006
Posts: 47

Rep: Reputation: 16
Can you switch the phone to usb mode while ubunutu is booting?

maybe linux is seeing the phone as a modem?
 
Old 02-11-2009, 05:45 PM   #12
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Original Poster
Rep: Reputation: 30
I tried various combinations of the above with no lock. But there is some good news. When I plug in and unplug the phone, i get messages from the dmesg command. For example:

[ 2042.464054] usb 2-2: new full speed USB device using ohci_hcd and address 5
[ 2042.632551] usb 2-2: configuration #1 chosen from 1 choice
[ 2042.634939] cdc_acm 2-2:1.0: ttyACM0: USB ACM device

So linux sees the phone as a USB device I think. So can I mount the USB device?
 
Old 02-11-2009, 05:55 PM   #13
digerati1338
Member
 
Registered: May 2007
Location: CO
Distribution: Ubuntu
Posts: 152
Blog Entries: 1

Rep: Reputation: 18
Code:
sudo fdisk -l
That should list any mountable partitions. It will show any hard drives you have in addition to your phone (if it is mountable). If it does not show up there, you need to figure out why.
 
Old 02-11-2009, 05:58 PM   #14
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Original Poster
Rep: Reputation: 30
fdisk -l did not show any more bootable partitions than when the phone was connected but i did an lsusb. Here is the output:

ubuntu@ubuntu:/proc$ sudo lsusb
Bus 003 Device 002: ID 046d:c521 Logitech, Inc. MX620 Laser Cordless Mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 005: ID 1004:6000 LG Electronics, Inc. VX4400/VX6000 Cellphone
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0bda:0158 Realtek Semiconductor Corp. Mass Stroage Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So it not only looks like Linux sees the phone in dmesg but also knows it is a USB device. Could it be I dont have drivers installed for a "USB ACM device"?
 
Old 02-11-2009, 06:02 PM   #15
jdruin
Member
 
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313

Original Poster
Rep: Reputation: 30
More clues. I somehow found that "ttyACM0". It seems to be a file in the /dev folder.

ubuntu@ubuntu:/dev$ ls /dev | grep ttyACM0
ttyACM0

So I think perhaps we are close. Does anyone know what this might mean.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 07:16 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 1 12-24-2005 04:25 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 02:15 AM
mount usb module then mount usb hard drive guanyu Linux - Hardware 1 10-08-2003 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration