How can I mount an ejected USB drive without unplugging it?

6,842

Solution 1

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

Solution 2

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"

Solution 3

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
Share:
6,842

Related videos on Youtube

Nuwan Thisara
Author by

Nuwan Thisara

I am staring at a screen

Updated on September 18, 2022

Comments

  • Nuwan Thisara
    Nuwan Thisara over 1 year

    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?

  • Nuwan Thisara
    Nuwan Thisara over 7 years
    Thank you for the answer, but What is this problem?
  • EdiD
    EdiD over 7 years
    @NuwanThisara its already unbinded. Can you bind it again and then mount ?
  • Nuwan Thisara
    Nuwan Thisara over 7 years
    same message... image
  • Nuwan Thisara
    Nuwan Thisara over 7 years
    Not successful. What is the wrong I did?
  • sudodus
    sudodus over 7 years
    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.