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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-17-2004, 08:25 AM
|
#1
|
|
Member
Registered: Nov 2004
Location: ~
Distribution: Debian
Posts: 145
Rep:
|
How to mount usb stick
On Debian sarge, kernel 2.6.8 with hotplug,
how do I mount my usb?
Is it automatically mounted and where?
If not, is there a way for me to have it automatically mounted?
I need access to my usb stick (disc-on-key) badly
Thanks.
|
|
|
|
11-17-2004, 10:16 AM
|
#2
|
|
Member
Registered: Oct 2004
Location: Tartu, Århus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 588
Rep:
|
Hi,
1) make sure you have a line like
/dev/sda1 /mnt/usb vfat noauto,user,fmask=133,dmask=022 0 0
in your /etc/fstab.
2) mount it:
$ mount /mnt/usb
3) If it is not formatted, use
# fdisk /dev/hda
delete what is there before and make a new partition. Format it
# mkfs -t vfat /dev/hda1
(I am not completely sure about command syntax, check it).
best,
Ott
|
|
|
|
11-17-2004, 02:10 PM
|
#3
|
|
Member
Registered: Nov 2004
Location: ~
Distribution: Debian
Posts: 145
Original Poster
Rep:
|
Thanks 
|
|
|
|
11-18-2004, 05:37 AM
|
#4
|
|
Member
Registered: Nov 2004
Location: ~
Distribution: Debian
Posts: 145
Original Poster
Rep:
|
OK, I can now mount usb successfully, but how do I get it to auto-detect my disc-on-key and mount it automatically when plugged in?
in fstab I've changed noauto to auto in the usb line, but this doesn't seems to do the trick...
|
|
|
|
11-18-2004, 11:01 AM
|
#5
|
|
Member
Registered: Jun 2004
Location: Germany
Distribution: Debian (testing)
Posts: 276
Rep:
|
Quote:
Originally posted by yotamk
OK, I can now mount usb successfully, but how do I get it to auto-detect my disc-on-key and mount it automatically when plugged in?
in fstab I've changed noauto to auto in the usb line, but this doesn't seems to do the trick...
|
If you changed fstab, then it should do the trick, but in order for fstab settings to take effect you have to restart the computer.
My fstab looks like this:
/dev/sda1 /mnt/usb auto rw,user,noauto 0 0
and the stick gets mounted when I open the /mnt/usb folder (just like a floppy).
You probably don't want to change the noauto to auto, because that will try to mount on boot (I think)--you don't want that. Just put a line like mine or the other one above and the stick will mount when you open the folder.
I'm I'm using Fluxbox and Rox-filer on Debian Sarge with 2.6.8, so this might make some difference.
|
|
|
|
11-19-2004, 11:51 AM
|
#6
|
|
Senior Member
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597
Rep:
|
Quote:
My fstab looks like this:
/dev/sda1 /mnt/usb auto rw,user,noauto 0 0
and the stick gets mounted when I open the /mnt/usb folder (just like a floppy).
|
I haven't used Rox-filer but it's a neat trick if it can mount filesystems when accessing folders that are mentioned in fstab. However, as I see it, the problem is not as much in the mounting of devices as it is in unmounting them. You see, the Linux kernel doesn't necessarily write changes immediately when you move files between hard disk and removable media, so if you remove your floppy or usb-stick before properly unmounting them you may lose data.
Personally I'm not into automounting. I've installed xvmount and assigned an appicon (that is, a quick launch icon) for it in WindowMaker. (xvmount is a GUI tool that allows you to mount devices mentioned in fstab with one click and unmount them with another click.) Now, whenever I need to access a cdrom, floppy, or usb-stick, I launch xvmount and click on the xvmount button for the device I wish to mount. Then I leave xvmount open in the background so that I can tell with just one look if there are any unmounted devices. With automount systems you can never be sure if they work as expected but using xvmount I can make sure that all data has been transferred before I remove cdrom/floppy/usb-stick.
An alternative way would be to use MToolsFM (provided you use vfat formatted floppies/usb-sticks), as I describe in this thread: http://www.linuxquestions.org/questi...hreadid=250852
Using MToolsFM you don't need to mount devices and, hence, there's no fear of losing data when you remove floppy or usb-stick.
Last edited by Dead Parrot; 11-19-2004 at 11:21 PM.
|
|
|
|
11-21-2004, 12:46 AM
|
#7
|
|
Member
Registered: Nov 2004
Location: ~
Distribution: Debian
Posts: 145
Original Poster
Rep:
|
Thanks, I'll check it...
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:32 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
|
|