Multiple kernels with different modules
Hi all,
I need multiple linux kernels, but for all kernel I want to have different modules. When I try to recompile my original kernel (of Slackware 12) I change some exclude some modules and make some changes in the kernel. After that reboot with new kernel, but it stuck :(. I try to reboot with original one but there ware errors (missing or invalid modules). I reinstall Slackware and try to change only the type of the CPU and recompile only the kernel (no module changes). After reboot with new kernel I receive some errors and modules (of the original kernel) was not loaded. So I need to have different kernels with different modules. Please tell me how to compile new kernel with it's own modules? |
Welcome to LQ!
You didn't state how/where you rebuilt your kernel. Follow my Kernel Rebuild Guide this time. If you wish to start with the Slackware kernel configuration options, and just change some of them, cp that configuration file to the path of your new kernel source, such as: Code:
cp /usr/src/linux-2.6.21.5/.config /home/mingdao/kernel/linux-2.6.24.3/ following that guide. |
I assume you used menuconfig, right?
First, do not forget to add distinct local suffix to each uild, so its module directory is distinct from all the others. Second, for a life with much less problems, if you are not experienced with kernel builds, find out what modules are loaded on your machine, check web for wat modules are needed to recognize your HDD/mount your root FS (they are at the ottom of the list) and compile them into the kernel. Distribution provides initrd with each kernel, and that ramdrive has all the drivers needed (and it is loaded by GRUB using BIOS calls). But surely initrd drivers match shipped kernel, but fail to load if you replace the kernel.It would be OK once you mount root FS and get to use /lib/modules, but you need to access HDD for that. You can start reading /documentation on initrd/initramfs now, but do use distriution default (and ignore any errors with module loading) until you are absolutely sure that the kernel is built right. |
To clarify what raskin said, if you use the same kernel version,
then you will have to append a local version to the kernel. Look in /lib/modules/ and you will see something like: Code:
mingdao@silas:~$ ls -l /lib/modules/ Since there are two 2.6.23.15 kernel versions, you see one of then has a local version of -smp appended to it. I'd recommend getting the latest stable kernel source from kernel.org and either building it yourself, or starting with the .config file from your present working kernel as stated above. Also build your new kernel under your users /home/<username> directory. If you rebuilt the kernel that your OS came with, and did not append a local version string, you have written over the modules and now you will need to fix that. |
Ok, but how to add local version to the kernel - just to copy original one i new directory with name something like "linux-2.6.21.5_local", or I can add some additional parameter to make bzImage?
10x for your answers :). |
Ok, I think I found it :) (General setup->Local version)
|
Yes, go to the "Local version - append to kernel release (LOCALVERSION)" and press enter,
then it will allow you to type the name you want to append to your local version. You need not enter a - or _ as the kernel will put the - there for you. |
All times are GMT -5. The time now is 08:44 PM. |