Fedora Linux Support Community & Resources Center
  #1  
Old 22nd January 2006, 10:13 PM
bachtiar Offline
Registered User
 
Join Date: Apr 2005
Posts: 58
Mount USB flash drive automatically at boot?

If I boot FC4 with flashdrive plugged in, it doesn't get mounted automatically. I have to unplug it and plug it in again, then the hotplug system will pick it up, create /dev/sdx and mount it.

Is there a way to tell hotplug "check if device is already present, and execute a hotplug script"? I don't want to put it in /etc/fstab, because it's not always there.

Many thanks!

Last edited by bachtiar; 22nd January 2006 at 10:28 PM.
Reply With Quote
  #2  
Old 27th January 2006, 08:26 AM
ericv13 Offline
Registered User
 
Join Date: Jul 2005
Posts: 6
I don't have an answer, but I can post a 'me too'. I have 4 USB hard drives attached to an FC4 system. If I plug them in after the system boots all works as expected with hal/fstab-sync/udev (they show up in fstab and /dev and can be mounted). If I reboot the system or power cycle it they occasionally do not show up anywhere except in /proc/bus/usb (no /dev entries, no fstab entries). The behavior is intermittent.

After playing around a bit I found that some USB ports caused it to come up more reliably than others (timing?).

I had this problem on another machine a couple of months ago (fc4 as well) and ended up writing total hack rc.local script to scan through /sys/bus/scsi/devices/*/block/sd* and using the contents of 'dev' to make device nodes and mount the filesystems. It might be a hint that sometimes this script takes a long time (20 secs) before it sees all the drives I expect on the system.
Reply With Quote
  #3  
Old 27th January 2006, 10:01 AM
ericv13 Offline
Registered User
 
Join Date: Jul 2005
Posts: 6
This may help (or there may be a better way someone will point out), but one the default stuff installs entries in /etc/fstab and /dev I still have the problem of the filesystem not being mounted (despite the policies in hal). I *could* add a new callout in hal that runs after the fstab-sync and mounts the device, but here's another way that's working for me: use autofs with a program map.

auto.master:
...
/s /etc/auto.media --timeout=0
...

auto.media:
#!/bin/bash

awk "/\/media\/$1/{print \"-fstype=\"\$3\" :\"\$1}" < /etc/fstab

This makes everything in /etc/fstab under /media appear automatically under /s/volname. Lo-tech, but it does work. I used --timeout 0 (never unmount) because this is a video server and the (very long) delay mounting reiserfs filesystem causes troubles.

To use this you have to 'chkconfig autofs on' and 'service autofs start'.
Reply With Quote
  #4  
Old 27th January 2006, 11:54 AM
fire-fly Offline
Registered User
 
Join Date: Aug 2004
Posts: 269
i had this problem with usb hard drive but not memory stick. Using my friend's usb drive, and it seem to work well. I have been waiting for a solution since FC4 release !!
Reply With Quote
  #5  
Old 27th January 2006, 02:38 PM
foxmuldar Offline
Registered User
 
Join Date: Nov 2005
Location: Alabama
Age: 63
Posts: 217
newbie here, can someone please give me instructions or point me in the direction of instructions? i need to edit my fstab file to auto mount my usb hard drive, also i want to be able to see my ntfs files.

thanks in advance....
foxmuldar,
Reply With Quote
  #6  
Old 28th January 2006, 12:15 AM
fire-fly Offline
Registered User
 
Join Date: Aug 2004
Posts: 269
Quote:
Originally Posted by foxmuldar
newbie here, can someone please give me instructions or point me in the direction of instructions? i need to edit my fstab file to auto mount my usb hard drive, also i want to be able to see my ntfs files.

thanks in advance....
foxmuldar,
Go to http://fedoranews.org/mediawiki/inde...ong_Shing_Chia
Reply With Quote
  #7  
Old 28th January 2006, 12:25 AM
foxmuldar Offline
Registered User
 
Join Date: Nov 2005
Location: Alabama
Age: 63
Posts: 217
thanks for the help, i got the usb drive to load, but i need to see my ntfs files...can ya help please?

foxmuldar,
Reply With Quote
Reply

Tags
automatically, boot, drive, flash, mount, usb

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Buffer I/O error: USB Flash Drive Boot Failure simonwong Using Fedora 0 10th October 2009 04:38 PM
mount/unmount usb flash drive winston154 Alpha - Beta (Fedora 9 Only) 8 18th April 2008 04:31 PM
Unable to mount USB Flash drive yalgayon Hardware & Laptops 4 8th July 2007 09:04 PM
/boot partition on usb flash drive mdschiller Installation and Live Media 3 25th April 2006 01:38 PM
Would like to mount old Fedora boot drive as second hard drive. grndplane Using Fedora 20 5th February 2006 04:53 AM


Current GMT-time: 04:59 (Tuesday, 18-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat