LinuxQuestions.org
Help answer threads with 0 replies.
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 06-05-2011, 05:52 AM   #1
the_gripmaster
Member
 
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 362

Rep: Reputation: 38
Inserting a USB Flash Drive


What command is executed when you plug in a USB Flash drive manually in the PC's USB port?

I am pluggin in the device and it is automatically getting mounted in /media/ed7a753f-df88-4984-b65a-5d3a8cc2714a. After I unmount the device using umount /media/ed7a753f-df88-4984-b65a-5d3a8cc2714a, how do I remount it from the terminal so that the weird directory gets created automatically and the Flash Drive gets mounted there?

Another question, where does the system get this ed7a753f-df88-4984-b65a-5d3a8cc2714a. Is it some kind of identification of the disk?
 
Old 06-05-2011, 06:03 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
The 'ed7a753f-df88-4984-b65a-5d3a8cc2714a' value is from the UUID of the filesystem on the device. On some filesystems you could create a Label for the filesystem and it might be used instead.

If the device node is still present, you could use a simple mount command to mount the device. This may not be the case if you ejected the device.

If your distro has the ivman package installed, you can use `halmount <device>' to automount filesystems via HAL. Here are some examples from the manpage:
Code:
EXAMPLES
       halmount
              list all mountable devices known to hal

       halmount /dev/hdc
              mount device hdc on default mount point (/media/volumelabel)

       halmount /dev/hdc cdrom
              mount device hdc on /media/cdrom

       halmount -u "Holiday Pictures"
              umount device that has the label "Holiday Pictures"
On most distros automounting removable devices is handled by the desktop environment, and PolicyKit is used behind the scenes to provide permission to do this. On KDE 4 for example, there is a device notifier applet. It can be configured to automount certain devices and ignore others. You wouldn't need to mount the device from the console. I still use halmount however. It is very convenient for mounting and looking up device names.
 
1 members found this post helpful.
Old 06-05-2011, 06:43 AM   #3
the_gripmaster
Member
 
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 362

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by jschiwal View Post
If your distro has the ivman package installed, you can use `halmount <device>' to automount filesystems via HAL.
I am using Fedora 15 and could not find ivman package for my distro. Found an alternative package though to get the job done, it's called halevt

Thanks.
 
Old 06-05-2011, 07:10 AM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
ivman is a dead project. halevt is the working replacement. They have slightly different config syntax, but the functionality is the same.

I don't know what will happen to it when hal is fully deprecated and all its functions are merged into udev though.

For manual mounting of removable drives, pmount/pumount is the usual tool.
 
1 members found this post helpful.
Old 06-05-2011, 07:23 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
I didn't realize that ivman was obsolete. My distro has ivman and not halevt.
 
Old 06-05-2011, 07:58 AM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
Well, ivman hasn't had an update in 4 years now, and halevt appears to have been started in response. I was forced to switch over when it stopped working properly on my system, and Debian eventually removed it from its repositories. I guess a few distros just haven't noticed the changeover yet.
 
Old 06-05-2011, 04:52 PM   #7
jefro
Guru
 
Registered: Mar 2008
Posts: 12,087

Rep: Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521Reputation: 1521
This /media/ed7a753f-df88-4984-b65a-5d3a8cc2714a
would make me think the name of the usb is that.
 
  


Reply

Tags
automount, flash drive, usb


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
USB Flash Drive Problem - Light glows, but drive is not detected MihirSahasrabudhe Linux - Hardware 5 07-07-2010 09:51 AM
How to stop mounts on /media when inserting a USB device. (SD, Flash, etc.) MrUmunhum Linux - General 16 06-27-2009 07:41 PM
USB Flash Drive, write protect, and flash file system questions storkus Linux - Hardware 4 12-01-2008 05:32 AM
fedora 7: autofs is not mounting USB flash drive or DVD ROM drive Hewson Linux - General 3 05-12-2008 09:58 AM
cannot delete drive from root desktop - cannot mount usb flash drive - openSuSE 10.2 bluecog6 Linux - General 6 01-29-2007 04:18 PM


All times are GMT -5. The time now is 08:57 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration