9

I am on an Ubuntu 16.04.1 LTS system. I use udisksctl command to mount and unmount my USB flash drive, but I sometimes eject it in nautilus. I can see the device in Disks utility even after ejecting.

I searched the site and found the question How do I mount ejected external USB flash Via terminal, but I could not find an answer to mount an ejected USB drive in the answers of that question.

Can you please explain to me how to mount an ejected USB drive without unplugging it?

3 Answers 3

8

The following will eject the USB device.

sudo eject /dev/sde

The following will mount the USB device without unplugging it.

sudo eject -t /dev/sde

Reference: http://www.upubuntu.com/2011/09/how-to-remount-usb-stick-without.html

6

Check your usb flash name with:

lsusb

my sandisk example:

Bus 003 Device 005: ID 0781:540e SanDisk Corp. Cruzer Contour Flash Drive

Now i know my sandisk is on bus 003 and device 005
Then you have to check your usb bus and port number with:

lsusb -t
Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 5: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M

Now i know that bus 3 device 5 is on port 5 so we can go to :

/sys/bus/usb/drivers/usb

and disable port:

sudo tee unbind <<< "3-5" 

or enable port:

sudo tee bind <<< "3-5"
5
  • 1
    Thank you for the answer, but What is this problem? Commented Dec 11, 2016 at 16:27
  • @NuwanThisara its already unbinded. Can you bind it again and then mount ?
    – EdiD
    Commented Dec 12, 2016 at 16:23
  • 1
    same message... image Commented Dec 13, 2016 at 1:46
  • Not successful. What is the wrong I did? Commented Dec 21, 2016 at 11:36
  • There is a work-around. If you unmount a USB drive with umount instead of eject, it will not be powered off, and it is available to be mounted again with mount.
    – sudodus
    Commented Dec 21, 2016 at 11:44
1

When I inserted my usb drive I got this:

ls /dev/sdd*                                                                                                              

/dev/sdd /dev/sdd1

I then ejected it

sudo eject /dev/sdd
ls /dev/sdd*

/dev/sdd

I then unejected it as per this answer

sudo eject -t /dev/sdd
ls /dev/sdd*

/dev/sdd /dev/sdd1

You might want to check the disk by using fdisk

sudo fdisk /dev/sdd -l

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .