Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Linux Resources > Linux Tutorials, HOWTO's & Reference Material > How to mount usb flash drives in linux.

Forgot Password?
 Linux Tutorials, HOWTO's & Reference Material   A useful collection of tutorials, guides and reviews compiled here for easy reference purposes.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
 
Thread Tools Display Modes
Old 10-23-2004   #1 (permalink)
Linux Newbie
 
imdeemvp's Avatar
 
Join Date: Sep 2004
Location: California
Posts: 225
Send a message via Yahoo to imdeemvp
How to mount usb flash drives in linux.

NOTE: if you read the tutorial and are still experiencing difficulties and would like help, you are asked to start a new topic on the forums.
Please do NOT reply to this thread to ask a technical question. Replies to THIS thread should be corrections and enhancements on the tutorial/howto only.
Thank you in advance for your co-operation.
LinuxForums.org

------------------------------------------


I hope this will help any one mount their usb flash key device, everything I did as “root”. Some devices will be supported and some are not. You can check on www.linuxhardware.net to see if device supported.

First plug your usb card reader and to make sure your device was detected go to System Tools > Hardware Browser > enter root password and it will display your hardware information then go to > Hard Drives and it should be listed under /dev/sda.

Open your favorite terminal....btw this works in gnome and kde.

[imdeemvp@localhost imdeemvp]$ cd /mnt/ <-as user cd yourself to the mnt folder and become root to create directory
[imdeemvp@localhost mnt]$ su
Password:
[root@localhost mnt]# mkdir usbflash <- this created a directory in the mnt folder

[root@localhost mnt]# ls /mnt/ <-this command listed all my directories the mnt folder
cdrom cdrom1 floppy usbflash

[root@localhost mnt]# mount /dev/sda1 /mnt/usbflash <-this is the command to mount flash card reader

[root@localhost mnt]# ls usbflash <-this listed all the info in my usb flash card and this was the output:
bootex.log dns.bmp games and keys LinuxDocs01.21.04 pc's
dns2.bmp Documents LinuxDistributions_eBay my pics programs

then i just copied this to my home folder and i was done!

[root@localhost mnt]# umount /dev/sda1 /mnt/usbflash <-this unmounted my usb flash card
umount: /dev/sda1: not mounted
[root@localhost mnt]# exit
[imdeemvp@localhost mnt]$


THIS ALSO WORKED UNDER Mandrake 9.1, 9.2, and 10 official.

in terminal type as root: gedit /etc/fstab and NOW YOU CAN ADD THIS LINE TO FSTAB to auto mount it:

Code:
/dev/sda1 /mnt/usbflash vfat noauto,users,rw,umask=0 0 0


Adding "rw" allows to read and write in the usb flash drive. HAVE FUN!!
UPDATED 11.28.04
Please note that under FC3 it automounts in your desktop. It is plug and play.
imdeemvp is offline  


Old 11-18-2004   #2 (permalink)
Linux User
 
sheds's Avatar
 
Join Date: Nov 2004
Location: ??????????
Posts: 342
Do i have to reboot the system so the rw line becomes active and i can start reading/writing on my usb stick drive?

No you don't, i just found out. :o
sheds is offline  
Old 11-22-2004   #3 (permalink)
Just Joined!
 
Join Date: Nov 2004
Posts: 1
Re: How to mount usb flash drives in linux.

Thanks. This is just what I needed. I am in the process of updating two machines. One is a piece of crap due to it having MSWacho on it (I have to keep it due to my accounting and tax software is on it). I do no have it on the net anymore. I got tired of the patches and whatnotw.

My other machine is a Redhat desktop. I use it to occassionaly surf, and now I am about to upgrade to the next kernel (2.6) from 2.4.

There are some files currently on the Redhat that I downloaded to fix a printer driver on the XP. I can use my flash drive to transfer the files before the upgrade.

Thanks.
payton1961 is offline  
Old 12-24-2004   #4 (permalink)
Just Joined!
 
Join Date: Dec 2004
Posts: 7
Removing USB device

When using the usb mass storage device, is it necessary to "stop" the device before removing it as is required in Windows? I am using Suse 9.1. Thanks.
meezike is offline  
Old 12-25-2004   #5 (permalink)
Linux Newbie
 
imdeemvp's Avatar
 
Join Date: Sep 2004
Location: California
Posts: 225
Send a message via Yahoo to imdeemvp
Yes, you alway have to un-mount your device.
imdeemvp is offline  
Old 01-05-2005   #6 (permalink)
xg
Just Joined!
 
Join Date: Jan 2005
Posts: 3
Re: How to mount usb flash drives in linux.

Hi,

I found this this very useful

one thing I would like to know:

is it possible that a normal user can write to the usb memory stick or flash drive?

I added one line in /etc/fstab

/dev/sda1 /mnt/usbflash vfat noauto,users,rw,umask=0 0 0

rebooted the machine (RH9), then logined as normal user.

when I plugged the usbflash, it did not automount,
after "mount /dev/sda1 /mnt/usdflash" , I was not able to write into usbflash unless I use su.

the others thing is:
is the mounting method the same for FC3?

I have a PC with FC3test3, where I can copy files from the usbflash but am not able to write into the usbflash even if I logged in as root.

Thanks



Cheers
xg is offline  
Old 01-18-2005   #7 (permalink)
Just Joined!
 
Join Date: Nov 2004
Posts: 4
mounting of USB hard drive

I have installed FC3 on AMD 1.66 Ghz.I want to mount the USB Hard Drive(Western Digital) to take the backup of the files of the linux system.

I check the hardware browser the USB hard drive is not shown by the hw browser.What can be the problem and what should i do to resolve the issue.

Please help.

Ankush Grover
System Administrator
Sunup Software India Pvt Ltd.
ankush174 is offline  
Old 01-18-2005   #8 (permalink)
Linux Newbie
 
imdeemvp's Avatar
 
Join Date: Sep 2004
Location: California
Posts: 225
Send a message via Yahoo to imdeemvp
what partition format is this hd?
imdeemvp is offline  
Old 01-18-2005   #9 (permalink)
Just Joined!
 
Join Date: Nov 2004
Posts: 4
successfully mounting the USB hard drive

I was able to mount and copy the data into the USB drive.

I upgraded my kernel to 2.6.10.-1.741 and also upgraded the hotplug with the latest version.
After upgrading the hard drive was detected by the system.I created the FAt32 partition on it and was able to copy the data from linux machine.

I think you should upgrade to the latest kernel and also upgrade the hotplug module.

Thanks to everyone

Regards

Ankush Grover
System Administrator
Sunup Software India Pvt Ltd
ankush174 is offline  
Old 01-18-2005   #10 (permalink)
xg
Just Joined!
 
Join Date: Jan 2005
Posts: 3
Hi,

After I edited the /etc/fstab and replaced the original one( set by FC3) with

"dev/sda1 /mnt/usbflash vfat noauto,users,rw,umask=0 0 0"

all seem to work now. read/write the USB driver.


Thanks :o
xg is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 03:54 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2