Linux - General This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-31-2005, 06:19 PM
|
#1
|
|
LQ Newbie
Registered: Jul 2005
Location: Durham, Britain
Distribution: Debian (Sarge)
Posts: 3
Rep:
|
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:
title Debian GNU/Linux, kernel 2.4.27-2-386
root (hd0,1)
savedefault
kernel /boot/vmlinuz-2.4.27-2-386 root=/dev/hda2 ro
initrd /boot/initrd.img-2.4.27-2-386
-Gareth C
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?
|
|
|
|
07-31-2005, 07:24 PM
|
#2
|
|
Senior Member
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,732
|
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.
|
|
|
|
08-01-2005, 03:27 AM
|
#3
|
|
Member
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666
Rep:
|
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:
Code:
title Debian GNU/Linux, kernel 2.4.27-2-386
root (hd0,1)
savedefault
kernel /boot/vmlinuz-2.4.27-2-386 root=/dev/hda2 ro
initrd /boot/initrd.img-2.4.27-2-386
title Debian GNU/Linux, kernel 2.6.12.3
root (hd0,1)
savedefault
kernel /boot/vmlinuz-2.6.12.3 root=/dev/hda2 ro
initrd /boot/initrd.img-2.6.12.3
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.
Last edited by harken; 08-01-2005 at 03:28 AM.
|
|
|
|
08-01-2005, 07:13 AM
|
#4
|
|
LQ Newbie
Registered: Jul 2005
Location: Durham, Britain
Distribution: Debian (Sarge)
Posts: 3
Original Poster
Rep:
|
I've located the files, I'll back them up (I'm paranoid, this is my first attempt at this) then try out the new kernel. Thanks for the help.
-Gareth C
|
|
|
|
08-01-2005, 07:38 AM
|
#5
|
|
Member
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666
Rep:
|
You're welcome. Come back and let us know how it worked.
|
|
|
|
08-01-2005, 03:37 PM
|
#6
|
|
LQ Newbie
Registered: Jul 2005
Location: Durham, Britain
Distribution: Debian (Sarge)
Posts: 3
Original Poster
Rep:
|
It's worked (though I had slight problem getting the initrc.img file to work). I'm typing this on a kernel 2.6 box. Thanks.
-Gareth C
|
|
|
|
08-02-2005, 02:49 AM
|
#7
|
|
Member
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666
Rep:
|
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.
Last edited by harken; 08-02-2005 at 02:57 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:19 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|