LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2005, 01:10 PM   #1
theMayor
LQ Newbie
 
Registered: Mar 2005
Location: Denver, CO
Posts: 19

Rep: Reputation: 0
How to mount a thumbdrive/flashdrive


After about 4 hours of fiddling around with the thumbdrive I actually figured it out. I'm going to post my discoveries here in hopes of maybe helping somebody else who is just as a as I am can figure it out. The man pages are pretty pointless becuase they talk in ways a new person to linux cannot understand, and the tutorials assume your not as stupid as the average consumer such as myself.

/*
theMayor
April 2nd, 2005
Distro: RedHat 9
How to Mount a thumbdrive
*Must be root in order to do this
*/

Plug in the thumbdrive! Now type in on the command line

"cd /mnt/"

If one were to do an command named "ls" then you'd see the floopy and cdrom most likley. Make a new folder(whatever you wish to call it) where the files will appear. For this example I used a folder named "thumbdrive".

"mkdir thumbdrive"

After that creates the folder called "thumbdrive" were now ready for the difficult part. First thing is linux I noticed mounts your flash/thumb/jump drive usually in the device sda1. The only way that I've noticed how to double check this information is by running a hardware manager type program that comes pre-installed with linux in KDE or GNOME. This program is located at:

Red Hat Icon >> System Tools >> Hardware Browser

This should tell you for certain under the "hard drive" tabs where the device is located. If you look towards the bottom of the Hardware Browser, look in the size column and find the device that corosponds.

Now back in the command window for good measure make sure were in the same directory we just made our thumbdrive folder so type in:

"cd /mnt/"

now we are ready to "mount" the device and in doing so will actually use the thumbdrive folder.

"mount /dev/sda1 thumbdrive"

Ok, so what I've gathered so far from other tutorials is basically this. That line is saying "Mount the contents that are located on the device '/dev/sda1' and put the contents in thumbdrive". The only thing wrong with that logic is once the drive is shutoff it's done for. You'd have to repeat the process again in the future if you wish to remount(aside from making the thumbdrive folder).
 
Old 04-02-2005, 01:57 PM   #2
calcon
Member
 
Registered: Mar 2005
Location: somewhere over the rainbow theres a place....
Distribution: Ubuntu Dapper and Arch
Posts: 121

Rep: Reputation: 15
There is a pretty non-distrobution-specific way to do this:
Edit your /etc/fstab and add this at the bottom:
Code:
/dev/sda1  /mnt/usb  vfat  defaults,rw,noauto,users,sync  0 0
Then what you want to do is type:
Code:
mkdir /mnt/usb
Now when you want to use it, plug it in then type:
Code:
mount /mnt/usb
Then before you unplug it type:
Code:
umount /mnt/usb
And yes, it is really "umount" not unmount!
Edit your /etc/fstab and add this at the bottom:
Code:
/dev/sda1  /mnt/usb  vfat  defaults,rw,noauto,users,sync  0 0
Then what you want to do is type:
Code:
mkdir /mnt/usb
Now when you want to use it, plug it in then type:
Code:
mount /mnt/usb
Then before you unplug it type:
Code:
umount /mnt/usb
And yes, it is really "umount" not unmount!




But if you don't can't get sda1 to work, try using sda or sdaX replacing X with a number.

I put two scripts on my desktop to mount and unmount the drive:
mount:
Code:
#!/bin/bash
mount /mnt/usb
unmount:
Code:
#!/bin/bash
umount /mnt/usb

calcon
 
Old 04-02-2005, 02:57 PM   #3
theMayor
LQ Newbie
 
Registered: Mar 2005
Location: Denver, CO
Posts: 19

Original Poster
Rep: Reputation: 0
Hey,
Thanks for the response and the pointers. My only question is where were you during my 4 hours :-P

thanks,
-theMayor
 
Old 04-03-2005, 01:32 PM   #4
calcon
Member
 
Registered: Mar 2005
Location: somewhere over the rainbow theres a place....
Distribution: Ubuntu Dapper and Arch
Posts: 121

Rep: Reputation: 15
You're welcome.

Huh? What do you mean where was I during your four hours?

calcon
 
Old 04-03-2005, 04:56 PM   #5
theMayor
LQ Newbie
 
Registered: Mar 2005
Location: Denver, CO
Posts: 19

Original Poster
Rep: Reputation: 0
Re: How to mount a thumbdrive/flashdrive

Quote:
Originally posted by theMayor
[B]After about 4 hours of fiddling around with the thumbdrive I actually figured it out...
It was in my original post ...

-theMayor
 
Old 04-03-2005, 06:45 PM   #6
calcon
Member
 
Registered: Mar 2005
Location: somewhere over the rainbow theres a place....
Distribution: Ubuntu Dapper and Arch
Posts: 121

Rep: Reputation: 15
OH!

Had you posted on this site somewhere asking how?

If you did I may not have seen it or it may have been when I was on vacation.

calcon
 
Old 04-04-2005, 12:21 PM   #7
uzairkhan
Member
 
Registered: Apr 2005
Location: Islamabad, Pakistan
Distribution: Mandrake 10.0 & Window XP professional
Posts: 32

Rep: Reputation: 15
create an Alias

hi,

i just started to work with linux, and by the way, thanks for the tip on mounting the flash disk. i just want to add that wont it be better to create a simple alias to mount and umount the drive.

simply edit the bashrc file and add the alias definition (if u are using some other script same can be done there). In this way, all users of the system would be able to mount and umount the drives.
regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can not mount usb flashdrive walterbyrd Debian 14 03-18-2006 01:53 PM
How do you mount a USB thumbdrive in RH9? dsschanze Linux - Hardware 6 12-29-2005 09:42 PM
How to mount CDROM and Thumbdrive TigerLinux Linux - Newbie 4 09-30-2005 07:44 PM
usb thumbdrive. can't mount? not listed?! FLOODS Linux - Hardware 12 08-06-2004 12:39 AM
how to mount a sony usb thumbdrive? lohdavid Mandriva 1 08-28-2003 10:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration