Operating Systems > Linux and UNIX
Kernel modules
Agent007:
hi all,
I'm in the process of recompiling a new kernel...I'm gonna make a new entry in
Grub so that the new or old kernel can be selected from there. However, if the
old kernel is selected, will it work? I mean, the new modules will be
overwriting the old ones correct?
Also, what will happen to the new system.map file and the existing one? Will the
old kernel be able to use the new system.map file?
thanks,
007
[ January 13, 2003: Message edited by: Agent007 ]
beltorak0:
I'm not sure about the System.map file; but here's the other part. At the top of the Makefile in /usr/src/linux-whatever, there should be a line: "EXTRAVERSION=something". change that to "something-new" and all the modules get installed to /lib/modules/<version>something-new", so you can safely recompile the same kernel version without obliterating your currently working modules.
Now for the conjecture -- try editing the startup script for your system. Look for this line in "/etc/inittab": "si:S:sysinit:/etc/rc.d/rc.S". That's the startup script; i think it's "/etc/rc.d/sysinit" in RH, but don't quote me on that. At the tail of that script, after the root partition is mounted read-write (or further in the initscripts after the /boot partition is mounted if you set it up that way), drop in the line: "ln -sf /boot/System.map-`uname -r` /boot/System.map".
"uname -r" will extract the correct version (including your made-up-suffix: EXTRAVERSION) and symlink the right file to System.map. note: before rebooting, rename the current System.map file to "/boot/System.map-`uname -r`" to avoid losing your curent System.map file during the boot. It also might be a good idea to copy the working kernel configs to the boot directory using the same naming scheme, just in case you need to save space and delete /usr/src/linux-whatever and want to later make a small tweek to the kernel.
hope that helps.
-t.
voidmain:
And I don't know what distro you are using. If you are using Red Hat or Mandrake you do not have to edit your GRUB configuration. A "make install" will automatically add a new entry for your kernel in addition to the old one. See my tip:
http://voidmain.kicks-ass.net/redhat/redhat_8_kernel_2.4.20_from_source.html
mobrien_12:
LOL, thats a great domain name!
Unique and interesting page style also.
Agent007:
Void Main,
You have mentioned that there will be 2 kernel entries in Grub...How is the old kernal gonna load its modules? The old ones will be overwritten by the new modules.....
Also, what will happen to the system.map file?
thanks,
007
Navigation
[0] Message Index
[#] Next page
Go to full version