Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel)
Hi everyone,
I am trying to prevent the ehci_hcd kernel module to load at boot time. Here's what I've tried so far: 1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here): Code:
blacklist ehci_hcd Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet modprobe.blacklist=ehci_hcd" Code:
blacklist ehci_hcd Code:
dpkg-reconfigure linux-image-$(uname -r) I've also removed the module with Code:
modprobe -r ehci_hcd The reason why I want to do this is because I am suspecting that module is responsible for crashing a RAID1 device composed of 2 8 GB USB drives connected to a PCI 4-port USB 2.0 hub in an old home server that only has USB 1.1 onboard ports available (I added the PCI hub in hopes that I could use the flash drives at USB 2.0 speeds). Maybe the hardware itself isn't capable of handling USB 2.0? Please correct me if my reasoning is faulty. Any hints or suggestions will be more than welcome. |
Just rename the actual kernel module (under /usr/lib/modules... somewhere), and reboot. Rename it back after your testing.
|
Quote:
If you want to blacklist the ehci_hcd module, you must also blacklist the uhci_hcd module. There must some dependency going on, not sure. You can do it from GRUB, but you must update GRUB's configuration files for it to take effect: Code:
sudo update-grub Code:
echo -e "blacklist ehci_hcd\nblacklist uchi_hcd" | sudo tee /etc/modprobe.d/ehci.conf |
Thanks syg00 and towheedm.
I'll tell you what I did. 1) I checked the dependencies of each module and it turns out that ehci_hcd does not depend on uhci_hcd. Instead, both depend on usbcore: Code:
root@debian:~# modinfo ehci_hcd uhci_hcd | grep depends 2) I changed the name of the module file: Code:
root@debian:~# modinfo ehci_hcd Code:
root@debian:~# lsmod | grep usb FYI: Code:
root@debian:~# ls /lib/modules/3.2.0-4-686-pae/kernel/drivers/usb/host Please advise. |
Update:
I just tried adding the following symlink to /etc/rc2.d: Code:
root@debian:~# ln -s /etc/init.d/unload-ehci_hcd /etc/rc2.d/K01ehci_hcd Code:
modprobe -r ehci_hcd Up to this point I am beginning to think that maybe the only permanent solution to this would be to recompile the kernel without the ehci_hcd module. |
I forgot to include 'blacklist' in the last code block. It's edited now.
After trying it, neither the ehci_hcd or uhci_hcd drivers were loaded, which meant non of my usb devices worked after rebooting. Again, the only way I could prevent the ehci_hcd from loading was to also blacklist the uhci_hcd module. I did rename the ehci module in a VM, which prevented it from loading. |
Renamed echi and rebooted. It was not loaded, but neither was the uhci driver.
Code:
sudo mv /lib/modules/3.2.0-4-686-pae/kernel/drivers/usb/host/ehci-hcd.ko ~/ Checking the kernel sources does not show a direct dependency between the two though. Interesting, I will check this further. BTW: Use code tags instead of quote tags for your code. It preserves formatting making it much easier to read. |
towheedm,
It worked! This time I didn't rename the module (in the actual sense of the word) but moved it to root's home directory, just like you suggested earlier. Note that I just did this with the ehci_hcd module, not with uhci_hcd - and did not blacklist them in the .conf file inside the /etc/modprobe.d directory. Then I updated the boot image and rebooted, and now the ehci_hcd module is not loading automatically anymore: Code:
gacanepa@debian:~$ lsmod | grep usb Thanks guys! |
All times are GMT -5. The time now is 07:36 PM. |