LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   device is listed with wrong mount point (https://www.linuxquestions.org/questions/linux-general-1/device-is-listed-with-wrong-mount-point-4175486848/)

newbiesforever 12-04-2013 11:23 AM

device is listed with wrong mount point
 
I have been unable to mount a certain USB device. Eventually, while trying everything to mount it, I saw what's surely the problem: the device is /dev/sdc1 but the system says its mount point is /dev/sdb1, which another USB device is using. Actually, I just tried to open that device and can't open that either. Except in a file manager running as root.

I have no idea how this would have happened, unless perhaps I confused the system by plugging these USB devices into different ports while the computer was on (which I did yesterday)...? Anyway, how do I change the mount point?

lleb 12-04-2013 12:20 PM

thats simple, its no different then under MS Windows. the device is NOT flagged by any special means and is just mounted in a willy nilly order so to speak. What ever device goes live first is sdb, then sdc, etc...

Just think about USB Printers in Windows. Its installed, its running, but god help you if you unplug it and plug it back in, you will be prompted to install new hardware and start amassing multiple copies of the same printer and none but the last one will work.

Or you plug your USB drive into Windows, today its drive letter E:/ tomorrow you have an other USB device plugged in, you plug in what was E yesterday, but today its F:/

its all the same.

if you want to get around that, the a few things need to happen.

1. disable the automagical mounting of USB devices
2. create a script combined with labels on the flash drive.
3. mount the specific label to your desired location
OR
4. learn udev rules and customize each device for mounting at specific points into the system

you can also stop using drive letter and use drive mapping:

https://liquidat.wordpress.com/2007/...of-hard-disks/

as each device once formatted is unique.

273 12-04-2013 12:40 PM

Just to clarify:
The files at /dev/sd* are not mount points they are simply files that connect to hard disk drives (sda, sdb) and partitions on those (sda1, sdb1). The mount point is where you mount that with a command like "mount /dev/sdb1 /media/me/kingston_usb_stick". To access a partition through your file manager you need to mount it somewhere. Where it mounts will probably be down to udev and, if it is, the drive is in my experience mounted in either /media/ or /media/username as a folder named after its label.

sunilpopaliya 12-04-2013 10:28 PM

Hello,

Unplug problematic USB and then Plug it again and after that check output of dmesg command. It will show device name of newly mounted USB.

After that you can see how many partitions this particular USB drive has by running fdisk -l command. Then you can mount any partition of that USB drive.



Thanks
======
sunil

frankbell 12-07-2013 08:53 PM

Alternatively, you could put it in /etc/fstab using the UUID.

Here's an example from my fstab. You might want to use the "noauto" flag if you don't want it to automount.

Code:

UUID=1655a198-15a7-471f-9e99-e3fc9fd92ca0      /media/sdb1    ext3    rw,user,auto    0      1
Here's a good article about using UUID in /etc/fstab; it's the one I used.

http://www.cyberciti.biz/faq/linux-f...-update-fstab/


All times are GMT -5. The time now is 09:10 PM.