Auto-mounting USB flash memory drives

If you are having a problem with getting any of your computer's hardware to work with MEPIS or you can't find the right driver, this is the forum to use. It's for newbies and regular users to post questions. Just make sure to post what hardware you are having problems with, in the subject and not just in the post's text area, please.
Message
Author
User avatar
mepisuser
Posts: 169
Joined: Wed Jul 29, 2009 4:51 am

Auto-mounting USB flash memory drives

#1 Postby mepisuser » Thu Feb 17, 2011 6:03 am

I have a USB flash drive plugged in all the time in my USB hub.

I use Mepis 8.0 and when I boot to KDE, I have to double click the USB flash drive icon to mount the flash drive.

How do I configure for auto-mount when booting?

Also, should a USB flash drive be listed in mnt or media?

User avatar
Adrian
Forum Veteran
Forum Veteran
Posts: 6179
Age: 41
Joined: Wed Jul 12, 2006 1:42 am

Re: Auto-mounting USB flash memory drives

#2 Postby Adrian » Thu Feb 17, 2011 11:13 am

In KDE4, try to use "System Settings" -> removable Device

User avatar
wireman
Forum Regular
Forum Regular
Posts: 874
Age: 66
Joined: Thu Aug 17, 2006 7:56 am

Re: Auto-mounting USB flash memory drives

#3 Postby wireman » Thu Feb 17, 2011 12:01 pm

Adrian wrote:In KDE4, try to use "System Settings" -> removable Device


Adrian, this is mepis 8 so it's KDE3.

For removeable media you'll need to dive into UDEV rules. It's perfectly doable, but trying to get your head around the syntax, at least for me, is a nightmare. This is a good page for info:
http://reactivated.net/writing_udev_rules.html

There are people with more expertise than me here, so do post back if you're still struggling.

Regarding mount points, I think the consensus is to mount internal drives at /mnt and removeable at /mount, but it's not set in concrete and you can do what suits you really.

User avatar
Adrian
Forum Veteran
Forum Veteran
Posts: 6179
Age: 41
Joined: Wed Jul 12, 2006 1:42 am

Re: Auto-mounting USB flash memory drives

#4 Postby Adrian » Thu Feb 17, 2011 12:53 pm

Sorry, I should read the posts more carefully... that's what happens when you try to do stuff in between stuff...

User avatar
joany
Forum Veteran
Forum Veteran
Posts: 6114
Joined: Mon Feb 12, 2007 1:45 pm

Re: Auto-mounting USB flash memory drives

#5 Postby joany » Thu Feb 17, 2011 1:16 pm

mepisuser wrote:I have a USB flash drive plugged in all the time in my USB hub.

I use Mepis 8.0 and when I boot to KDE, I have to double click the USB flash drive icon to mount the flash drive.

How do I configure for auto-mount when booting?

Also, should a USB flash drive be listed in mnt or media?

IIRC, auto mounting flash drives and other devices was a common problem with SM 8.0. I had major trouble mounting SD cards -- I couldn't even get a desktop icon to appear when I plugged one in. I eventually had to write a script to mount the device, and altering the sudoers file allowed me to mount drives as a normal user so I wouldn't have to enter the root password to mount it. I launched the script from a permanent desktop icon I created, so it wasn't too much of an ordeal after I set it up.

At least you are getting a flash drive icon to appear on your desktop. Double clicking on the icon shouldn't be too much of an inconvenience, compared to the difficulty of delving into the mysteries of UDEV. One of these days Linus and his kernel crew will incorporate the UDEV function into the kernel where it belongs. :wink:

The good news is that KDE 4 seems to have fixed this behavior to a large extent, so maybe you should consider upgrading to a later version of SM.

Q - How do I configure for auto-mount when booting?
A - AFAIK you can't. Well you can by launching a script to run at log-in. But what would happen when you unplugged the device and plugged in another one after booting?

Q - Also, should a USB flash drive be listed in mnt or media?
A - I don't think it really matters which one you select if force mounting, but /media would be the customary mount point.
MX-14; 3.12-0.bpo.1-686-pae kernel using 4GB RAM
2.4GHz AMD Athlon 4600+
NVidia GeForce 6150 LE; 304.121 Display Driver
You didn't slow down because you're old; you're old because you slowed down.

User avatar
Jimmy Johnson
Forum Guide
Forum Guide
Posts: 2037
Age: 70
Joined: Thu Jul 26, 2007 2:40 am

Re: Auto-mounting USB flash memory drives

#6 Postby Jimmy Johnson » Fri Feb 18, 2011 2:15 pm

mepisuser wrote:I have a USB flash drive plugged in all the time in my USB hub.

I use Mepis 8.0 and when I boot to KDE, I have to double click the USB flash drive icon to mount the flash drive.

How do I configure for auto-mount when booting?

Also, should a USB flash drive be listed in mnt or media?


It don't matter if it is in /mnt or /media or your /home/mepisuser folder, just make sure you put a folder there with the same name as the name you use in /etc/fstab.

You need to first get the UUID of the flash drive, plug it in and then as root run 'blkid' in the console find the flash drive and note the UUID.

Now you need to add this to your fstab using the SuperUser file manager open /etc/fstab, make a new line above the entry: "# Dynamic entries below" this is where you will put the new line for your flash drive. I'm going to give you a couple of examples one for vfat and one for Linux.

UUID=ECAF-9B51 /home/mepisuser/usb vfat auto,users,gid=users,dmask=002,fmask=113,relatime 0 0

UUID=1bd86f42-8f2f-4d93-b30c-cdddec9621a9 /home/mepisuser/usb ext4 auto,users,exec,relatime 0 0

The first is for fat16 or fat32 and the second is Linux ext4 or change it to ext3 or ext2, whatever file system you are using on the flash drive.

Change the names and the UUID as needed.
Registered Linux User #380263
Registered Linux Computer #279395
Linux, working hard to save you $$$ - Get a clue, get Linux!
Intel Pentium D 2.80GHz
Intel Desktop Board D945GTP
Intel ICH7 Ethernet Controller
Intel ICH7 Audio
nVidia GeForce 6200 Video

User avatar
lucky9
Forum Veteran
Forum Veteran
Posts: 12345
Joined: Wed Jul 12, 2006 5:54 am

Re: Auto-mounting USB flash memory drives

#7 Postby lucky9 » Sat Feb 19, 2011 2:39 am

Yes, even I am dishonest. Not in many ways, but in some. Forty-one, I think it is.
--Mark Twain

User avatar
mepisuser
Posts: 169
Joined: Wed Jul 29, 2009 4:51 am

Re: Auto-mounting USB flash memory drives

#8 Postby mepisuser » Mon Feb 21, 2011 5:39 am

Very informative feedback folks, many thanks.


Return to “Hardware General”

Who is online

Users browsing this forum: Google [Bot] and 1 guest