Find the answer to your Linux question:
Results 1 to 10 of 10
Like Tree1Likes
  • 1 Post By imdeemvp
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie imdeemvp's Avatar
    Join Date
    Sep 2004
    Location
    California
    Posts
    225

    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.
    sanjay05668 likes this.

  2. #2
    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

  3. #3
    Just Joined!
    Join Date
    Nov 2004
    Posts
    4

    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.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Dec 2004
    Posts
    5

    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.

  6. #5
    Linux Newbie imdeemvp's Avatar
    Join Date
    Sep 2004
    Location
    California
    Posts
    225
    Yes, you alway have to un-mount your device.

  7. #6
    xg
    xg is offline
    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

  8. #7
    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.

  9. #8
    Linux Newbie imdeemvp's Avatar
    Join Date
    Sep 2004
    Location
    California
    Posts
    225
    what partition format is this hd?

  10. #9
    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

  11. #10
    xg
    xg is offline
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •