Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto load USB drive in FC2

Status
Not open for further replies.

Scanner

MIS
Apr 14, 1999
109
0
0
US
I have a Sandisk Cruzer USB drive that I would like to have autoload when I plug it in. For the record, I'm using the latest FC2 distro with all of the patches. It may be a case of needing to upgrade to FC3/4, but I would like to try with FC2 first.

Up until now, I've been going through a lot of hoops to load it by doing the following:

1. Adding an entry in /etc/fstab for the flash drive that reads...

/dev/cruzer /mnt/cruzer auto noauto,owner,kudzu,r 0 0

2. Typing "mount /mnt/cruzer" from the command line su- as root.

There has to be a simpler way to do this automatically. I can't even get the system to mount the drive if plugged in when initially booted. The Hardware Browser shows it correctly, but I don't have physical access to it until I mount it.

Thanks in advance.
 
You set the filestem mount parameter to noauto. This means the kernel will no mount it for you when you plug it in. Change it to auto and see if it works.


--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
zeland said:
You set the filestem mount parameter to noauto. This means the kernel will no mount it for you when you plug it in.
Not quite. If you read the mount man page, you'll see that the noauto option actually means that the filesystem must be explicitly mounted, i.e. it is excluded from auto-mounting at boot via a call to "mount -a". Changing the parameter to "auto" will cause the drive to be mounted if it is plugged in when the system boots, but if it is plugged in later, it will do nothing.

As for auto-mounting a USB storage device when it is plugged in, there are a couple of ways to do it on modern Linux systems. One way is to use a udev device script, like the one described here. The recommended way is to use the D-BUS/HAL/Volume manager combination, as it is much more flexible. HAL and D-BUS are often provided as part of the base desktop installation, and if they aren't it's usually too much trouble to try to add them. Recent versions of GNOME come with a volume manager, but a light-weight, desktop-independent alternative is IVMan. It's a bit tough to configure, but it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top