LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-11-2004, 03:38 PM   #1
animehair
Member
 
Registered: Sep 2004
Location: NJ
Distribution: Gentoo
Posts: 104

Rep: Reputation: 15
USB Storage with Kernel 2.6.7 acting very strangely and not mounting correctly


I recently upgraded to 2.6.7 kernel in slackware 10. Previously in 2.4.27 kernel i had FSTAB setup to mount /dev/sda1 to a moint point, and in gnome i would click on the usb folder located in the computer icon and my kingston usb device would automatically mount. However now it seems that hotplug isnt handling the usb stick correctly. The first time i plug it in it mounts fine, but if i remove the usb device and stick it back in hotplug still thinks the first one is plugged in, and assigns the new usb device a new /dev point. I put a dmesg result below (i put the spaces in myself to make it easier to read). You will notice that my computer thinks i have more then one Kingston USB device plugged in even though I definatly dont. The more and more i unlplug it and plug it back in the more it adds scsi dev points.

I attribute this to how the new kernel uses hotplug and /dev points. Can anyone enlighten me on this situation please, and help me get back to easily mounting my usb devices in gnome? Thanks in advance.


usb 1-6: new high speed USB device using address 7
scsi5 : SCSI emulation for USB Mass Storage devices
Vendor: Kingston Model: DataTraveler2.0 Rev: 4.70
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi5, channel 0, id 0, lun 0
USB Mass Storage device found at 7
usb 1-6: USB disconnect, address 7
usb 1-5: new high speed USB device using address 8

scsi6 : SCSI emulation for USB Mass Storage devices
Vendor: Kingston Model: DataTraveler2.0 Rev: 4.70
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi6, channel 0, id 0, lun 0
USB Mass Storage device found at 8
usb 1-5: USB disconnect, address 8
usb 1-6: new high speed USB device using address 9

scsi7 : SCSI emulation for USB Mass Storage devices
Vendor: Kingston Model: DataTraveler2.0 Rev: 4.70
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi7, channel 0, id 0, lun 0
USB Mass Storage device found at 9
usb 1-6: USB disconnect, address 9
usb 1-6: new high speed USB device using address 10

scsi8 : SCSI emulation for USB Mass Storage devices
Vendor: Kingston Model: DataTraveler2.0 Rev: 4.70
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi8, channel 0, id 0, lun 0
USB Mass Storage device found at 10
 
Old 10-13-2004, 08:04 AM   #2
animehair
Member
 
Registered: Sep 2004
Location: NJ
Distribution: Gentoo
Posts: 104

Original Poster
Rep: Reputation: 15
Ive been messing with UDEV a bit. My goal is to create a /dev symlink for my usb drive so that it can always be easily mounted with the proper fstab line, and using nautilius/gnome. However, I am noticing that although the device is showing under /sys/block/sda using udevinfo, Its not attaching to a /dev point according to my rules. In fact with the 2.4 kernel it would grab /dev/sda1, but now its not even doing this.

Im using http://www.reactivated.net/udevrules.php as a guide, and my rule is written like (actually im at my work... i actually use the serial number for the usb drive):

BUS="usb", SYSFS{manufacturer}="Kingston", KERNEL="sda1", NAME="%k",
SYMLINK="thumbdrive"

This should put my usb thumdrive at /dev/sda1 and /dev/thumbdrive as soon as its plugged in.

Im using a Kingston DataTraveler2.0
Slackware 10
UDEV - 035

thanks for any help.
 
Old 10-13-2004, 11:17 AM   #3
geomatt
Member
 
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Rep: Reputation: 30
Seems like a sound approach. Lemme know how you make out. I just had a nightmare of a time getting my usb drive working under udev on Slack 10 with a 2.6.8 kernel. Your rule helped me get out of a problem - the kernel was refusing to admit that the usb device was indeed a block device. Every time I'd try mounting the node created by udev I'd get "/dev/usbstick is not a block device."

Here's my rule:
BUS="usb", KERNEL="sda*" SYSFS{serial}="serialNum", NAME="%k", SYMLINK="usbkey"

The missing link was the KERNEL key. I used the wildcard, since my whole reason for trying udev was because depending on which order I plugged usb devices in I'd end up with different device numbers, so I had to constantly rewrite the fstab.


cheers,
-geomatt
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount acting very strangely PeaceTank Linux - Hardware 1 12-23-2004 01:00 AM
POSIX semaphores acting strangely spuzzzzzzz Programming 0 10-18-2004 10:10 PM
Harddrive acting strangely, even when doing nothing LavaDevil94 Linux - Hardware 4 08-04-2004 12:59 AM
acpi acting strangely in kernel 2.6.6 TheOneAndOnlySM Linux - General 2 05-13-2004 08:20 PM
computer acting strangely tjmm General 7 04-24-2001 06:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration