# USB storage devices not automounting correctly after updates

## Zyzzyva100

I recently updated my entire system to KDE 3.4.3 which also entailed updates to kioslaves and HAL and Dbus, and seem to have broken all the work I did to get my ipod, and usb hard drive to work.  I have also lost the ability to use my usb key, which used to just mount by itself.

I have no idea what has changed.  The devices still show up in storage media, but the symlinks I made seem to not work anymore.

in /etc/udev/rules.d I have a 10-local.rules with these lines:

```

BUS="scsi", SYSFS{model}="iPod            ", KERNEL="sd?2", NAME="%k", SYMLINK="ipod"

BUS="usb", SYSFS{product}="LaCie Hard Drive USB", KERNEL="sd*", NAME="%k", SYMLINK="usbhd"

```

and in my fstab:

```

/dev/ipod              /mnt/ipod       vfat            nodev,nosuid,user,rw,noauto   0 0      

/dev/usbhd              /mnt/usbhd      vfat            noauto,users,owner,rw,umask=000     

```

Never had anything setup for my usb key, it just worked.

It took me awhile to get this setup to begin with, and once I finally got it working with I made sure to leave it alone.  I made sure never to change it, but I assume when I upgraded something changed, and I really don't know what.  Now when I plug anything in it just says that it can't find /dev/s** (whatever the next available storage name is) in fstab or mtab.  The system doesn't seem to be using the udev rules I made anymore or something.  

Anybody have any insight into what I managed to do here?  If I really want to use the devices I can temporarily edit the fstab file, but thats I pain, I would rather just have it plug and play like I did before.  Unfortunately I am not well enough versed with udev to figure this out myself.Last edited by Zyzzyva100 on Sun Feb 19, 2006 7:38 pm; edited 1 time in total

----------

## Zyzzyva100

Lots of views and nobody will bite.  There seem to be lots of people knowledgable about writing udev rules, etc around here.  Can anyone tell me why the system seems to be ignoring what I wrote?  It seems that if it did acknowledge them then when I plug the devices in the system wouldn't want to mount them at dev/sxx but instead about dev/the symlink I made.

The symlinks I made just don't seem to be working anymore, is there a way to fix this?

----------

## Django

I've encountered a bizarre USB mass storage problem on kernel 2.6.15-gentoo-r1.

On a 2.6.10 kernel I am able to mount, write to and unmount the USB device with no problems (It's a MobiBLU DAH1500s Cube thingy)

I recently updated my laptop to run the 2.6.15 kernel in portage and now the drive will mount, allow me to read/write files and then appears to unmount clean, but the player then reports a file system error. When I next mount the device it appears to have had its partition table wiped.

When I tried the player on my 2.6.10 desktop or on the laptop's 'doze partition, the device shows up as an unformatted drive.

Even a mount followed by an unmount on the .15 kernel causes the file system to wipe.

I've noticed a number of improvements on the laptops general USB support with the upgrade to .15 so I am loath to regress to an earlier version.

I've searched the forums for anything similar, but either I'm not searching for the right keywords or no one else is having this problem  :Sad: 

Any hints would be appreciated...

Cheers

----------

## Zyzzyva100

I don't think its the kernel, so you may be having some other problems there.

Everything was working fine in the week or so between when I upgraded to the newest kernel, and when I updated kde and all its components.  I can sitll mount the stuff fine as long as I manually edit the fstab file.

I just wish I could get it set to either automatically do it again, or at least follow the udev rules that I made.  Its a pain to have to edit the fstab file everytime I want to plugin a usb storage device.

----------

## Zyzzyva100

Well updating to KDE 3.5 with pmount and the new device popup dialog has fixed most of the problems.  The device symlinks still don't work which isn't normally a problem, unless I need to open a file from within a program.  Then I run into trouble since removable storage devices don't show up under media.

Anyone have any tips as to how to fix the symlinks?

----------

## Decibels

Personally, I don't know either.  I've had a rule for my scanner since udev started and now can only

start it by root or chown/chgrp on the device so can use as user. 

I have a flashdisk and mp3player that seems to be working fine for user, and symlinks are created and

group I set in the rule is honored. But with the scanner, owner, group permissions, symlink isn't honored anymore.

Trying to look into it.

You could try this to see what is going on. 

Unplug the device, then in console type: udevmonitor --env

Then plug the device in. Scroll thru and see what is happening. For the symlinks look for DEVLINKS.

Here is how my iAudio shows up with the symlink: DEVLINKS=/dev/mp3player1

I even tried doing exactly what works for my others and it isn't working for the scanner. So I did the above for each

device and printed them out. Going to look later and see if can come up with something. Don't hold your breath though.

**Later: Okay, got working with my old rule (which had stopped working at one point), then added some stuff to the

old rule and still works now. Creating the symlink and honoring permissions,...

```
#Microtek V6UPL Scanner

#These two don't work

#BUS=="usb", SYSFS{idVendor}=="05da", KERNEL=="sg?", NAME="%k", SYMLINK+="scanner", OWNER="david"     

     GROUP="scanner", MODE="0660"

#BUS=="usb", SYSFS{idVendor}=="05da", KERNEL=="sg?[1-9]", NAME="%k", SYMLINK+="scanner%n", 

     GROUP="scanner", MODE="0660"

# This works for some reason?? (It is my old rule, which had stopped working, now works again?!)

#BUS="scsi", SYSFS{model}="Scanner V6UPL", NAME="%k", SYMLINK="scanner"

# Added some more rules and still works.

BUS=="scsi", SYSFS{model}=="Scanner V6UPL", NAME="%k", SYMLINK+="scanner", GROUP="scanner", 

     MODE="0660"
```

FYI: After my rule that works now stopped working, I tried creating a new rule (1st Two, together and seperately), which

never worked. Yes, tried scsi and usb BUS, tried my old SYSFS{model}, .... and wouldn't work. It is created as either

/dev/sg0 or /dev/sg1 usually, so that shouldn't have been a problem.

Messing with my working rule, change the {model} to {idVendor} and it didn't like that, then put the KERNEL line

back in and it still worked. Guess it doesn't like my {idVendor}. The weird thing is I mess with all that before and

even upgraded/downgraded,.. Udev. Still nothing worked. Now able to go back to my old rule and not sure what fixed

it? 

*Okay, looks like idVendor isn't grouped with my device anymore, preliminary view looks like it is split off before configures

device. It is there, but as part of something else in the chain now. The actual vendor info in /sys/<path to device> is a blank page now.

So maybe you can get somewhere with this info?!

```
lrwxrwxrwx  1 root root        3 Feb 26 10:49 /dev/scanner -> sg0

crw-rw----  1 root scanner 21, 0 Feb 26 10:49 /dev/sg0
```

----------

## daddio

I think it has to do with the latest HAL and DBUS...

I actually had better luck (this is with gnome) when I removed my usb portable devices from /etc/ftab and then just let the Window manager 

assign them a home.  They are trying to make plugging a usb drive or pen drive as brainless as it is in WinXP.  try commenting outyour udev rules and fstab line, and see if the machine doesn't just find them.

----------

