Detect and mount devices
Solution 1
sudo lsusb
will tell you what USB devices Linux detects. Whether a USB storage device mounts, or is detected, are separate issues. sudo lsusb -v
will give verbose output, possibly more information than you want if the OS truly doesn't recognize the device.
Alternatively, you could compare the lists of devices in /dev
before and after plugging in the USB device. There are many ways to do it; I would probably just use:
ls -l /dev/* | wc -l
This will give you a number of recognized devices. Doing it before and after plugging in a device will tell you if the OS assigned the device in /dev/
.
Another option would be to look at what is happening in dmesg
when you plug in the USB device. dmesg
may tell you things like how a device failed.
If the USB device you are having trouble mounting, is on the lsusb list, then you can try mounting the device. At this point it would be good to know the filesystem type. sudo fdisk -l
will tell you the filesystem type, in the form of an ID. You may have to look up the ID number. There are lots of references online for that. Once you know the device listing, that is, /dev/hda1
and the filesystem type you can try to mount the device manualy with the mount
command.
sudo mount /dev/hda1 /home/user/Desktop/whereEver
You may have to make sure the location you want to mount the device on exists. If the OS recognizes the file system, then mount
might just work if the file system is not a native file system type; you may have to specify flags for mounting.
Post back your output from dmesg
(not all of it, only from around when the USB device is plugged in), and sudo lsusb
.
You may find Linux / UNIX: Device files helpful if trying to determine device type.
I am writing this assuming all your unrecognized devices are block type devices. There are many ways to approach this type of problem and many possible solutions. More specific information is needed to provide a solution.
There are also many GUI applications that can do the same thing. You might try looking for the plugged-in hardware in the "Disk Utility".
Solution 2
Manually Mount a USB Drive
A USB storage device plugged into the system usually mounts automatically, but if for some reasons it doesn't automount, it's possible to manually mount it with these steps.
- Press Ctrl+Alt+T to run Terminal.
- Enter
sudo mkdir /media/usb
to create a mount point called usb. - Enter
sudo fdisk -l
to look for the USB drive already plugged in, let's say the drive you want to mount is/dev/sdb1
. -
To mount a USB drive formatted with FAT16 or FAT32 system, enter:
sudo mount -t vfat /dev/sdb1 /media/usb -o uid=1000,gid=100,utf8,dmask=027,fmask=137
OR, To mount a USB drive formatted with NTFS system, enter:
sudo mount -t ntfs-3g /dev/sdb1 /media/usb
To unmount it, just enter sudo umount /media/usb
in the Terminal.
Solution 3
You can use one of the following commands to get information details about mounted devices: all different commands are used to getting different information in different manners, results ...
- dmesg
- sudo fdisk OR sudo fdisk -l
- sudo blkid
- lsblk
- mount
- lsusb
- usb-devices
- df -h
Solution 4
You only mention one storage device type - usb stick. Whenever usb devices don't mount correctly check that you don't have package called usbmount installed. If it is, remove it and life should be back to normal after that (you might need to restart).
Solution 5
I too had similar situation where my pen drive became invisible.
I solved it by using the Ubuntu utility program named Disks. Inside the disk tool, the pen drive was visible. I clicked on the gear icon inside disk(make sure that you have selected the correct device) and the used the format partition option with FAT (compatible with all systems and devices)
Related videos on Youtube
Calixte
Updated on September 18, 2022Comments
-
Calixte over 1 year
I upgraded Ubuntu today and everything works smooth except that Ubuntu doesn't detect any other storage devices. My
/
and/home
partitions work fine, but my other partitions are just not detected. I wouldn't mind, except the same problem goes with USB sticks.When I plug in a USB stick, the light goes on, but the computer detects nothing. Just to be clear, my mouse and keyboard are connected via USB and work fine.
Any idea how to solve this issue? None of the suggestions I found on the internet have any effect.
-
Admin about 11 yearsWhat's the output of
lsblk
? -
Admin about 11 yearsJust to make sure I got this, this is stand-alone Ubuntu not in virtual machine, right? Run
sudo fdisk -l
in terminal and post the output. -
Admin about 11 yearsHave you tried my answer Here
-
Admin about 11 yearsWhat is the output of df -h ? Is the USB device listed there?
-
Admin over 6 yearsIn case of latest portable HDDs they could be mounted again once they left not connected for few hours(>6h). Observed this in Transcend and Seagate 2TB Expansion
-
-
j0h about 11 yearswhy use dmesg instead of fdisk? because using fdisk assumes your hardware is working. If your hardware fails, fdisk wont tell you. but dmesg will.
-
Admin about 11 yearsNice program. When I run it together with udisks2 and plug-in my USB stick it complains that it's already mounted :-)
-
Tanel Mae about 11 yearsI once had it in my system and usb sticks were (if at all) mounted as root and so I could not write to them. Took quite a while to figure this one out.
-
Admin about 11 yearsI like this post a whole lot actually, lsblk looks like a great program. Too bad it doesnt come with ubuntu
-
Admin about 11 yearslsblk is in the util-linux package (at least in 12.04.2 LTS)
-
Admin over 6 yearsLooks like the link at the end mis-directs to an image.
-
Admin almost 6 yearsI can only access the drive with root, how can I add users?
-
Admin almost 6 yearsFound the answer: "chown -R yourUsernameHere:yourUsernameHere /media/usbstick/"
-
mralexandrelise over 3 yearsThanks so much for this one!