LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-10-2007, 12:52 PM   #1
mmoalem
LQ Newbie
 
Registered: Nov 2005
Posts: 11

Rep: Reputation: 0
please help with automounting usb on etch


hi there all - have installed etch base plus file and printer server meta-packages on headless server. webmin installed for server control. using samba to share external usb drive on home network. fstab mount external drive by by-id nodes. everything works except that i have to manually command 'mount -a' on every reboot. i have tried to install usbmount but it did not help (not sure if i need to configure it somehow)
is anyone here able to help?
i would probably need a script at the end of the boot process to do 'mount -a' but i'm quite a newbie so not sure how to go about it
 
Old 03-10-2007, 01:43 PM   #2
budword
Member
 
Registered: Apr 2003
Location: Wisconsin
Distribution: Switched to regualr Ubuntu, because I don't like KDE4, at all. Looks like vista on crack.....
Posts: 675

Rep: Reputation: 31
Can you post your /etc/fstab for us ? And the results of the command "lsusb" while the thumb drive is plugged in and mounted, just so we know what your computer is calling the usb drive.

David
 
Old 03-11-2007, 09:40 AM   #3
mmoalem
LQ Newbie
 
Registered: Nov 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Hi there and thanks for replying
these are the lines for the external disk from fstab:

/dev/disk/by-id/usb-HDT72252_5DLAT80_00304479-part1 /media/PHILIPS1 vfat use$

/dev/disk/by-id/usb-HDT72252_5DLAT80_00304479-part2 /media/PHILIPS2 vfat use$


This is the lsusb:

Bus 006 Device 002: ID 0471:0829 Philips
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 003: ID 04b8:0005 Seiko Epson Corp. Stylus Printer
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 003: ID 054c:0069 Sony Corp. Memorystick MSC-U03 Reader
Bus 003 Device 002: ID 054c:0096 Sony Corp.
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 002: ID 046d:092b Logitech, Inc.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 002: ID 10b8:0bb9 DiBcom DiBcom USB DVB-T reference design (MOD300) (warm)
Bus 001 Device 001: ID 0000:0000


this is a file z90.rules i added to /etc/udev/rules.d


# Flash Memory 1

BUS="usb", SYSFS_vendor="HDT72252*", NAME="PHILIPS%n"", run+="mount -a"


mount-a works fine and mounts the external disk every time so its not an fstab issue - it is a way to automount external usb disks ...
usbmount didnt work, not sure if pmount is installed and how to set it up if it going to help
 
Old 03-11-2007, 09:55 AM   #4
budword
Member
 
Registered: Apr 2003
Location: Wisconsin
Distribution: Switched to regualr Ubuntu, because I don't like KDE4, at all. Looks like vista on crack.....
Posts: 675

Rep: Reputation: 31
Hi, the reason I asked for the whole /etc/fstab is that those disks can be auto mounted every time they are detected at boot by having the correct options set in /etc/fstab. If you'll post the rest of the fsab I can tweak them for you. If you want to do it yourself you can google it. You don't need a script to do it, you just need the right options in the right place in /etc/fstab.

Best of luck...

David
 
Old 03-11-2007, 04:04 PM   #5
mmoalem
LQ Newbie
 
Registered: Nov 2005
Posts: 11

Original Poster
Rep: Reputation: 0
sorry, wrote my reply in a harry without checking what i was ending up with.... youre right, here is the complete fstab:
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/sda /media/floppy0 auto rw,user,noauto 0 0
#none /sys sysfs defaults 0 0
/dev/disk/by-id/usb-HDT72252_5DLAT80_00304479-part1 /media/PHILIPS1 vfat user,auto,rw,umask=0000 0 0

/dev/disk/by-id/usb-HDT72252_5DLAT80_00304479-part2 /media/PHILIPS2 vfat user,auto,rw,umask=0000 0 0

auto is allready there but i think the problem is that the mounting fstab stage in the boot process comes earlier than usb device recognition so when mounting the disks are not yet registered in the system
 
Old 03-11-2007, 05:52 PM   #6
budword
Member
 
Registered: Apr 2003
Location: Wisconsin
Distribution: Switched to regualr Ubuntu, because I don't like KDE4, at all. Looks like vista on crack.....
Posts: 675

Rep: Reputation: 31
Hi, you need to add a file to your /etc/udev/rules.d directory. Name the file something like "99-rules-to-mount-my-usb-drive" The only important part is the 99 in the begining. In that file put the following code :

#run mount -a everytime a block device is added/removed
SUBSYSTEM=="block", run+="/bin/mount -a"

To activate the new rule do an “/etc/init.d/boot.udev restart” (or “rcudev restart” where it exists).

Just to be fair, I'm not smart enough to come up with all that off the top of my head, so to give credit where credit is due, I found that here.....

http://linux.wordpress.com/2006/10/0...b-hard-drives/

Let me know if that works or not....

David
 
Old 03-12-2007, 06:33 AM   #7
mmoalem
LQ Newbie
 
Registered: Nov 2005
Posts: 11

Original Poster
Rep: Reputation: 0
hi there again - no it didnt work...
any more ideas?
 
Old 03-12-2007, 04:02 PM   #8
mmoalem
LQ Newbie
 
Registered: Nov 2005
Posts: 11

Original Poster
Rep: Reputation: 0
common people there must be a way...
since my last post been chatin to some on irc and followed their advice - create a new init script:
nano /etc/init.d/mount-usb
#!/bin/sh
$mount-util = `which mount`
$mount-util -a

save and exit
update-rc.d mount-usb defaults

that didnt seem to work

also installed pmount and hal and still no automounting

any more ideas?
 
  


Reply



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
Automounting a USB Harddrive rflook Debian 1 02-26-2007 06:40 AM
USB mass storage not automounting anymore in Etch... JaseP Debian 11 09-25-2006 10:44 AM
FC3 usb stick automounting mightyMile Linux - Hardware 1 01-17-2006 03:07 PM
how does usb automounting work? m_yates Ubuntu 1 12-24-2005 09:35 PM
usb automounting wi_slacker Slackware 6 05-05-2004 12:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:00 PM.

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
Open Source Consulting | Domain Registration