Lost USB or MMC/SD automount

Archived topics about LMDE 1 and LMDE 2
Locked
pomali

Lost USB or MMC/SD automount

Post by pomali »

Using LMDE (Linux 2.6.32-5-686 #1 SMP i686 GNU/Linux), dual boot with WinXP and xPUD, using GRUB2


Since I installed LMDE I had some problems with pendrives or memory cards to "appear" (on desktop and in nautilus), but when it didn't appear, I just replugged it and storage appeared. But then, maybe after some upgrades, or maybe i installed some weird package, usb/sd won't appear anymore.

I am able to manually mount device, but I want to know why it stopped working.


I googled, searched forums and tried to understand what happens after plugging in usb flash drive.
Looked into hal policy, added myself to plugdev group, installed new kernel, reconfigured kexec-tool, run manually hald, and maybe even something else...
(weird things i noticed are that: gnome-volume-manager doesn't exist in repositories AND hal isnt running defaultly)

AFAIK:
  • dmesg says it sees, identifies, (usb-storage does device scan) and all seems ok
  • udev sees my device, adds devices into /dev (as /dev/sdb and /dev/sdb1 ... )
  • lsusb has the device
  • lshal has the device
  • there are no messages on d-bus concering this.
Thanks for any help:) (Mostly I'm curious why it stopped working, where is problem, etc.)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
dawgdoc

Re: Lost USB or MMC/SD automount

Post by dawgdoc »

After you plug it in, check and see if it shows up in /etc/mtab and in the syslog I am not having any problems with the USB automount, but I expect you may not see it in these locations since you are.

Have you rebooted since your most recent updates? I lost some of my automounted partitions until I rebooted, after a recent update.
Reverend_526

Re: Lost USB or MMC/SD automount

Post by Reverend_526 »

pomali wrote:Using LMDE (Linux 2.6.32-5-686 #1 SMP i686 GNU/Linux), dual boot with WinXP and xPUD, using GRUB2


Since I installed LMDE I had some problems with pendrives or memory cards to "appear" (on desktop and in nautilus), but when it didn't appear, I just replugged it and storage appeared. But then, maybe after some upgrades, or maybe i installed some weird package, usb/sd won't appear anymore.

I am able to manually mount device, but I want to know why it stopped working.


I googled, searched forums and tried to understand what happens after plugging in usb flash drive.
Looked into hal policy, added myself to plugdev group, installed new kernel, reconfigured kexec-tool, run manually hald, and maybe even something else...
(weird things i noticed are that: gnome-volume-manager doesn't exist in repositories AND hal isnt running defaultly)

AFAIK:
  • dmesg says it sees, identifies, (usb-storage does device scan) and all seems ok
  • udev sees my device, adds devices into /dev (as /dev/sdb and /dev/sdb1 ... )
  • lsusb has the device
  • lshal has the device
  • there are no messages on d-bus concering this.
Thanks for any help:) (Mostly I'm curious why it stopped working, where is problem, etc.)


Pomali,
Did this work for you? I just installed Linux Mint 10 (julia) and I can't seem to be able to auto-mount any of my USB flash drives. Any suggestions..?
pomali

Re: Lost USB or MMC/SD automount

Post by pomali »

/var/log/syslog

Code: Select all

Apr  7 12:58:15 Leia kernel: [ 7994.360077] usb 2-5: new high speed USB device using ehci_hcd and address 5
Apr  7 12:58:16 Leia kernel: [ 7994.503011] usb 2-5: New USB device found, idVendor=13fe, idProduct=1f00
Apr  7 12:58:16 Leia kernel: [ 7994.503021] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr  7 12:58:16 Leia kernel: [ 7994.503028] usb 2-5: Product: USB DISK 2.0
Apr  7 12:58:16 Leia kernel: [ 7994.503033] usb 2-5: Manufacturer:         
Apr  7 12:58:16 Leia kernel: [ 7994.503038] usb 2-5: SerialNumber: 078417760256
Apr  7 12:58:16 Leia kernel: [ 7994.503271] usb 2-5: configuration #1 chosen from 1 choice
Apr  7 12:58:16 Leia kernel: [ 7994.504410] scsi5 : SCSI emulation for USB Mass Storage devices
Apr  7 12:58:16 Leia kernel: [ 7994.504655] usb-storage: device found at 5
Apr  7 12:58:16 Leia kernel: [ 7994.504660] usb-storage: waiting for device to settle before scanning
Apr  7 12:58:21 Leia kernel: [ 7999.504381] usb-storage: device scan complete
Apr  7 12:58:21 Leia kernel: [ 7999.505609] scsi 5:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 0 CCS
Apr  7 12:58:21 Leia kernel: [ 7999.746410] sd 5:0:0:0: [sdb] 4022272 512-byte logical blocks: (2.05 GB/1.91 GiB)
Apr  7 12:58:21 Leia kernel: [ 7999.746939] sd 5:0:0:0: [sdb] Write Protect is off
Apr  7 12:58:21 Leia kernel: [ 7999.746948] sd 5:0:0:0: [sdb] Mode Sense: 23 00 00 00
Apr  7 12:58:21 Leia kernel: [ 7999.746954] sd 5:0:0:0: [sdb] Assuming drive cache: write through
Apr  7 12:58:21 Leia kernel: [ 7999.750133] sd 5:0:0:0: [sdb] Assuming drive cache: write through
Apr  7 12:58:21 Leia kernel: [ 7999.750146]  sdb: sdb1
Apr  7 12:58:21 Leia kernel: [ 7999.752381] sd 5:0:0:0: [sdb] Assuming drive cache: write through
Apr  7 12:58:21 Leia kernel: [ 7999.752391] sd 5:0:0:0: [sdb] Attached SCSI removable disk
nothing new in mtab
(I have weird file "mtab.fuselock" there ... but imho its only for fuse)


No, I still don't have automount, usb flash drives arent showing in panel in nautilus ... etc. :/
dawgdoc

Re: Lost USB or MMC/SD automount

Post by dawgdoc »

I notice that I do not have the file in my system before or after plugging in a usb flashdrive which automounts. I am not yet suggesting any action. But I was wondering what would be the effect of removing mtab.fuselock or renaming it to mtab.fuselock.old, so you can still reinsert it if necessary. I bring it up in case you may find more info about removing it, or in case anyone else already knows if this is advisable.

I was not familiar with mtab.fuselock so I googled and found these bits of info.
ArchLinux: Only / and KernelFS are mounted

I just had the problem that my Arch box didn’t let me log in. I logged in as root, and found out that none of my filesystems where mounted, only / and the various virtual kernel file systems.
The Problem:

After my last session (in which the kernel or something else hang up so I had to do a hard reset), the file /etc/mtab.fuselock existed in the filesystem, so no file system from /etc/fstab could be mounted.

So I just deleted this file, rebooted and it works!
http://malte70.tumblr.com/

and

http://blog.gmane.org/gmane.comp.file-s ... 01[quote]I finally got a little annoyed about the fusermount -u behavior and
looked into it. The problem is that if I mount my filesystem and then
later use fusermount -u to unmount it, sometimes it would unmount the
filesystem but wouldn't remove the fuse entry from /etc/mtab. [Note
that in version 1.0 release it will corrupt my /etc/mtab -- I had an
early fix that made it into the CVS only after that release].

The problem seems to be that when the filesystem gets notified that it
is being unmounted, it arranges for fusermount to unmount the system, so
there is a race condition where two fusermount programs are running
trying to do the same work.

I'm not sure that either can be eliminated, since they can handle
different cases, but they do need some sort of synchronization.

Attached is a proposed patch which adds an empty /etc/mtab.fuselock
file which is used for locking to stop multiple fusermount instances
from modifying mtab at once. [/quote]
pomali

Re: Lost USB or MMC/SD automount

Post by pomali »

Thanks for information, now I remember, that once I forgot to unmount sshfs, so that may be reason why mtab.fuselock is there.


YEEEEAAAH:D:D:D finally ... idk if it is real reason why it didn't work before but i wrote (copied from archwiki:D) udev rules for USB flashdisks and for SD card reader and it works!

https://wiki.archlinux.org/index.php/Ud ... SB_devices
I used these rules (u dont have to use all, just choose rules you need)

I am really ashamed that I didn't think about rules when I was checking if udev is ok:/ but thanks for help:)
(and maybe if you could look into your /etc/udev/rules.d/ if you have rules for automonouting there... just to be sure it isn't just workaround)

and I have one difference (that is why I think it isn't all OK): I can't unmount as non-root user, and there aren't options like "Safe removal" and one other ... I remember sth like that from b4 ... gtg but thanks for help again:)

(edit: this wasn't final solution while i cant write to that disk as non-root)
Last edited by pomali on Mon Apr 11, 2011 8:59 am, edited 1 time in total.
dawgdoc

Re: Lost USB or MMC/SD automount

Post by dawgdoc »

I have two rules files and a symlink in /etc/udev/rules.d/ The two rules files do not seem to apply here.
They are: 70-persistent-cd.rules and 70-persistent-net.rules.

The symlink is titled z60_hdparm.rules and links to /etc/udev/hdparm.rules. The contents of that file is

Code: Select all

ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", RUN+="/etc/init.d/hdparm hotplug"
pomali

Re: Lost USB or MMC/SD automount

Post by pomali »

I have same rule (z60_hdparm.rule), so there wasnt problem with that. But I still don't have non-root user write/unmount rights for auto-mounted USB flashdisks.

Does someone know how is automounting solved in basic LMDE config/clean install?
Locked

Return to “LMDE Archive”