What do I do to back up the kernel? Which files do I copy? (Debian kernel 2.4.27-2)
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What do I do to back up the kernel? Which files do I copy? (Debian kernel 2.4.27-2)
Just downloaded kernel 2.6.12.3 and what-do-you-know, I actually managed to complied the thing. Before proceeding I'd like to back up my current kernel (something recommended by the instructions anyway). Which files do I copy? I don't want to miss any.
I'm using debian sarge with the stock kernel (2.4.27-2). I boot using grub with a dual boot setup with windows 98 on the other partition.
The /boot/grub/menu.lst entry for debian looks like this:
Not sure about when you compile a new kernel, but if you install one through apt-get it creates a new entry and at boot you can choose the one you want to use.
I have 2.4.27, 2.6.10, and 2.6.11-7-k7 to choose from.
After compiling and installing a newer kernel version, I don't really backup my old kernel, instead I keep the image and the modules until I make sure the new one works as I want it to.
Anyway, the files you may want to backup is /boot/vmlinuz-version, /boot/System.map-version, /boot/initrd-version (if case) and the modules found at /lib/modules/version, where version is something like 2.4.27-2.
Quote:
PS: Is it possible to set up grub to boot from different kernels? For example, adding a entry for the new kernel and keeping the old entry?
Of course, after you install the modules (make modules_install), copy the new vmlinuz and the new System.map to /boot, edit menu.lst to look something like:
This way you keep both kernels. Once you think you don't need the old kernel, remove the old files from /boot and the corresponding directory in /lib/modules.
On a side note, you could compile your new kernel without the need of an initrd.
Great, glad to hear that! Now you can test for a while the new kernel to see if everything works as it should (sound/video/network card, printer, other peripherals) then delete the old kernel and the corresponding modules as they may take up some space and considering future kernel updates you won't want to waste your harddisk space.
Also, it's a good thing to keep a backup of the .config file you used to compile the current kernel, so you can use it for future versions (the compiling options don't change dramatically from version to version).
Anyways, good job.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.