Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


how to disable kernel module without being able to boot?
New on LowEndTalk? Please Register and read our Community Rules.

how to disable kernel module without being able to boot?

4n0nx4n0nx Member

Hi,

TL;DR: On Ubuntu 14.04, how do I disable a kernel module that is built into the kernel (blacklisting not possible) when I am unable to boot?

I am trying to boot an Ubuntu 14.04 installation from a USB stick.

(means: I installed Ubuntu FROM a USB stick TO a different USB stick and am now trying to boot from it)

It works on my old USB 2.0 stick. On my new SanDisk Ultra USB 3.0 32GB stick the installation completes just fine, but I am unable to boot.

usb usb4-port2: unable to enumerate USB device

Of course I have typed the message into Google, but I don't know how to apply the likely solution. Basically: turn off module ehci_hcd. How do I do that if I can't boot and if blacklisting doesn't work, because the module is built into the kernel? I have tried blacklist.conf and grub config file.

http://geekdevs.com/2010/04/solved-unable-to-enumerate-usb-device-disabling-ehci_hcd/

I would follow this ^ but my /sys/ folder is empty when I plug my USB stick into a computer to access its files (assuming this is normal?).

The error occurs on my Xeon E3-1230v3 desktop computer and on my old Atom N270 netbook, so I am guessing either the USB stick is broken or it is Ubuntu's fault. (likely Ubuntu from the amount of forum posts hinting to disable ehci_hcd)

Any help would be greatly appreciated.

Comments

  • teknolaizteknolaiz Member
    edited October 2015

    Rename the module? Find out where the kernel modules are located first. Could be in /usr/lib/modules or /lib/modules or somewhere else. And if you want to blacklist ehci_hcd you also have to blacklist uhci_hcd.

    Or better move the modules to a different folder than renaming them.

    Thanked by 14n0nx
  • Can you try to install debian jessie instead? Newer distro and doesn't depend on a commercial organization.

    Thanked by 14n0nx
  • ClouviderClouvider Member, Patron Provider

    @Hidden_Refuge said:
    Rename the module? Find out where the kernel modules are located first. Could be in /usr/lib/modules or /lib/modules or somewhere else. And if you want to blacklist ehci_hcd you also have to blacklist uhci_hcd.

    It was several times mentioned in the OP that the module is built into the kernel.

    Thanked by 14n0nx
  • What if you connect this USB stick to a USB 2.0 port, instead of a USB 3.0 port? Does it work then?

    Thanked by 14n0nx
  • Try adding modprobe.blacklist=module-name-here to kernel parameters.

    Thanked by 14n0nx
  • teknolaizteknolaiz Member
    edited October 2015

    @Clouvider said:
    It was several times mentioned in the OP that the module is built into the kernel.

    Read http://www.linuxquestions.org/questions/linux-newbie-8/unload-kernel-module-at-boot-time-debian-wheezy-7-2-3-2-0-4-686-pae-kernel-4175489749/

    These modules are in the kernel in any decent Linux distribution nowadays because of USB 3.0.

    Thanked by 14n0nx
  • Hidden_Refuge said: Rename the module? Find out where the kernel modules are located first. Could be in /usr/lib/modules or /lib/modules or somewhere else. And if you want to blacklist ehci_hcd you also have to blacklist uhci_hcd.

    I removed ehci (and then after that didn't work also uhci) from the modules folder like the guy in this thread (moved to /root/ ) http://geekdevs.com/2010/04/solved-unable-to-enumerate-usb-device-disabling-ehci_hcd/

    still getting the same error :(

    socials said: Try adding modprobe.blacklist=module-name-here to kernel parameters.

    I tried that, it did not work. Probably because I need to run grub-update for that? Should work in the blacklist file though.. right?

    GM2015 said: Can you try to install debian jessie instead?

    I tried that just now, same error.

    Maybe it's not ehci after all and google was wrong. Here the error messages (had to split into two pictures):

  • It might be a problem with the USB3 driver xhci-hcd, described here.

    Does it work on a USB2.0 port? Try scanning for physical errors on your USB drive, if all else fails.

    Thanked by 14n0nx
  • 4n0nx4n0nx Member
    edited October 2015

    rincewind said: It might be a problem with the USB3 driver xhci-hcd, described here.

    Does it work on a USB2.0 port? Try scanning for physical errors on your USB drive, if all else fails.

    ah I forgot to mention that I tried it on both, USB 3.0 (PC) and USB 2.0 (PC, Netbook).

    I am testing it right now, actually, with "e2fsck -f -cc -k /dev/sdc1". It's going to take a long while but I can do nothing more but wait for suggestions now anyway. :)

  • rincewindrincewind Member
    edited October 2015

    If there is a physical problem, it is likely to be in the boot sector. From what little I can see of your logs, it has not been able to reach the filesystem parts yet.

    Scan physical device /dev/sdc and not /dev/sdc1. Dont know the appropriate tools, but just try

    dd if=/dev/sdc of=/tmp/something bs=1M count=1

    to check if your first few sectors are Ok. Also, did you try with latest Linux image version, just so that you know its not the driver probem?

    EDIT: Try smartctl as well, for warnings. You dont want to scan 32GB...

    Thanked by 14n0nx
  • rincewind said: to check if your first few sectors are Ok. Also, did you try with latest Linux image version, just so that you know its not the driver probem?

    I tried Ubuntu 14.04.(0?)3 and Debian 8.2 :) Direct download as well as torrent. Even downloaded them to different devices and used different methods of creating the installing USB stick (dd and unetbootin). Just installed Ubuntu onto my old USB stick again, works fine as usual.

    Tried your dd line:

    1048576 bytes (1,0 MB) copied, 0,0178314 s, 58,8 MB/s

    assuming that means it's ok

  • smartctl -a -d scsi /dev/sdc

    "SMART Health Status: OK"

  • Try Ubuntu 15.10.

    If it's not a hardware problem then it has to be the driver. Otherwise, I pretty much give up :(

    Thanked by 14n0nx
  • rincewind said: Try Ubuntu 15.10.

    If it's not a hardware problem then it has to be the driver. Otherwise, I pretty much give up :(

    So.. I tried Ubuntu 15.10 64-bit. I was thinking maybe it's a 32-bit problem (N270 only supports that). It still didn't work.

    Then I tried the second, identical stick that I had ordered, which I was planning on giving to someone as a present, and... it works. The first stick works fine and the average user would never notice it, but it must be broken somehow.

    I will keep reinstalling to see if it works with 32-bit and 14.04 and Debian and, if it doesn't, report back.

    P.S.: I figured out that one can hit "e" in the Ubuntu boot menu and then adjust boot parameters like rootdelay and blocking kernel modules (but I don't know if this lets one block modules that are part of the kernel).

    Thanks for all your input. :)

  • To confirm a hardware problem, do a burn-in test. One of these tools?

    Thanked by 14n0nx
  • Kernel code can be disabled, compiled into the kernel, compiled as a module that is in initramfs, or compiled as a module that is only available in /lib/modules (after mounting the root filesystem).

    There is no general way to disable code that has been compiled into the kernel. Code that might potentially cause problems is supposed to have a command line option to disable it (e.g., noapic).

    Moving around .ko files in /lib/modules does not automatically affect the initramfs usually stored under /boot somewhere.

    Thanked by 14n0nx
  • rincewind said: To confirm a hardware problem, do a burn-in test. One of these tools?

    thx but it is already on its way back. Since it works with an identical stick bought from the same store, at the same time, it can only be a hardware problem..

Sign In or Register to comment.