Summary: | Error after inserting USB mass storage divice usb-storage: Bad target number (1:0) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Zak Peirce <plastikman> |
Component: | Current packages | Assignee: | Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | amd64 |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Zak Peirce
2005-04-04 09:12:48 UTC
I have a Genesys Logic Inc USB multi-functional card reader. If the device is attached at startup with a SecureDigital memory card inserted, the device is recognised and assigned to /dev/sda1. This can be mounted as normal by a user according to the rules I setup in /etc/fstab. However, if at startup, the device is inserted into a USB port, and there is no card in the reader, then the device does not become assigned to /dev/sda1, even when a memory card is inserted. If (as root) I attempt to mount /dev/sda using the following code: mount -t vfat /dev/sda /mnt/usb this generates an error (as expected), but /dev/sda1 then magically appears, and can be mounted by any user. Alternatively, physically disconnecting the device by unplugging the USB cable, and then re-connecting also allows a normal mount process to occur, as long as a memory card is in the device when it is attached. In summary, I can only mount the device if a memory card is inserted *before* it is attached to the PC, unless I first attempt to mount /dev/sda as root. I am using kernel 2.6.11-gentoo-r4, with hotplug and coldplug installed on a Pentium III 700MHz PC. junkmail@hesketh-family.co.uk: Please don't pollute bugs with unrelated problems. But if you do some research, you'll find that these cheap usb devices don't inform the host of media change, if you want it automatically then you need to set up some software which polls for it. You'll also notice that *any* activity on /dev/sda, even a simple "touch", will force it to re-read the media status and partition table. So this is not a bug. Zak: Just to confirm, you definately do have media inserted right? You also neglected to post the "emerge info" output despite the input form asking you to. Which is the last good kernel which worked? Daniel, Thank you for your reply I noticed after the comments by junkmail@hesketh-family.co.uk that if i boot up with the drive in i do not get the same error. I also noticed after more research that in dmesg it does say sda so if i do a cfdisk /dev/sda then i see that the actual file system is /dev/sda1 and i am able to mount that. I am sorry that i wasted your time on this and it is now working. Thank you for investigating. OK, I didn't think that this was the same bug for both people, sorry about my last comment! To explain a bit further, once you have inserted, removed, or replaced a card, simply run: touch /dev/sda before trying to mount /dev/sda1 or whichever partition you want. Many of these automounting tools (e.g. HAL+gnome-volume-manager+udev) automatically poll the /dev/sda node so things like this become transparent to the user. |