Re: [SLE] RE: Compiling new kernel sanity check
--- Ken Schneider
On Sun, 2005-04-10 at 18:49 -0700, Martin wrote:
1. uname -r to find out my current kernel version 2. install kernel source rpm 3. cp /boot/vmlinuz-$(uname -r) /boot/vmlinuz.old 4. cp /boot/initrd-$(uname -r) /boot/initrd.old 5. cd /usr/src/linux 6. zcat /boot/config > .config 7. make oldconfig 8. make xconfig - I did my changes here 9. make clean bzImage 10. make modules 11. INSTALL_PATH=/boot make install 12. make modules_install
What about the old kernel modules, make sure they are still around.
Ken, what should I do now to make sure they are around? I guess at this point they are gone, correct? Thx, Martin __________________________________ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs
Martin wrote:
Ken, what should I do now to make sure they are around? I guess at this point they are gone, correct?
Thx, Martin
Not necessarily. The kernel modules get installed in /lib/modules/2.6.x where x is the version number. So if you are compiling a kernel with a different version number, you won't have overwritten the old modules and should can reboot with the old kernel. If you look in the kernel Makefile, the fourth line reads EXTRAVERSION = You can change this to something else like EXTRAVERSION = -xyz Then the kernel modules will all get put in /lib/modules/2.6.x-xyz and its extremely unlikley that you'll ever get anything to conflict with them. You can even do this now and repeat the make bzImage and make modules_install steps. It is now possible to compile kernels, even with the same version numbers, that won't conflict with each other. So you don't need to move the old kernel and therefore can guarantee you have something that will still boot. -- JDL
John Lamb wrote:
Martin wrote:
Ken, what should I do now to make sure they are
around? I guess at this point they are gone, correct? Thx, Martin
Not necessarily. The kernel modules get installed in /lib/modules/2.6.x where x is the version number. So if you are compiling a kernel with a different version number, you won't have overwritten the old modules and should can reboot with the old kernel.
If you look in the kernel Makefile, the fourth line reads
EXTRAVERSION =
You can change this to something else like
EXTRAVERSION = -xyz
Then the kernel modules will all get put in /lib/modules/2.6.x-xyz and its extremely unlikley that you'll ever get anything to conflict with them. You can even do this now and repeat the make bzImage and make modules_install steps.
It is now possible to compile kernels, even with the same version numbers, that won't conflict with each other. So you don't need to move the old kernel and therefore can guarantee you have something that will still boot.
This is exactly what I do, so you always have a fallback. You don't have to call the new kernel "vmlinuz", you can call it "strawberry" or "2.6.8-241" or whatever takes your fancy, as long as menu.lst contains an entry for it. Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, Keen licensed Private Pilot Retired IBM Mainframes and Sun Servers Tech Support Specialist Microsoft Windows Free Zone - Linux for all Computing Tasks
On Sun, 2005-04-10 at 20:20 -0700, Martin wrote:
--- Ken Schneider
wrote: On Sun, 2005-04-10 at 18:49 -0700, Martin wrote:
1. uname -r to find out my current kernel version 2. install kernel source rpm 3. cp /boot/vmlinuz-$(uname -r) /boot/vmlinuz.old 4. cp /boot/initrd-$(uname -r) /boot/initrd.old 5. cd /usr/src/linux 6. zcat /boot/config > .config 7. make oldconfig 8. make xconfig - I did my changes here 9. make clean bzImage 10. make modules 11. INSTALL_PATH=/boot make install 12. make modules_install
What about the old kernel modules, make sure they are still around.
Ken, what should I do now to make sure they are around? I guess at this point they are gone, correct?
Since I don't have access to your PC you tell me. If you don't know where to look then you can expect trouble. Did you at least use a different kernel name? If so then the modules should still be there. I'm all for learning but do some reading first and find out where things -should- be before you get into trouble and come to this list in a panic looking for help. -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998 "The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners." -Ernst Jan Plugge
participants (4)
-
John Lamb
-
Ken Schneider
-
Martin
-
Sid Boyce