PDA

View Full Version : How I Mounted My Usb Flash Drive In FC1


imdeemvp
2004-04-10, 03:34 PM CDT
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.
UPDATE: USB flash drives automount in fedora core 3 which means is plug and play.

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]$
:D

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:
/dev/sda1 /mnt/usbflash vfat noauto,users,rw,umask=0 0 0

NOTE ADDING RW will allow to read and write in the flash drive. HAVE FUN!!

Ug
2004-04-10, 03:35 PM CDT
I've moved this to the How-to forum.

Thoughts
2004-08-12, 10:08 PM CDT
thanks guys this was really helpful
:)
i hope to help you some day

imdeemvp
2004-08-12, 10:11 PM CDT
no problems......now you can add me some points so i get the moderators to MAKE A GOOD GUY AGAIN !!!! :D


right below the yahoo icon...

afilonov
2004-08-22, 03:58 PM CDT
I successfully tried Dazzle* 10-in-1 USB 2.0 reader with FC1.
Produced by Zio Corporation.
Device is recognized as: Vendor: Generic Model: STORAGE DEVICE Rev: 0128
USB: dev: 08:00

Just plugged it in (with Smartmedia card in it), and it worked. It created scsi device
/dev/sda1. Transfer speed is above 6 M/sec.


Later tried it with xD card, which uses the same lun. Mounted without problem,
transfer speed is even faster. Can't measure it, don't have big enough files.

Hints:

1. You need to have card in the device during boot. Otherwise you need to reload
module usb-storage when card is in the device.

2. You can mount card, unmount it and remove, later you can insert it and mount
again. You only need to have card in during boot or during reload of usb-scsi.

3. You can create fstab entry with option "users" and then any user will be able to
mount device.

I didn't try it with other media types, I'll post results once I try.

Varkk
2004-10-05, 09:18 PM CDT
As I said in this thread here (http://www.fedoraforum.org/forum/showthread.php?p=109348#post109348) if you add the appropriate line to your /etc/fstab it makes life a lot easier as you don't need to be root to mount/unmount it etc.

Since this info belongs in the howto I will add it again here, simply for completeness

/dev/sda1 /mnt/usb vfat noauto,user,umask=0 0 0

of course use your mount point and filesystem you use on your device.

imdeemvp
2004-10-05, 09:22 PM CDT
indeed, nice line for fstab......

EDITED.....after using your line, usb flash mounted wihout root command, thanks for your info. See attachment it actually mounts like my sony cam. It mounted under "computer" and on desktop.

BTW, i was left negative feedback on this post.

nerd_perfect
2004-10-25, 11:21 AM CDT
hi,
I have a lexar media 128 MB jump drive elite that I formated on Mac OSX at work (OSX journaled ). At home I used the method above (thank you mvp & varkk) on FC2 and when I substitute hfs as my filesystem type in my etc/fstab i recieve the error message:
"Unable to mount the selected volume. The volume is probably in a format that cannot be mounted. mount: wrong fs type, bad option, bad superblock on /dev/sda1, or too many mounted filesystems."
I see my mount point in the Computer folder, but not on the desktop. Am I correct in thinking hfs is the filesystem for me to use ? Which one of these "bad" things would be best to troubleshoot first, if not my filesystem? I plug the drive into a four port USB hub, but the only other thing plugged in right now is a logitech usb mouse so I am confused as to why i would have too many mounted filesystems.
Thanks in advance for any help anyone can throw my way.
NP

Varkk
2004-10-25, 04:15 PM CDT
Does the linux kernel support your filesystem? You may need to track down a driver module for it.

imdeemvp
2004-10-25, 07:35 PM CDT
that I formated on Mac OSX
what type of format? vfat, fat32...etc

nerd_perfect
2004-10-25, 09:35 PM CDT
i formated it on a new g5 with Mac OS X 10.3 (Panther) - the default, which i used displays itself as Mac OS Extended (Journaled), when i plug it in to the G5 and then get information under Utilities > Disk Utilities here is what i get.

Name : matt
Type : Volume

Disk Identifier : disk2s2
Mount Point : /Volumes/matt
File System : Mac OS Extended (Journaled)
Connection Bus : USB
IO Content : Apple_HFS
Writable : Yes
Capacity : 121.5 MB (127,410,176 Bytes)
Free Space : 79.7 MB (83,611,648 Bytes)
Used : 41.8 MB (43,798,528 Bytes)
Number of Files : 335
Number of Folders : 54
Permissions Enabled : No
Can Turn Permissions Off : Yes
Can Be Formatted : Yes
Bootable : Yes
Supports Journaling : Yes
Journaled : Yes
Disk Number : 2
Partition Number : 2


Varkk - I have the 2.6.8 kernel. From what I googled so far has just confused me more, if you could help me focus my search that would be great. Thanks again. :) NP

imdeemvp
2004-10-25, 09:41 PM CDT
File System : Mac OS Extended (Journaled)
i dont know if fc2 supports this type of format to be mounted...did you google?

nerd_perfect
2004-10-25, 09:54 PM CDT
when i browse my filesystem @ /lib/modules/2.6.8-1.521/kernel/fs/hfs there is a hfs.ko file doesnt this mean there is support already

imdeemvp
2004-10-25, 09:56 PM CDT
i have only used mine as vfat but i will check on that for you....because at this moment i am not sure.

imdeemvp
2004-10-26, 03:52 AM CDT
when i browse my filesystem @ /lib/modules/2.6.8-1.521/kernel/fs/hfs there is a hfs.ko file doesnt this mean there is support already
OK lets give a try since you have mac partitions it may be a little different so here is goes:
Become root:
[you@localhost]$su
Password: ******
Lets make a directory:
[root@localhost]# mkdir /mnt/macos
Let's mount it:
[root@localhost]# mount /dev/sda11 /mnt/macos -thfs
Edit fstab and add this line:
/dev/sda11 /mnt/macos hfs noauto,user,rw 0 0

If sda11does not work go to >System tools >Hardware browser and see how is listed under >Hard disks and use that.

Now I hope this help, so lets us know. For what I read this is how is done in YDL. (Yellow Dog Linux)

rhwood
2004-10-27, 05:23 AM CDT
Note that Mac OS X supports two different HFS formats--HFS and HFS+ (aka HFS Extended). The Linux HFS filesystem drivers only support HFS. So your HFS Extended (journaled) drive is NOT mountable in Linux.

If you feel like experimenting, try formatting your drive in UFS (Unix File System) in Mac OS X. That may work as well. Also the MS-DOS format is available and understood by both Linux and Mac OS X but does not store file permissions.

imdeemvp
2004-10-27, 01:28 PM CDT
thansk for your tip...i personally dont have experience with mac os partitions.....but doing some reading i thought we may give it a try.

cuchumino
2004-11-15, 10:59 AM CST
hey dude. very helpful thread.

Im just a bit curious how i can mount my calculator on fc2. I know that it gets recognized on fc, i just don't know how to mount it. here is what i get after a lsusb

Bus 005 Device 001: ID 0000:0000
Bus 004 Device 002: ID 0451:e001 Texas Instruments, Inc. GraphLink
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

any help is apprecieated

imdeemvp
2004-11-15, 07:04 PM CST
A calculator....now thats a chanllenge! I will look into it.

huh?
2004-11-16, 07:36 AM CST
I think this tread is what I'm looking for...but, being a real newbie, not sure..my main computer is a HP a250 n..with built in card readers..if I plug in the smart media card, a little blue lite comes on...but can't read it or find...so, I bought a USB smart media reader...now, I can transfer the camera photo's to the hd...but, must re-boot to see the smart media card..(not a big problem)..for the me, the real head banger was getting the photo's from the hd to a cd..is there some way I can access the smart media card directly from the built in card reader instead of the USB reader? like I said, a real newbie..any advise apprectiated..thanks..

cuchumino
2004-11-16, 07:30 PM CST
as a follow up, i have found a proggie that links the TI to the com p on linux. it called tilp, and it can be found on sourceforge... the thing is i can't get it to detect mine.....

im gonna keep trying and posting my experiences

imdeemvp
2004-11-17, 02:50 AM CST
I think this tread is what I'm looking for...but, being a real newbie, not sure..my main computer is a HP a250 n..with built in card readers..if I plug in the smart media card, a little blue lite comes on...but can't read it or find...so, I bought a USB smart media reader...now, I can transfer the camera photo's to the hd...but, must re-boot to see the smart media card..(not a big problem)..for the me, the real head banger was getting the photo's from the hd to a cd..is there some way I can access the smart media card directly from the built in card reader instead of the USB reader? like I said, a real newbie..any advise apprectiated..thanks..
You will have to spend some time trying to make it work but it has been done. I dont have one so I can not offer much help but this
HOW TO will. (http://www.cs.sfu.ca/~ggbaker/personal/cf-linux)

rswitzer
2004-11-21, 06:34 AM CST
thanks a lot!

Bob

imdeemvp
2004-11-21, 02:16 PM CST
thanks a lot!

Bob
Let me know if it works I have never done it. :p

leong
2004-11-29, 05:10 PM CST
thank you this site is very helpful. I can now try to create mount point for my usb 2.0 flash drive. Since I am new to linux and am taking classes at Boston's Veteran technical class this will help me greatly thank you

imdeemvp
2004-11-29, 10:20 PM CST
thank you this site is very helpful. I can now try to create mount point for my usb 2.0 flash drive. Since I am new to linux and am taking classes at Boston's Veteran technical class this will help me greatly thank you
No problem as long it helps you we at the forum are happy but in fc3 its plug and play.

DLH
2005-03-14, 01:09 PM CST
Thanks. All good until the command to mount. Keep getting, "No such file or directory." Even the hardware browser in Gnome recognizes the memory stick by name. Is my failure to mount a barometer of my ignorance? (Respond kindly.) :D

jacob
2005-03-22, 11:30 AM CST
Okay, does anyone here know how the default automount thing for usb storage devices works? It worked on my FC3 box with the default kernel, but when i recompiled in orer to get NTFS support (that was all option i changed), it doesn't work anymore. I really don't know where to start looking...

mustangfanatic
2005-06-22, 03:57 PM CDT
I'm using FC3 and my flash drive doesn't auto mount. Using the mount command you gave I can get the drive to mount as read-only. Adding the following line to my /etc/fstab doesn't do anything when I insert the drive:

/dev/sda1 /mnt/usbflash vfat noauto,user,umask=0 0 0

I have to open console and manually mount the drive each time I want to read it. And even then it's still read-only. I thought fstab was only executed when you logged in. Can anyone tell me how to get this to mount automatically when I plug it in?

imdeemvp
2005-06-22, 07:28 PM CDT
What brand or vendor is it?

pstrang
2005-06-22, 09:42 PM CDT
No one is covering the case if you already have a /dev/sda. I'm running FC2, kernel 2.11.7, and have a /dev/sda already (a real hard drive). I cannot determine what device (if any) my usb thumb drive is getting assigned to. :(

Any ideas? Hardware browser doesn't show anything, but /proc/bus/usb/device lists it.

mustangfanatic
2005-06-22, 11:28 PM CDT
What brand or vendor is it?

It's a 128mb stick from PNY

imdeemvp
2005-06-22, 11:47 PM CDT
You must be kidding me....I have a PNY I got at fry's and mounts nicely. Post your fstab.

mustangfanatic
2005-06-23, 12:17 AM CDT
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/hdc /media/cdrecorder auto
/dev/sda1 /mnt/usbflash vfat noauto,user,umask=0 0 0
pamconsole,exec,noauto,fscontext=system_u:object_r :removable_t,managed 0 0

Like I said, after inserting the drive nothing happens. Using "mount /dev/sda1 /mnt/usbflash" works but obviously as read-only.

pstrang
2005-06-23, 10:13 AM CDT
No one is covering the case if you already have a /dev/sda. I'm running FC2, kernel 2.11.7, and have a /dev/sda already (a real hard drive). I cannot determine what device (if any) my usb thumb drive is getting assigned to. :(

Any ideas? Hardware browser doesn't show anything, but /proc/bus/usb/device lists it.

It seems, though I can't check at the moment, that my kernel is trying the experimental USB handling. Using the 'ub' driver and assign devices like /dev/uba, ubb, etc.

So when I plug mine in, 'dmesg' says "ubb: ubb1" as if it's trying to assign the drive to ubb and the partition to ubb1. 'lsmod' tells me the ub driver is loaded. But the problem is I don't have devices /dev/uba /dev/ubb /dev/usb/ubb or anything else I can find.

How can one determine what device a peice of hardware is assigned to? Why don't the devices uba and ubb exist? Why aren't they created by the kernel?

Thanks.

Mr A.Countseuss
2005-06-25, 11:52 AM CDT
in
mount -t vfat /dev/sda1 /mnt/usbflash vfat noauto,user,umask=0 0 0
what does
noauto
user
umask-0 0 0
mean and do ?
thanks

imdeemvp
2005-06-25, 01:35 PM CDT
You can read about it here. (http://www.tuxfiles.org/linuxhelp/fstab.html)

Mr A.Countseuss
2005-06-26, 08:39 AM CDT
nice, thanks ;-)

Edit: It didn't say anything about umask=0 0 though ?

the_profiler
2005-07-12, 06:30 AM CDT
/dev/sda1 /media/usbflash vfat noauto,users,rw,umask=0 0 0

it successfully mounts and writes.. but after unmounting it (icon on desktop disappears), most of the time my machine crashes if im going to shutdown/reboot it.. BTW, im running Fedora Core 3 Kernel 2.6-11-1.14.

is there a way to prevent this? how? how can I check the programs/processes using the device? :confused: