I have transferred the disk of a a Hardyvirtual machine to another virtual machine with a different kernel but there is no equivalent of /lib/modules// on disk. How can the /lib/modules of the new kernel be added to the image to let it boot without error messages?
Is there apt-get command to download the kernel modules of the new kernel from the repository?
Kernel modules are in the kernel package:
You will have to apt-get install the kernel that's in the new server to reinstall the mdoules.
You didn't mention the target (new) system distribution. If kernel was compiled from source, you'll have to do sudo make modules_install from the kernel tree. If it's debian/ubuntu and kernel was from the repository, run:
You can get installed kernels in this way: