command line; how identify which /dev/??? a device is on
As root, when I plug in a USB device, like my ebook reader or mp3 player, how do I determine which /dev/??? it is on in order to mount it?
I checked the output of dmesg immediately after inserting the device (below), but am none the wiser. Code:
[ 5499.914031] usb 1-3: new high-speed USB device number 6 using ehci_hcd |
I use
Code:
fdisk -l |
Code:
df -hT |
It depends. What is the make/model of your ebook reader? Post the output of the command lsusb.
Some devices use MTP (Media Transfer Protocol) and therefore are not recognised as mass storage devices. Applications to read/write to MTP require the libmtp package and there are many depending on if it is a MP3 player or digital camera etc as well as a fuse filesystem i.e. mtpfs that allows for mounting. |
habamaru
Code:
fdisk -l Habitual Code:
df -hT michaelk The ereader is a StoryHD by iriver. Following is the output of lsusb, as it does not show there I assume it is an MTP device; except that my San Disk mp3 player does show and it seems to be am mtp device. libmtp is not installed, but there has to be another method because the file manager Dolphin will recognize the device and mount it Code:
/home/g # lsusb Code:
Bus 001 Device 020: ID 1006:4034 iRiver, Ltd. |
Do your plug-in devices have filesystems with volume labels? I recommend doing this - give them labels, like EBOOK or MP3. Then you can just use commands like this:
Code:
$ udisksctl mount -b /dev/disk/by-label/EBOOK (Yes, this is a variation on the command I posted to your other question, where we knew the device name but not the volume label or mount point. The above is for when we know the volume label, but not the device name. -b is short for --block-device) |
i run sudo tail -f /var/log/messages (hit enter a few times to show some blank lines) then plug in my devices. the output of messages should contain info regarding those devices.
|
Quote:
Code:
/home/g/ToInstall/1.1-release # blkid |
UUIDs are OK for things like internal hard disks, where you want to be sure you are talking about the right device, and you put them in fstab or whatever and never touch them. But volume labels are much handier for portable plug-in things.
Quote:
|
Quote:
|
Quote:
As it happens, blkid also shows it even though the device is not mounted, as long as the device is turned on before I plug it into the computer. Seems that was the entirety of the problem. I can mount the thing either by label or by UUID, but udisksctl has a problem. Code:
/home/g # blkid |
Quote:
|
All times are GMT -5. The time now is 08:45 AM. |