Click to See Complete Forum and Search --> : Compiling the kernel, then KEEPING it


MDesigner
07-07-2004, 06:57 PM
I'd like to know how to keep a kernel handy on CD that I've spent hours configuring & compiling. I checked out the way Slackware CD2 does it.. in the kernels directory, a particular kernel option looks like this:

bare.i/
bare.i/System.map.gz
bare.i/bzImage
bare.i/config

Do I basically gzip my System.map file, and copy it to my own directory, along with my config and bzImage kernel file? Could I just add that to the Slackware CD2 kernel directory (iso file), then burn to CD-R and during setup, use my new kernel?

What's the best way to keep a kernel handy for whenever you need to reformat a machine and use the same kernel you used last time? (PS: I have no floppy drive, in case you were going to mention that) :)

Hayl
07-07-2004, 08:02 PM
i just keep the .config file from the kernel source code directory as a backup and would recompile if needed. a kernel doesn't take long to compile.

if you want just the files, then you need the bzImage (or vmlinux), initrd (if you use one), System.map, and the modules directories for that kernel (under /lib/modules/<version of kernel>)

psi42
07-07-2004, 09:58 PM
I suppose this would work rather nicely:


make menuconfig
make bzImage
make modules
checkinstall "make modules_install"

checkinstall "cp arch/i386/boot/bzImage /boot/vmlinuz-2.x.x \
&& ln -sf /boot/vmlinuz-2.x.x /boot/vmlinuz"


:)

MrManiac
07-14-2004, 04:10 PM
I don't know what kernel version you are using, but if it is 2.6.x you may do a make rpm after configuring the config. This will build a binary and a source rpm package which you can install/reinstall/uninstall easiely.

Just install the binary rpm (do NOT upgrade [-Uhv] or it will overwrite your current kernel) and prepare your grub.conf/lilo.conf

Dark Ninja
07-14-2004, 05:16 PM
I agree with Hayl. Save the .config file and you don't need to worry about anything else. (Of course, this won't work too well if you try to use the .config file for a much newer version of the kernel.)

.config files can fit on floppy disks! (Remember those?) :p