Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi !
My linux Red Hat 7.1 with 2.4.30 kernel does not detect my usb stick if it is present in the connector when I boot the computer. On the other hand, If I plug it when the Linux is running, it is correctly detected as /dev/sda.
All the SCSI and USB drivers are directly compiled in the kernel.
Is there someone who knows how to force USB detection at boot time please ?
See also http://groups.google.fr/group/comp.o...fa3b2a2fc9cd7c
and http://lea-linux.org/pho/read/1/327553#debut
for more details.
Best Regards.
JY
Hi !
My linux Red Hat 7.1 with 2.4.30 kernel does not detect my usb stick if it is present in the connector when I boot the computer. On the other hand, If I plug it when the Linux is running, it is correctly detected as /dev/sda.
I think that this happens because of devfs, which is used in 2.4.x Some time is required (from logs):
Code:
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
And when you coldpluggin you flash, there is no time to settle, and so it`s not mounted.
Hi Virens !
First of all, I want to thank you for your reply.
Then, I can't upgrade to kernel 2.6 because our customer requires 2.4.30 one.
I've found someone who seems to have the same problem : http://groups.google.fr/group/comp.o...b&rnum=1&hl=fr
What do you mean by "there is no time to settle". I'm french and I don't really understand the sentence.
Thanks for your help again,
Best regards
JY
I think once I saw somewhere a parameter that could be used in the boot parms to slow down the boot, so that the usb stick/drive is recognized. Perhaps it was something linked to "booting from a usb stick"?
Hi Pearlseattle !
In fact, we have already tried to patch the kernel with the usbboot patch (http://www.xenotime.net/linux/usb/usbboot-2422.patch).
That's this way I deduced that my problem comes from usb detection/enumeration (driver issue ?).
Indeed, with this patch, if we boot from usb key*, the system boots (kernel decompression...) and then fails in a loop printing on the screen the patch message :
"VFS: Cannot open root device \"%s\" or %s\n", "VFS: Cannot open root device \"%s\" or %s, retrying in 1 second.\n".
When these messages are displayed, we unplugged the usb stick and repluged it. It was then detected by usbstorage and recognized as /dev/sda. The root file system is then correctly mounted on /dev/sda6 and the rest of the boot comes to an end without other errors.
*:the system booted from usb is exactly the same, we've just changed the root=/dev/hda6 line in the lilo.conf file by root=/dev/sda6.
1- Because of the fact that SBP support uses SCSI emulation, the emulated SCSI bus need to be "rescanned" in order to detect the disk and allow /dev/sda1 to be mounted. This scanning is performed with a couple of simple commands. Unfortunately, however, using a one-phase boot, we cannot run any commands until the kernel has finished booting, and the kernel cannot finish booting until the root file system is mounted -- a classic Catch-22 situation. Thankfully, there is a patch available for 2.4 kernels that causes the SCSI bus to be scanned on startup (see Resources for more details). By applying this patch, I was able to have the external drive automatically detected by the kernel during bootup with no rescanning commands required. This leads us to the next problem.
2-There is a timing window within the kernel, which means that often, the kernel will proceed to try to mount the root device before it has had a chance to be properly detected or initialized. Again, there is a patch available for this (please see Resources for a link) that simply makes the kernel wait for a short period of time on startup, and retry if it fails to mount the root filesystem (to give the external drive time to be recognized).
So, it looks like the patch you applied covers the second part, which retries the mount of the root partition. You're still missing a patch which triggers a rescan of the USB bus, which is what happens when you unplug & replug your USB stick. Any luck finding the patch for kernel 2.4?
Note also in the ibm article they further discuss the timing issues and the need to rescan the scsi bus. That dealt with 2.4 kernels using devfs. It's not applicable to 2.6 kernels using udev, but there may be similar issues or not. You would have to rebuild your initrd and see if it worked to find out for sure.
T'm not a good google user :
"Thankfully, there is a patch available for 2.4 kernels that causes the SCSI bus to be scanned on startup" => I can't find this @§%ù! patch !
Did you find it ?
I've written an e-mail to the author of the article you pointed out to me.
I'm waiting a reply...
I hope he could send this patch to me.
I write back to you here if yes.
Bye.
JY
Well, I tried to search a with a million different terms, but by making it simple, I looked again at IBM's homepage, copied the string "sbp2 hotplug patch" and inserted it into Google, I get back this link. I can download from there the "sbp2 hotplug patch", but I am not sure if the patch concerns what you already applied or the rescan. But I am quite optimistic and think it might be the one you're searching for
Again, thank you four your help.
It seems you're a better "googler" than me.
I will try this patch and I'll post a feedback here as soon as I've tried it.
best regards.
JY
Unfortunately, I've tried the patch, but my usb detection problem is still there.
Moreover, the ibm article's author hasn't answered to me yet.
I will try these patches : http://www.suse.de/~garloff/linux/sc...nning-old.html
Any other idea/link ?
bye.
JY
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.