USB Drive won't mount

49,957

Ok, in a chat we haven't found a reason why PCManFM doesn't automount. So here we create an fstab entry for the stick:

  1. We need to create the folder for the stick and get the device id.
    Open a terminal. The folder can be created via

    sudo mkdir /media/mystick
    In addition I would make the user the owner and give him the right to read/write:
    sudo chown [user]:[group] /media/mystick
    sudo chmod +rw /media/mystick
  2. Now the fstab entry:

    • Install libblkid1 to see device specific information: sudo apt-get install libblkid1
    • Enter sudo blkid and look for the stick. The output could be:
      /dev/sda2: UUID="32a4b76f-246e-486e-8495-31b8a781fb4c" TYPE="swap" 
      /dev/sde1: LABEL="MAXELL" UUID="8D67-D560" TYPE="vfat" 
      
    • Then we create the fstab entry: sudo gedit /etc/fstab and append the line
      UUID=8D67-D560     /media/mystick   auto    rw,user,auto    0    0
      (and afterwards give a empty new line to avoid warnings): fstab entry

To mount the stick, open a terminal and type

mount /media/mystick
Because of the entry auto it should be mounted automatically if you remove and plug in the stick again.
Share:
49,957

Related videos on Youtube

RPiAwesomeness
Author by

RPiAwesomeness

Socials Old Blog: Sudo'd Youtube Channel: AEVES Tech Rigs Desktop - Custom built, you can see the specs/build stuff here ThinkPad T540p #Skills Advanced: googlefu python Intermediate: gimp building-pcs c++ golang Acceptable: c# bash zsh rust java Absolutely No Clue: perl windows

Updated on September 18, 2022

Comments

  • RPiAwesomeness
    RPiAwesomeness almost 2 years

    I have a Lexar 16GB USB stick and for some reason it won't mount. Ubuntu won't even recognize it.

    Info about it...nothing much. I used it once as a Backtrack LiveUSB and tried to use it once as an Ubuntu Studio 12.10 LiveUSB (ended up with a Kernel Panic). So now I am trying to just reformat it (easiest/fastest way to wipe everything off) and just use it as a regular USB drive or maybe use it as a Backtrack LiveUSB again.

    Is there any way I can force Ubuntu to recognize it? I know the port works as my USB mouse receiver works fine.

    I'm running Ubuntu 12.04 LTS (old hardware, I'll upgrade soonish) on a Toshiba Satellite A105.

    Edit:

    By using this guide I was able to force-mount it, but it still doesn't show up in Places (PCManFM because I use LXDE) like it usually does. Another strange thing, neither does the Windows NTFS partition I set to automount.

    It appears that my system has stopped auto-mounting things. The devices show up in their respective /media/deviceHere/ folders, but not under Places in PCManFM


    Wierdness.

    Oh well. However it was, I just had to delete/unmount anything with the name Lexar or External USB in the media folder and it is now recognized! Thanks anyways @manuel.

    Edit:
    Never mind, now it has disappeared again. If I want to access the /media/Lexar folder I have to be root and the Windows partition still doesn't show up.

    HELP!

    • RPiAwesomeness
      RPiAwesomeness about 11 years
      When would I run this?
    • Manuel
      Manuel about 11 years
      Please remove the stick, look whether the /media/[username] directory is empty and report other things here.
    • RPiAwesomeness
      RPiAwesomeness about 11 years
      Ok, will do. When do I run the dmesg | tail command?
    • Manuel
      Manuel about 11 years
      Then plug in the stick, open a terminal and execute dmesg | tail. Please post the output.
    • RPiAwesomeness
      RPiAwesomeness about 11 years
      ok...doing. After removing the stick it displays the Windows partition as a folder, but not in PCManFM Places. Nautilus sees it a displays it fine. Will now plug in and run the command
    • RPiAwesomeness
      RPiAwesomeness about 11 years
    • SDsolar
      SDsolar over 6 years
      Have you tried pmount? : askubuntu.com/questions/88523/… - instructions for installing it.
  • Manuel
    Manuel about 11 years
    I hope so. If not, tell me.
  • Kaz Wolfe
    Kaz Wolfe over 10 years
    Personally, I recommend you use UUIDs in the future. easier/faster/more reliable
  • SDsolar
    SDsolar over 6 years
    This is totally cool that you posted the results determined in chat, Manuel. Thank you for doing this.
  • NZ Dev
    NZ Dev over 4 years
    What happens if the USB is not present on System Boot? Wont boot take a long time?