I'm looking to disable USB via the kernel for a high-performance server.

How can I effectively administer the server, if problems occurs if USB isn't enabled?

Without USB, keyboards and mice devices won't be able to function. I could do it through ILO through the network but I have the possibility of the NIC failing on me or the IP address changing via DHCP.

Are there best practices on this?

  • Why do you want to disable the USB? The performance gain will be small (if it happens at all), you will save at most a few MB RAM. – Renan Jul 8 '14 at 16:35
  • 3
    @Renan There would be exactly zero performance gain from disabling USB in the kernel, and as you point out, it would not save any (meaningful amount of) RAM either. Presumably there is some other motivation (e.g. security). – goldilocks Jul 8 '14 at 16:38
  • The problem is that I believe USB generates interrupts that may slow down critical code. For example cloudlinux.com/blog/clnews/usb_enabled_on_server.php – Nathan Doromal Jul 8 '14 at 17:47

Typically you can set the BIOS to handle USB support, which will work with whatever boot-loader from there. At that point you can have a separate image available to load with USB support for those times that everything goes to pot. This may not work as some USB devices aren't supported by some boot-loaders.

Two notes:

1) I haven't tried this, though the theory should be sound (the crowd can shoot me down if I'm not.

2) I'm also not sure that the USB module is that heavy. You could JUST leave in the specific model you have to make it lighter and still have a keyboard available.

  • Yes that should work. In Grub the boot parameter to shut off usb is "nousb". – Nathan Doromal Jul 8 '14 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.