Mounting a USB drive

Forum rules
Before you post please read this
Post Reply
User avatar
cogier
Level 3
Level 3
Posts: 177
Joined: Sat Mar 31, 2012 9:51 am
Location: Guernsey

Mounting a USB drive

Post by cogier » Tue Mar 20, 2018 12:36 pm

I can insert a USB thumb drive and Nemo opens up and all is well. I can 'Eject' the drive and it is no longer showing. So far so good.

I would like to remount the drive from the command line but I can't find a way to do it. If I type lsblk -a I can see the drive and it is not mounted.

Image

So I create a folder to mount it in and using sudo mount /dev/sdd ~/media I get mount: no medium found on /dev/sdd

I can unplug it and plug it in again and Nemo opens it up with no fuss. I have searched the web but can find no solution.

I am using Mint 18.3 Cinnamon.

Any pointers greatly received.

User avatar
WharfRat
Level 20
Level 20
Posts: 11712
Joined: Thu Apr 07, 2011 8:15 pm

Re: Mounting a USB drive

Post by WharfRat » Tue Mar 20, 2018 12:56 pm

/dev/sdd is a block device and mount mounts partitions.

If there was a partition on that device it would be /dev/sdd1 as you can see with /dev/sdc.
ImageImage

User avatar
cogier
Level 3
Level 3
Posts: 177
Joined: Sat Mar 31, 2012 9:51 am
Location: Guernsey

Re: Mounting a USB drive

Post by cogier » Wed Mar 21, 2018 10:32 am

Hi Warfrat and thanks for the reply.

I had tried you recommendation but unfortunately I get the following error. mount: special device /dev/sdd1 does not exist

I have reproduced this issue on several computers.

1/. Insert USB drive - Nemo opens
2/. Eject the USB drive from Nemo - File>Eject
3/. Try in Terminal to mount the USB drive - This is where I fail.

User avatar
Flemur
Level 16
Level 16
Posts: 6201
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Mounting a USB drive

Post by Flemur » Wed Mar 21, 2018 11:17 am

I was wondering the same thing, and it looks like the process is a bit of a kludge:
https://unix.stackexchange.com/question ... usb-device

Simpler:
EDIT: I just tried this and....it didn't work. Shocking, I know.
http://www.upubuntu.com/2011/09/how-to- ... thout.html

Code: Select all

eject /dev/sdb
sleep 1
eject -t /dev/sdb
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

User avatar
cogier
Level 3
Level 3
Posts: 177
Joined: Sat Mar 31, 2012 9:51 am
Location: Guernsey

Re: Mounting a USB drive

Post by cogier » Thu Mar 22, 2018 12:49 pm

Hi Flemur and thanks for the reply. I had a look at the page you pointed to but I don't understand it.

I have just done a test on Manjaro and I get exactly the same results. This seems to be a Linux 'thing'. Perhaps I am trying to 'mount' the drive the wrong way.

User avatar
WharfRat
Level 20
Level 20
Posts: 11712
Joined: Thu Apr 07, 2011 8:15 pm

Re: Mounting a USB drive

Post by WharfRat » Thu Mar 22, 2018 1:02 pm

cogier wrote:
Thu Mar 22, 2018 12:49 pm
This seems to be a Linux 'thing'. Perhaps I am trying to 'mount' the drive the wrong way.
The problem appears to be that you haven't created a partition and subsequently formatted it.

That's the reason your lsblk screen shot doesn't show an sdd1 partition for sdd like sdc does.

How about pasting a screen shot of gparted depicting that USB thumb drive.
ImageImage

Mute Ant
Level 13
Level 13
Posts: 4926
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: Mounting a USB drive

Post by Mute Ant » Thu Mar 22, 2018 3:23 pm

A partitionless drive (aka SuperFloppy) is not a problem. What you are seeing is the result of Safely Remove. When you eject a USB device, Linux unmounts the file-system and switches off the power. So the device can't respond to software any more.

User avatar
cogier
Level 3
Level 3
Posts: 177
Joined: Sat Mar 31, 2012 9:51 am
Location: Guernsey

Re: Mounting a USB drive

Post by cogier » Sat Mar 24, 2018 10:09 am

Thanks for the replies. There are a few images that I can show that my help, please have a look here http://www.cogier.com/usbdrive/

How does the system spot the drive when it is inserted?

User avatar
WharfRat
Level 20
Level 20
Posts: 11712
Joined: Thu Apr 07, 2011 8:15 pm

Re: Mounting a USB drive

Post by WharfRat » Sat Mar 24, 2018 10:56 am

cogier wrote:
Sat Mar 24, 2018 10:09 am
Thanks for the replies. There are a few images that I can show that my help, please have a look here http://www.cogier.com/usbdrive/

How does the system spot the drive when it is inserted?
That's handled by udev a /dev/ and hotplug management daemon. It would be interesting to see what it is seeing when you plug that stick in.

Before inserting the stick run udevadm monitor --udev then plug it in - you should get some activity as it detects the device.

Paste back the results.

Also paste back sudo blkid after udevadm.
ImageImage

User avatar
cogier
Level 3
Level 3
Posts: 177
Joined: Sat Mar 31, 2012 9:51 am
Location: Guernsey

Re: Mounting a USB drive

Post by cogier » Mon Mar 26, 2018 10:38 am

Here are the results: -

Image

A larger picture has been added to the bottom of this page http://www.cogier.com/usbdrive/

User avatar
WharfRat
Level 20
Level 20
Posts: 11712
Joined: Thu Apr 07, 2011 8:15 pm

Re: Mounting a USB drive

Post by WharfRat » Mon Mar 26, 2018 10:55 am

That looks fine, it detected it as a storage device with two partitions and assigned it to sdd and the partitions to sdd1 and sdd2.
ImageImage

User avatar
cogier
Level 3
Level 3
Posts: 177
Joined: Sat Mar 31, 2012 9:51 am
Location: Guernsey

Re: Mounting a USB drive

Post by cogier » Thu Mar 29, 2018 7:47 am

Thanks for the replies but I respectfully refer to my original question.
I can insert a USB thumb drive and Nemo opens up and all is well. I can 'Eject' the drive and it is no longer showing. So far so good.

I would like to remount the drive from the command line but I can't find a way to do it.

User avatar
WharfRat
Level 20
Level 20
Posts: 11712
Joined: Thu Apr 07, 2011 8:15 pm

Re: Mounting a USB drive

Post by WharfRat » Thu Mar 29, 2018 9:04 am

You larger attachment shows those partition with sudo blkid.

Can you mount sdd2 to /mnt with sudo mount /dev/sdd2 /mnt and check the content with ls -lh /mnt

Then see if Nemo also lists the content of /mnt.
ImageImage

User avatar
cogier
Level 3
Level 3
Posts: 177
Joined: Sat Mar 31, 2012 9:51 am
Location: Guernsey

Re: Mounting a USB drive

Post by cogier » Mon Apr 02, 2018 11:13 am

I have tried this on USB2 and 3 ports. I have used SD Cards, and different USB drives and once the item has been 'Ejected' it can be seen with 'lsblk' but attempts to mount the drive are always mount: special device sdd2 does not exist

Post Reply

Return to “Mounting Partitions”