# USB memory stick is no longer recognized...long dmesg output

## gpierce

Hello all,

I have a very bad problem.  :Crying or Very sad: 

I used to be able to just plug my USB memory stick into a USB port and have it automatically mounted and ready for use.  A little icon would be created for it on the desktop and double clicking would allow me to access its contents.  Somewhere along a path that saw me upgrade my kernel and do an "emerge -Du world" my computer has lost that ability.

I am really lost as to what to do next.  I have tried emerging dbus, hal, and hal-volume-manager (or something like that), and rebooting my computer without success.  I have the latest Gentoo kernel (2.6.12-r4) and truly I was able to have my USB memory stick be automagically mounted at one time.  I don't if this helps anyone but I thought I would include the output of dmesg.  It does look like the kernel recognizes my 2GB USB memory stick.  You can see it in the middle somehwere.  But nowhere does it appear on my desktop.  

Typing "dmesg" at a terminal prompt yiels the following:

 *Quote:*   

> 
> 
> usb-storage: queuecommand called
> 
> usb-storage: *** thread awakened.
> ...

 Last edited by gpierce on Fri Jul 22, 2005 1:46 pm; edited 1 time in total

----------

## Cosmin

What happens if you try to mount sda1 by hand?

----------

## johnm

looks a lot to me as though the usb key has just hit the end of its life  :Smile: 

Are you in a position to borrow someone elses, and quickly test it for example?

----------

## gpierce

When I try to mount by hand with "mount /dev/sda1" the OS replies "mount: can't find /dev/sda1 in /etc/fstab or /etc/mtab".  I don't remember having to edit /etc/fstab to get it to mount.  I could just pop it in the back and it would appear!

The same thing happens when I try a new USB key, one that I know works because it works everywhere else. 

Greg

----------

## johnm

Have you enabled usb-storage debug messages?

Anyways, going on from there.

double check you have installed udev/dbus/hotplug/hal and that is all that should be needed for the automatic hotplug gubbins.

As far as the mount error goes, you need to specify something like:

mount /dev/sda1 /mnt/usbkey

----------

## gpierce

Thank you for the reply and concern about my problem.

I am not sure how to enable the usb-storage debug messages.  As far as having udev/dbus/hotplug and hal present, I can tell you absolutely, yes, I definitely do.  I am going to try emerging them again however--just in case.  Do i need to rc-update udev so that it starts at boot?

Also, I created a dir, /mnt/usb, as root then I typed mount /dev/sda1 /mnt/usb.  Even then I couldn't see my files on the usbkey.

I'll see what happens when I try recompiling everything.

Greg

----------

## johnm

Can you print the last 10 lines of "dmesg" output please?

udev is started as the hotplug agent.

you may want to rc-update add hald default

also... add dbus if it exists on your system.

Do you have devfs installed on your system somehow?

if so, make sure thats uninstalled.

----------

## gpierce

Ok, here it is, the last 10 lines of dmesg:

 *Quote:*   

> scsi1 (0:0): rejecting I/O to dead device
> 
> FAT: Directory bread(block 515) failed
> 
> scsi1 (0:0): rejecting I/O to dead device
> ...

 

That was interesting because I know it works elsewhere.  It does recognize that the filesystem is FAT which is correct however!  The devfs is a kernel option that should be off, correct?  

Greg

----------

## gpierce

/dev file system support is off in the kernel!  I just checked.

Greg

----------

## johnm

devfs is both a kernel option and an application.

emerge -C devfsd and also check the devfs is disabled.

Can you please paste 10 lines or so of the most descriptive thing thats in dmesg, before those messages?

it might be easier to just paste it all to pastebin.com and link

----------

## gpierce

Thanks for your advice to go to pastebin.com.   That is a really neat service.

Here is the link http://pastebin.com/316218.  I have highlighted the part where it seems to correctly identify the usb key.

I did as you suggested, "emerge -C devfsd" and the message back was "Couldn't find devfsd to unmerge."

Hope the output of dmesg is meaningful to you.

Greg

----------

## gpierce

I am not sure what just happened but now when I manually do a mount /dev/sda1 /mnt/usb and open the directory, I can see all my files.  This leads me to believe that the problem lies not with my usb stick but udev, hald, or somewhere else.

I wish I knew more about linux and hardware to be able to track down the problem more precisely.  If this were a bug I would love to report it to the developer.  It would be very interesting to know what the root of the problem is.

Greg

----------

## gpierce

Unfortunately, the usb stick still doesn't get automatically mounted.

----------

## gpierce

Interesting...I just tried clicking on "Removable Drives and Media" in the Desktop->Preferences menu and I get this error message:

 *Quote:*   

> The "hald" service is required but not currently running. Enable the service and rerun this applet, or contact your system administrator.

 

This is odd because I definitely did a "rc-update add hald boot", but it does not appear  to continue to run.

----------

## gpierce

Here's another interessting find: hald won't start because it can't connect to dbus:

 *Quote:*   

> gentoo-dell gpierce # hald --daemon=no --verbose=yes
> 
> 23:56:03.829 [I] hald.c:394: hal 0.4.8
> 
> 23:56:03.829 [I] hald.c:398: Will not daemonize
> ...

 

I am not sure if the problem is the permissions.

----------

## micmic

sudo ln -snf /var/lib/dbus/system_bus_socket /var/run/dbus/system_bus_socket

and all OK.

----------

## gpierce

I just tried that.  No change at all.  Now when I type in /etc/init.d/hald start or restart I get a message saying "Stopping Hardware Abstraction LAyer."

----------

## micmic

 *micmic wrote:*   

> sudo ln -snf /var/lib/dbus/system_bus_socket /var/run/dbus/system_bus_socket
> 
> and all OK.

 

Has told lies, this advice does not maintain ÐÅÒÅÚÁÇÒÕÚËÉ, and here correction <listen> unix:path =/var/run/dbus/system_bus_socket </listen> on <listen> unix:path =/var/lib/dbus/system_bus_socket </listen>/etc/dbus-1/system.conf - maintains

----------

## GungHo

Hi,

I have a very similar prob with my Visor. It has worked like a charm when I used gentoo-2.6.11-r6, but now with gentoo-2.6.12-r4 it does not work anymore, none of the /dev/ttyUSBx entries related to the Visor is created when I press the Sync button on its dockingstation (but one from another usbserial gadget I have connected)

With exactly the same udev release 058 and gentoo-2.6.11-r6 it works like a charm, so I believe there is something broken inside the kernel.

I can not see any hint in /var/log/messages, the messages related to the Visor hotplugging look exactly like they do under 2.6.11-r6, but the entries in /dev and so on are not created.

Another prob with 2.6.12-r4 I have is, that my cups is not working anymore, with my parallel printer. I use my printer only every now and then, so all printing related stuff is not loaded automatically, but by hand. Normally I do a "modprobe lp" followed by a "/etc/init.d/cupsd start", and cups starts and I'm able to print. Now "/etc/init.d/cupsd start" hangs, I bet that there is no /dev entry created after doing the "modprobe lp". I will check this

I believe 2.6.12-r4 is broken  :Rolling Eyes: 

----------

## gpierce

GungHo:

Thanks for posting your experiences.  I was thinking I am a colossal dum&^*!*s for having gotten myself in this jam and not being able to figure out how to get myself out of it!  I am having the exact same problem with cups.  In fact, I can't even boot into my system anymore because the kernel hangs when it tries to start the cups server at boot.  I was slowly reconciling myself to having to manually mount my usb memory stick, but when cups failed, too, I decided enough is enough and I am rebuilding my system from scratch!  Fortunately, I have a spare hard drive on which I had NLD9 loaded and I was able to boot into it to retrieve my files from my gentoo drive before I wipe it clean and rebuild it.  This is very disappointing!  Of course, it is to a large extent my own doing.  I would be very interested to know if you or anyone figures out what has gone wrong.

Again, thank you for sharing your experiences,

Greg

----------

## GungHo

@Greg,

uh, new installation from scratch  :Crying or Very sad: 

Just a small tip: always keep a good kernel in your config (of grub or lilo), which you can boot without problems, when you have probs booting a new kernel. Or make a rescue CD, you can boot from and use to repair a corrupted setup, for instance www.sysresccd.org. I have almost always been able to repair a corrupted setup with the help of such tools

I wish one of the Gentoo kernel gurus (for instance GregKH) would do a statement to our issues. So we are sitting alone in the dark, and have no clue what is going on, when this issues will be fixed

----------

## gpierce

I actually did have other kernels in my boot partition, but it was an emotional decision.  I just got frustrated and angry and decided I was going to reuild everything.  Please post to this forum topic again if you hear anything else about this issue.  When I go back home tonight, I think I will install the vanilla kernel instead of the gentoo kernel, and see if it might be one of the "enhancements" to the kernel that the gentoo devs have added that broke something.  I really don't know.  Though I am sure they are conscientious people and test things free software changes so much and so fast that it would be easy to overlook something.

Greg

----------

## gpierce

I am posting this so that others who have had similar troubles can hopefully avoid this painful struggle. After many weeks of trying different combinations of dbus, hal, and hal-device-manager, I found this combination works prefectly together:

dbus-0.23.4-r1

hal-0.4.8

hal-device-manager-0.2.98

----------

