3

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?

3

Kernel modules are in the kernel package:

motiejus@skveez> dpkg -S /lib/modules/2.6.32-5-amd64/kernel/arch/x86/kvm/kvm-amd.ko
linux-image-2.6.32-5-amd64: /lib/modules/2.6.32-5-amd64/kernel/arch/x86/kvm/kvm-amd.ko

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:

apt-get install linux-image-2.6-<arch>-<flavour> --reinstall

You can get installed kernels in this way:

uname -a
dpkg -l 'linux-image-*'
| improve this answer | |

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.