LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   kernel compilation : to remove a kernel which files should be deleted (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-compilation-to-remove-a-kernel-which-files-should-be-deleted-354188/)

b0nd 08-17-2005 08:18 AM

kernel compilation : to remove a kernel which files should be deleted
 
hello all,
i'm in the learning stage of compiling kernel.
Just trying hand on Redhat 9 ( 2.4.20-8)

Did compilation for 4-5 times ( and didn't overwrite the old files ), hence now have that much kernels.
Now i would like to remove few of them.

Could any one please tell me which files should i remove ???

1> entries from grub.conf.
2> the separate directory containing "vmlinuz", "system.map", "initrd" etc.

any thing else???

what about the ".config" file..........as far as i know it will work as the starting point while compiling the kernel further...am i right??

regards

lord-fu 08-17-2005 09:21 AM

I am not 100% sure, but I believe you could just remove vmlinuz.old....System.map.old.......any entries from grub or lilo.....and all should be fine. Just make sure grub or lilo entries still point to valid files: the one image or images you wanna keep.

harken 08-17-2005 11:35 AM

You can delete:
-entries in grub.conf
-/boot/vmlinuz-X.Y.Z
-/boot/System.map-X.Y.Z
-/boot/initrd.img-X.Y.Z
-/lib/modules/X.Y.Z
Quote:

what about the ".config" file..........as far as i know it will work as the starting point while compiling the kernel further...am i right??
Yes, that's right, just note that you can't use a 2.4 config file for a 2.6 kernel.
Also, each time I compile a new version of the kernel and I consider it succesful, I copy the .config file to a separate folder, which I call kernel_configs, naming them .config-X.Y.Z, so I can use them in the future if needed.
Also, after compiling and installing a kernel, while you are in the directory where you unpacked it, you may run 'make mrproper' to revert the source to the original state. Note that it will erase the .config too. Afterwards, you can repeat the compiling if you wish.


All times are GMT -5. The time now is 08:31 PM.