LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-21-2006, 11:53 AM   #1
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Rep: Reputation: 30
How to unmount a USB device that I can't find


Apologies if I am missing something very fundamental here, but when I plug in my Kingston USB device, it does not show up on the desktop, but is listed by "dmesg | grep SCSI" as " sda ". So Ubuntu found it, but I don't how to determine exactly where it is, or how to "unmount" it, and can't find anything with Google that clues me in. Can anyone assist? TIA.
 
Old 07-21-2006, 11:59 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
If you've plugged it in and haven't mounted it yet, you can't unmount it! Do you mean you want to mount it?
 
Old 07-21-2006, 12:05 PM   #3
lockpicker
Member
 
Registered: Feb 2006
Location: Sikkim Manipal Institute of Technology, Sikkim
Distribution: Slackware 10.2
Posts: 80

Rep: Reputation: 15
well it sure looks like you have'nt mounted it in the first place
for that you could be using

mkdir /mnt/flash
mount -t vfat /dev/sda /mnt/flash

assuming that you have a FAT32 filesystem on your drive.

and access your device using /mnt/flash

for unmounting : umount /mnt/flash
 
Old 07-21-2006, 12:06 PM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
For Ubuntu, you'll need to prefix the commands given by lockpicker with "sudo", unless you've enabled the root account.

Edit:

Quote:
Originally Posted by lockpicker
mount -t vfat /dev/sda /mnt/flash
The bold bit should read /dev/sdax, where x is a number; you mount partitions. dmesg should tell you how many partitions there are on the device, if there's just one, it should be /dev/sda1.

Last edited by Nylex; 07-21-2006 at 12:09 PM.
 
Old 07-22-2006, 07:51 AM   #5
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Thanks all, Will try this when I get to office and report back.

Nylex, In everyday english, I want to use the USB device and ideally by finding it on the desktop. I am not sure exactly what mounting does but suspect that it "enables" use of the device, and possibly puts an icon on the desktop (although this may be a separate process from mounting). So the purpose of this thread is to further my objective and any assistance you can give will be greatly appreciated.
 
Old 07-22-2006, 07:54 AM   #6
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Mouting attaches the filesystem on the device to your tree, as it were. Again, you need to mount the device before using it and you can't unmount something that hasn't been mounted in the first place.
 
Old 07-22-2006, 10:07 AM   #7
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
The reason your usb drive showed up as a scsi device is linux treats all usb devices as a scsi device. Just like on a laptop all pcmcia cards are treated as pci devices.
 
Old 07-22-2006, 11:03 AM   #8
johnathan
LQ Newbie
 
Registered: Jul 2006
Distribution: slackware 10.1
Posts: 7

Rep: Reputation: 0
Wink mounting and unmounting a usb device

Depending on your distribution and icon may appear or not appear at all...

There should be a directory for your usb devices in /mnt/usb if there is no icon on your desktop....

If there is no directory then open up a terminal and type

Mkdir /mnt/usb

Then plug in your device and type dmesg..
Look at the bottom of the output for "sda1" or another directory or something like that and type "mount /dev/sda1 or the scsi identifier for your device.

To unmount type "unmount or umount and then /dev/sda1 or the scsi identifier..

Hope this helps!!
 
Old 07-22-2006, 11:08 AM   #9
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by johnathan
Mkdir /mnt/usb
Case sensitivity is important here - it should be "mkdir".
 
Old 07-22-2006, 11:33 AM   #10
johnathan
LQ Newbie
 
Registered: Jul 2006
Distribution: slackware 10.1
Posts: 7

Rep: Reputation: 0
Unhappy

Sorry about that...
 
Old 07-24-2006, 07:42 AM   #11
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Thanks guys. Did not make it to the office Sat or Sun but will be in this morning and will try those.
 
Old 07-24-2006, 05:20 PM   #12
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
here are directory contents:

odyssey@ubuntu:/mnt$ cd sda1
odyssey@ubuntu:/mnt/sda1$ ls -l
total 0
odyssey@ubuntu:/mnt/sda1$ cd ..
odyssey@ubuntu:/mnt$ cd sdb1
odyssey@ubuntu:/mnt/sdb1$ ls -l
total 0
odyssey@ubuntu:/mnt/sdb1$ cd ..
odyssey@ubuntu:/mnt$ cd usb
odyssey@ubuntu:/mnt/usb$ ls -l
total 0

I.e., there are 3 directories in mnt: all apparently empty

here are last lines from dmesg (had to use a different USB drive (Lexar)):

usb 2-2: new full speed USB device using ohci_hcd and address 5
scsi5 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
Vendor: LEXAR Model: JUMPDRIVE Rev: 1.11
Type: Direct-Access ANSI SCSI revision: 01 CCS
SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
sda: Write Protect is off
sda: Mode Sense: 23 00 00 00
sda: assuming drive cache: write through
/dev/scsi/host5/bus0/target0/lun0: p1
Attached scsi removable disk sda at scsi5, channel 0, id 0, lun 0
usb-storage: device scan complete

As I interpret this, the Lexar USB drive is sda, but cannot see where it is.

Anyway I tried mount /dev/sda and got:

odyssey@ubuntu:/mnt/usb$ mount /dev/sda
mount: can't find /dev/sda in /etc/fstab or /etc/mtab
---------------
I felt that the USB drive could not be unmounted until it got mounted. You confirmed this.

Ubuntu obviously sees the USB drive, but I cannot. I guess I just don't understand the process.

I have tried the above suggestions, but still cannot find or mount the drive. Am I doing something wrong? TIA.
 
Old 07-24-2006, 05:40 PM   #13
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
My other thread: Sooooooo sloooooow

has taken a turn to exactly the same issue, so am posting the results here from that thread that are relevant to the USB drive here and will hope to consolidate into this thread:

Here is result from tail /var/log/messages :

Jul 24 16:46:05 localhost kernel: Type: Direct-Access ANSI SCSI revision: 01 CCS
Jul 24 16:46:05 localhost kernel: SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
Jul 24 16:46:05 localhost kernel: sda: Write Protect is off
Jul 24 16:46:05 localhost kernel: SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
Jul 24 16:46:05 localhost kernel: sda: Write Protect is off
Jul 24 16:46:05 localhost kernel: /dev/scsi/host5/bus0/target0/lun0: p1
Jul 24 16:46:05 localhost kernel: Attached scsi removable disk sda at scsi5, channel 0, id 0, lun 0
Jul 24 16:46:06 localhost scsi.agent[11476]: sd_mod: loaded sucessfully
Jul 24 16:56:10 localhost -- MARK --
Jul 24 17:16:10 localhost -- MARK --

these lines from above seem to indicate where the drive is but I don't understand them:

Jul 24 16:46:05 localhost kernel: /dev/scsi/host5/bus0/target0/lun0: p1
Jul 24 16:46:05 localhost kernel: Attached scsi removable disk sda at scsi5, channel 0, id 0, lun 0

Does this tell anyone anything?

Here are results from lockpicker's suggestion:

odyssey@ubuntu:/mnt/usb$ sudo mount -t /dev/sda /mnt/usb
Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] ... : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].

this line:
"The command is `mount [-t fstype] something somewhere'." appears to me to be exactly what lockpicker suggested, but clearly I did something wrong? I have read the info above but can't see where I went astray.
 
Old 07-24-2006, 10:35 PM   #14
lockpicker
Member
 
Registered: Feb 2006
Location: Sikkim Manipal Institute of Technology, Sikkim
Distribution: Slackware 10.2
Posts: 80

Rep: Reputation: 15
just try
mount -t vfat /dev/sda1 /mnt/flash
provided you've already created /mnt/flash using mkdir /mnt/flash

if that dosent seem to work then just try

mount /dev/sda1 /mnt/flash
or
mount /dev/sda /mnt/flash

P.S: The commands wont give you any output..You'll just get the bash prompt back (assuming you're using bash).
 
Old 07-25-2006, 08:18 AM   #15
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
lockpicker, thanks. If there is no report following the commands, will the icon show up on the desktop (or is that another matter) or how will I know if I accomplished anything?
 
  


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
how to unmount unknown usb device? touser Linux - Hardware 1 05-30-2007 09:53 AM
usb 2.0 camera - can't find the device jweller Linux - Hardware 1 10-11-2005 06:38 PM
unmount the usb device prital Linux - Newbie 6 01-24-2005 08:08 PM
USB flash unmount: device busy mkivihar Linux - Hardware 4 11-20-2004 10:32 AM
unmount usb device pmorimer Linux - Hardware 2 08-25-2004 04:36 PM


All times are GMT -5. The time now is 10:52 AM.

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