LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
Search this Thread
Old 09-01-2013, 08:02 AM   #1
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Debian, Arch, Xubuntu
Posts: 171

Rep: Reputation: 12
Proper automount setup?


Heya,

I'm trying to setup a way to automatically mount a mass storage device (like a usb flash key or an external HDD) to a specific folder in Debian Wheezy whenever a device is plugged in (or accessed). What is the proper way to do this?

I'm setting it up on an embedded ARM device. This device has only one available USB port and is going to be used by people who don't have a clue about linux. Many different devices are expected to be connected, though not simultaneously. The removable device should appear as /dev/sdb (/dev/sda being the main internal hard disk).

Also, how to automount removable devices with multiple partitions?
 
Old 09-02-2013, 12:52 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,466

Rep: Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213Reputation: 1213
I have a Raspberry Pi (that looks like an embedded arm device). Auto mount of usb works perfectly without any configuration (by default) - all the partitions mounted. (I have openelec installed currently). Debian wheezy should also work. I do not know what do you have exactly, so please give us more details.
 
Old 09-02-2013, 04:55 AM   #3
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Debian, Arch, Xubuntu
Posts: 171

Original Poster
Rep: Reputation: 12
Hello, pan64!

I am using a Cubieboard. It has 2 USB's, but one is already in use, so that leaves one available. ^^ It is running a custom 3.4.43 kernel - I had to compile my own because the original had autofs disabled. I also had to manually install autofs automounter with apt-get.

Could you please show me your configuration files for autofs?


Most removable media have only one partition, so adding an entry for that in autofs is not a problem. However I'd like to account for the rare cases when multiple partitions are available. Like when there is only one partition, have it mount as /mnt/disk. But when there multiple partitions on the device, have them mounted as /mnt/disk/<sdb1_name>, /mnt/disk/<sdb2-name> where sdbX-name is the name of the filesystem i.e. the Label like /mnt/disk/Music /mnt/disk/Documents

Can something like this be done?
The /mnt/disk folder will be shared on the network with Samba.

Best regards!
~dis

Last edited by displace; 09-02-2013 at 06:18 AM.
 
Old 09-02-2013, 05:23 AM   #4
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,022
Blog Entries: 1

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
Moderator Response

Moved: This thread is more suitable in <Linux - Embedded & Single-board computer> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 09-02-2013, 06:28 AM   #5
displace
Member
 
Registered: Jan 2013
Location: EU
Distribution: Debian, Arch, Xubuntu
Posts: 171

Original Poster
Rep: Reputation: 12
Quote:
Originally Posted by onebuck View Post
Moved: This thread is more suitable in <Linux - Embedded & Single-board computer> and has been moved accordingly to help your thread/question get the exposure it deserves.
I beg to differ. It is coincidence that I am running this on an embedded device, but the question is not hardware specific. Rather it is software-related, and it can be used on any architecture i.e. a standard x86 laptop. The Cubieboard I mentioned is just "background noise" and doesn't relate to the question in any way. Can you please move the thread back?

~dis
 
  


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
[SOLVED] Proper pulseaudio setup for Slackware64-current rmjohnso Slackware 15 03-04-2010 08:19 PM
How to setup proper permissions has me confused Brandon.Wamboldt Linux - Server 1 05-24-2009 11:51 PM
rxvt-unicode fonts proper setup zomane Linux - Desktop 1 04-12-2009 05:02 PM
Proper setup order for an RH server? mephitic Linux - Networking 0 08-20-2003 06:10 PM
Proper DNS setup tarballedtux Linux - Networking 2 03-21-2002 09:29 PM


All times are GMT -5. The time now is 01:34 PM.

Main Menu
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