LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-20-2008, 05:24 PM   #1
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Rep: Reputation: 51
What's package daemon that add to /etc/fstab when you add USB sticks


Hello,

On some machines and live cd, when you plug a USB stick, it changes the /etc/fstab automatically, and the user can mount it !!

Very easy, what is this daemon ? Does it exist a package for Debian Stable ? ( the started daemon might be in the /etc/init.d ...)

Thanks for the information !
 
Old 01-20-2008, 05:53 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,764

Rep: Reputation: 306Reputation: 306Reputation: 306Reputation: 306
If I am not mistaken, mounting the USB stick is handled by usbfs. Usbfs is mounted on boot if you have an entry like this in your /etc/fstab:
Code:
none            /proc/bus/usb             usbdevfs        defaults   0   0
When you plug in the USB stick, it should appear either in /mnt or /media.
 
Old 01-20-2008, 06:35 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
If your system doesn't have this, using it might break how automounting works on your system. You could always just enter "mount" by itself and use the values returned to create your own entry in /etc/fstab, but make sure you use "UUID=" or "LABEL=" and not the device name. This is because the next time you insert a device it might be /dev/sdc1 instead of /dev/sdb1. You can use the "udevinfo" program to determine the UUID or LABEL of a disk. "udevinfo -q env -n /dev/sdb1" for example. Look for the line of output that says something like "ID_FS_UUID=4B1135F8699960E7", then use "UUID=4B1135F8699960E7" in place of the device in the fstab entry. ( The particular UUID number will be different of course. ). For fat32 filesytems, using the "uid=" option together with the "users" option will allow mounting by a normal user. Using the appropriate "fmask" and "dmask" values can give you exclusive access for that pendrive on that computer.

On many distro's the dbusd, hald and udevd daemons are involved along with helper programs which may include a KDE or Gnome daemon as well. Hal will detect the device and udev will create a device node for it. The PolicyKit package may be involved as well. After the device is mounted there will be a /media/.hal-mtab entry created for that device as well.

Other systems use hotplug to do most of the work.

If your system uses HAL, check if you have a "halmount" program which would allow you to mount a device from the console as a normal user.
 
Old 01-20-2008, 08:30 PM   #4
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Original Poster
Rep: Reputation: 51
Thanks
add. info: I know that for instance with Suse distros, it is done automatically, even no X started.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I add this line to FSTAB ? kc5hwb Ubuntu 8 04-08-2007 02:51 PM
How do I add a PATH that STICKS in Debian? lumix Linux - Newbie 3 03-20-2007 01:42 PM
script automatically add entry in cron daemon? Thinking Linux - General 1 03-30-2005 05:27 AM
What do I add to my fstab to get my iPod to mount??? Ausar Linux - Newbie 6 02-15-2005 02:01 PM
Add users remotely, daemon? The Jesus Linux - Networking 1 08-14-2003 10:56 AM


All times are GMT -5. The time now is 05:04 AM.

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