Damon Register wrote:
> [...]
> docs 2 and 3 cover the idea of keeping the old kernel along
> with the new one in case the new one doesn't work but it isn't
> very clear for me.  

Yes, I recommend this as well. When you compile your own kernel, it's
very easy to do that. All you have to do is follow some simple rules.

> [...]  Is there
> some really easy way to keep the old?  I vaguely remember something
> about copying /boot/vmlinuz.  Do I copy that and the
> /boot/initrd-x.img files then tamper with /boot/grub/menu.lst
> to include the old one?  
> [...]
>    (5)  Install the kernel and the modules (``make modules_install'',
>         followed by ``make install''). 

I would not recommend using "make install" for various reasons (I made
some bad experiences with this command). It's really simple to do it by
hand:

first of all, you have to make sure that the kernel you are going to
compile has a unique kernel version. With SuSE kernel sources, you can
do that at configuration time, you don't have to change the kernel
Makefile. Simply add a "local version" string under "general setup" (I
hope this is still the correct way to do it, I have no 10.2 here, only
a SuSE 10.0 system).

Then compile the kernel and the modules. All of this can be done as
normal user.

To install the modules and the kernel, you have to become root. As root,
use "make modules_install" to install the kernel modules. This will
create a directory under /lib/modules, e.g. "2.6.20.2-local" (here, you
can see the string that has been added as mentioned above to avoid a
clash with any default SuSE kernel or any other kernel on the system).

Then you have to copy the kernel image and System.map, here an example
for i386 architecture (you're in the top-level directory of the kernel
sources or in the build directory if you used one for the kernel
compilation):
$> cp ./arch/i386/boot/bzImage /boot/vmlinuz-2.6.20.2-local
$> cp ./System.map /boot/System.map-2.6.20.2-local

Finally, you have to create an initial ramdisk. The actual command to do
that will vary depending on whether you want a bootsplash etc., see the
mkinitrd help for details.
$> cd /boot
$> mkinitrd -k vmlinuz-2.6.20.2-local -i initrd-2.6.20.2-local

And last but not least, you have to add the new kernel to your
bootloader config. If you have an existing section in grub's menu.lst like

title linux
       root (hd0,5)
       kernel /boot/vmlinuz root=/dev/hda6 vga=0x342 resume=/dev/hda7
       initrd /boot/initrd

then just copy that and make the necessary changes:

title linux.new
       root (hd0,5)
       kernel /boot/vmlinuz-2.6.20.2-local root=/dev/hda6 vga=0x342

resume=/dev/hda7  <== this should be at the end of the previous line
       initrd /boot/initrd-2.6.20.2-local

Of course, this here is only an example which will most likely not work
on your system.

That's all. Now you should reboot and select the new kernel in the grub
menu. If you configured your kernel correctly and if there are no other
problems (you've installed the kernel correctly and you made all
necessary changes to menu.lst, etc.) then the new kernel should boot
successfully. If you used any third-party closed-source kernel modules
with the old kernel, then you have to recompile those modules for the
new kernel. If one of those modules is required to boot the system, then
you have to do that before rebooting the system and add it to initrd;
otherwise booting the new kernel will end with a kernel panic. However,
if you followed the steps mentioned above, you would then be able to
boot the old kernel again to solve the problems... ;-)

HTH, Th.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to