1

I have a 5.10.0-11-cloud-amd64 kernel and debian 11.2.

The kernel has been customized to be a cloud server and one of the customization was to remove the usbip drivers that were installed by default.

I have tried to install the drivers from source forge , linux repository torvalds and vhci-hcd but ended up in a Makefile related error each time.

How to install the usbip drivers in this scenario ? Would copying the .ko files work ?

2 Answers 2

1

The /boot/config-5.10.0-cloud-amd64 includes this line:

# CONFIG_USB_SUPPORT is not set

The -cloud-amd64 variant of Debian 11.x kernels has its entire USB subsystem disabled, not just the usbip part of it, so compiling just the vhci-hcd.ko and usbip-core.ko kernel modules would not be sufficient. You would have to rebuild the entire USB subsystem as third-party modules, which would be very tricky.

The answer to your question will depend on your cloud provider: if they enforce the use of specific kernel versions only, and the list of available kernels does not include a kernel with USB support (perhaps for security reasons?), you'll be out of luck.

If your cloud provider does not restrict your choice of kernels, and there are no provider-specific special steps required in choosing a kernel for your cloud VM, the general method for selecting the standard non-cloud amd64 flavor of Debian kernel would be:

apt install linux-image-amd64

This would automatically install the latest non-cloud Debian 11.x amd64 kernel image, which is linux-image-5.10.0-12-amd64 at the time of this writing. You should then use grub-set-default to set it as the default kernel for booting (you might need to refer to /boot/grub/grub.cfg to find the boot entry number or menu item title/identifier for the new kernel). Then you should reboot the cloud VM to activate the new kernel.

When the new kernel is successfully running, you should probably remove the metapackage that causes the cloud kernel to be auto-installed, since the cloud kernels are not going to be suitable for your use case:

apt purge linux-image-cloud-amd64

Amazon EC2 seems to be fine with custom kernels with no special steps required.

That means you could just use the package manager to install the regular (non-cloud) version of the Debian 11.x kernel package, set it as the default for the bootloader (most likely by using grub-set-default), and reboot your cloud VM to use it. That would enable the use of usbip without building any modules at all.


Azure also seems to allow updating the kernel of a Linux cloud VM in a normal fashion. These instructions are for CentOS/RHEL, but the lack of anything cloud-specific in them indicates it should be possible to just switch the kernel as usual for Debian, basically the same as with Amazon EC2 above.


Google Cloud documents the minimum sets of required and recommended kernel options for their cloud environment so switching to non-default kernel is apparently possible. There does not seem to be any special steps required in updating the kernel of an existing cloud VM (as long as it has the required kernel options enabled, which I'm pretty sure all the Debian default non-cloud kernel packages do), so the required steps would seem to be no different from regular physical Debian hosts, or from the Amazon EC2 VMs as above.


For a DigitalOcean "droplet" VM, you would first have to ensure the VM is using an "internally managed" kernel, and switch to that if necessary. After that, the standard Debian procedure for selecting the kernel should work as usual.

2
  • Thanks. How to install debian using package manager? Commented Mar 11, 2022 at 11:25
  • 1
    Not debian, just the non-cloud kernel: apt install linux-image-amd64 which should automatically pull in the newest non-cloud kernel, which is currently linux-image-5.10.0-12-amd64. If it works, you might want to remove the linux-image-cloud-amd64 metapackage so you will no longer get the cloud kernels installed, since they are not suitable for your use case: apt purge linux-image-cloud-amd64
    – telcoM
    Commented Mar 11, 2022 at 11:40
0

You can build usbip from source. Enable source repositories in your /etc/apt/sources.list then run the following command.

sudo apt install apt-src
sudo apt-src update
sudo apt-src install usbip
sudo apt-src --build install usbip
1
  • 2
    Your commands will build the userspace tools; the original poster is asking how to install the drivers, i.e. kernel modules.
    – telcoM
    Commented Mar 11, 2022 at 6:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .