Mounting to usb key problem

Posted on 2005-05-02
Last Modified: 2010-04-20
Hi Guys, I want to copy somefiles from my usb stick to my linux PC. I used command:
mount /dev/sda1 /mnt/usb
This command works sometimes. When it doesn't work I have to change the sda1 to sdb1 or sdc1 or sdd1 so on. Until I ran out of the 26 alphabet letters. I don't know what to do except for reboot the machine, so that I can restart with letter 'a'. Question: do you know how to avoid this problem?

Question by:BooBoo1025
    LVL 4

    Expert Comment

    A possible problem is that you don't unmount the memory key before you unplug it.

    That way  /dev/sda1 is still mounted in mtab, so the next time you plug it in, the key maps to /dev/sdb1, then /dev/sdc1, etc.

    so always type umount /mnt/usb before unplugging it...

    Author Comment

    I did use the command: eject /mnt/usb
    I thought it would do the same, does it?
    LVL 4

    Accepted Solution

    eject /mnt/usb should work, as it _should_ include umount.

    Try this combination:
    mount /mnt/usb
    eject /mnt/usb

    df should show you the usb drive the first time but not the second time.
    If it's still there you have located the problem.

    eject is used to umount and spit out floppies and CDs, but umount is the opposite of mount so I prefer using that.

    Author Comment

    Since, I reboot my machine before your respond. Everything seem to work as normal now.
    I just tried the combination you suggested (with mount /dev/sda1 /mnt/usb instead) It showed the mount dir and when eject or umount, the mount dir disappear. The only different I see is that with eject, I have to physically unplug the stick before I can mount again. While with umount I don't have too. Anyway, thanks for the help. I will use the umount now to see if that problem occur again. :-)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now