0

I configured and made a custom kernel from vanilla kernel downloaded from kernel.org. Now I ported it to another machine with simple 'vmlinuz' and 'initrd.img' copying and some grub config done. (Actually I am using Xen so grub config were also not required for me)

Now for the modules, how can I copy that? Can I copy /lib/modules/(myCustomeKernelVersion) to other system plainly?

Regarding Xen, Ubuntu official documentation for xen-create-image shows --modules option pointing to modules directory. Is it the same directory as the one mentioned above?

Note that I am using vanilla kernel and not distribution kernel. This is required, please no question on that.

2 Answers 2

0

If you are using the vanilla kernel, I would recommend building the same kernel vanilla and modules from the kernel source from the VM itself. Its may not be a good idea to use the modules compiled/available with Ubuntu as this could cause to arch / compatibility issues, panics etc. The custom kernel modules are available in /lib/modules/uname -r if the build has gone through properly.

Note: --modules=/path/to/modules, this option is for pointing the location of the modules within the domU, similar to "--initrd"

1
  • 1. recommendation taken, may be its better but i need to do otherwise. 2. compatibility should not be an issue as modules will be loaded only as required, and arch is same, x86. 3. --modules and --initrd point to locations in Dom0 and not DomU, in a specific folder designated for each DomU. May 18, 2014 at 11:58
0

I do this all the time in my experimentation with booting Ubuntu natively on my Android devices where I need the full modules folder, system.map vmlinuz, and config. You can grab the full build, source and modules and all you have to do is open a command prompt in /lib/modules then use

sudo zip -r your-custom-kernel-string.zip your-custom-kernel-string

Then copy the zip to the place you want hold them like your desktop or home folder and chown them after that. That will zip all relative files in the custom kernel modules folder.

0

You must log in to answer this question.

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