MEPIS Community Forum

A Linux operating system based on Debian Stable
View unanswered posts | View unsolved topics | View active topics |



Reply to topic  [ 8 posts ] 
Auto-mounting USB flash memory drives 
Author Message

Joined: Wed Jul 29, 2009 4:51 am
Posts: 169
Has thanked: 3 times
Have thanks: 4 times
Post # 262878
Post Auto-mounting USB flash memory drives
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?


Thu Feb 17, 2011 6:03 am
Profile
Forum Veteran
Forum Veteran
User avatar

Joined: Wed Jul 12, 2006 1:42 am
Posts: 4446
Has thanked: 435 times
Have thanks: 588 times
Post # 262899
Post Re: Auto-mounting USB flash memory drives
In KDE4, try to use "System Settings" -> removable Device


Thu Feb 17, 2011 11:13 am
Profile
Forum Regular
Forum Regular
User avatar

Joined: Thu Aug 17, 2006 7:56 am
Posts: 874
Location: Scotland
Has thanked: 87 times
Have thanks: 45 times
Post # 262900
Post Re: Auto-mounting USB flash memory drives
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.


Thu Feb 17, 2011 12:01 pm
Profile
Forum Veteran
Forum Veteran
User avatar

Joined: Wed Jul 12, 2006 1:42 am
Posts: 4446
Has thanked: 435 times
Have thanks: 588 times
Post # 262909
Post Re: Auto-mounting USB flash memory drives
Sorry, I should read the posts more carefully... that's what happens when you try to do stuff in between stuff...


Thu Feb 17, 2011 12:53 pm
Profile
Forum Veteran
Forum Veteran
User avatar

Joined: Mon Feb 12, 2007 1:45 pm
Posts: 5648
Location: Penn's Woods
Has thanked: 801 times
Have thanks: 650 times
Post # 262911
Post Re: Auto-mounting USB flash memory drives
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


Thu Feb 17, 2011 1:16 pm
Profile
Forum Guide
Forum Guide
User avatar

Joined: Thu Jul 26, 2007 2:40 am
Posts: 2037
Location: Bakersfield, CA
Has thanked: 25 times
Have thanks: 78 times
Post # 263024
Post Re: Auto-mounting USB flash memory drives
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


Fri Feb 18, 2011 2:15 pm
Profile WWW
Forum Veteran
Forum Veteran
User avatar

Joined: Wed Jul 12, 2006 5:54 am
Posts: 10796
Location: Tulsa, Oklahoma U.S.A.
Has thanked: 3584 times
Have thanks: 857 times
Post # 263085
Post Re: Auto-mounting USB flash memory drives
http://www.mepis.org/docs/en/index.php?title=Uuid

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


Sat Feb 19, 2011 2:39 am
Profile

Joined: Wed Jul 29, 2009 4:51 am
Posts: 169
Has thanked: 3 times
Have thanks: 4 times
Post # 263267
Post Re: Auto-mounting USB flash memory drives
Very informative feedback folks, many thanks.


Mon Feb 21, 2011 5:39 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.