Debian This forum is for the discussion of Debian Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-18-2004, 09:14 AM
|
#1
|
Member
Registered: Apr 2004
Location: Greensboro, NC, USA
Distribution: Debian
Posts: 134
Rep:
|
USB hard drive, how do I mount it?
I recently installed Debian Sid on my laptop. Everything works great, but there are a couple things left to be setup. I have a USB hard drive that I would like to use. How do I mount this device? I have used the mount command before, but what device do I mount (how do I tell how it is showing up)? How could I get the system to automatically mount the drive whenever I plug it up? Is there perhaps a package I could install to easily accomplish this?
|
|
|
10-18-2004, 09:23 AM
|
#2
|
Member
Registered: Aug 2004
Location: Canada
Distribution: SUSE 9.1 Pro and Debian Testing on Server
Posts: 469
Rep:
|
Your USB Hard drive should be SCSI. So if it is the first SCSI device on the system, it will be sda. So typing in this
mount /dev/sda1 /path/to/mount/point
should mount it
|
|
|
10-18-2004, 09:42 AM
|
#3
|
Senior Member
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249
Rep: 
|
You can give a user permission to mount it by adding the following line to /etc/fstab:
Quote:
/dev/sda1 /mnt/sda1 vfat rw,exec,user,noauto,umask=000 0 0
|
Then make the directory for it: As a regular user, you can mount it with: Of course, you can name the directory whatever you want if you don't like /mnt/sda1. Good luck!
|
|
|
10-18-2004, 10:13 AM
|
#4
|
Member
Registered: Apr 2004
Location: Greensboro, NC, USA
Distribution: Debian
Posts: 134
Original Poster
Rep:
|
Thanks for the super fast replies, I was able to mount the drive with no problems. Is there a way to make the system automatically mount the drive whenever I plug it in? I would like the drive to be plug and play so I can just plug and unplug and have it work.
Last edited by Oxyacetylene; 10-18-2004 at 10:55 AM.
|
|
|
10-18-2004, 04:51 PM
|
#5
|
Member
Registered: May 2004
Distribution: debian
Posts: 235
Rep:
|
a hotplug script maybe? something like that?
|
|
|
10-19-2004, 02:51 PM
|
#6
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
You can use autofs to have any device mount automatically when you access it and unmount after a set time of inactivity.
|
|
|
10-20-2004, 12:05 PM
|
#7
|
Member
Registered: Apr 2004
Location: Greensboro, NC, USA
Distribution: Debian
Posts: 134
Original Poster
Rep:
|
Thanks I will look into that. I wonder how SuSE does it? My home desktop is SuSE 9.1 Pro. When I hook the drive up it shows as USB-1238907590w7 or some such nonsense (serial # I guess). Then I just unplug it and the folder disappears.
|
|
|
10-20-2004, 04:42 PM
|
#8
|
Member
Registered: Apr 2004
Location: Greensboro, NC, USA
Distribution: Debian
Posts: 134
Original Poster
Rep:
|
I got autofs installed and configured so that it would automatically mount the drive for me when I inserted it and did an ls command, of any other way I wanted to access it. I still have to umount it before I can unplug it though....
Gotta be an easy way?
SuSE seems to do things differently?
http://portal.suse.com/sdb/en/2004/0...ldhotplug.html
Last edited by Oxyacetylene; 10-20-2004 at 04:56 PM.
|
|
|
10-21-2004, 01:09 PM
|
#9
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
autofs should automatically unmount the device after a set period of time. I don't remember what the default time is offhand (about 60 seconds?), but you can manually set it by adding "--timeout=5" (or however many seconds you want) to the entry in auto.master.
As for hotplug, I think that's job is to detect what kind of device has been plugged into the usb port, storage device, printer, scanner, whatnot, and load whatever driver modules are needed. It's not involved in the actual mounting of the device. There might be a way to do it, but I haven't heard of any myself.
|
|
|
10-21-2004, 02:02 PM
|
#10
|
Member
Registered: Apr 2004
Location: Greensboro, NC, USA
Distribution: Debian
Posts: 134
Original Poster
Rep:
|
I tried setting the timeout for autofs to 5 seconds, but even if I wait at least that long before unplugging it I can't access it when I remount it unless I umount it first. I'll have to play with it some more and see what I can do. autofs seems to be the best so far...
|
|
|
10-24-2004, 03:22 PM
|
#11
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
Hi. I have a belated heads-up for you. After reading the last post, I started playing around and I discovered that my autofs wasn't unmounting either. After a bit of googling I discovered that there's a bug in the recent versions of autofs. I downgraded mine to a previous version and now it's working again.
|
|
|
10-24-2004, 06:00 PM
|
#12
|
Member
Registered: Apr 2004
Location: Greensboro, NC, USA
Distribution: Debian
Posts: 134
Original Poster
Rep:
|
Thanks for the info! That makes sense. Now I know it wasn't just how I had mine set up or something
|
|
|
All times are GMT -5. The time now is 06:31 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|