DebianThis forum is for the discussion of Debian Linux.
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.
This is what i want to achieve. I have a custom kernel but i want to be able to get new kernel packages with apt-get when available.
So far i downloaded the source and the usual path is taken but newer kernels cannot be upgraded via apt-get (cause no deb kernel package exists in my system).
I definitely think of you may have a alternative route for this. Please
advice
I'm not quite sure what you mean. If you want the kernel source to update automatically, then install linux-source-2.6. That's a virtual package that will offer you an upgrade whenever there is a new source package available in whatever repos you follow. If you want kernels to update automatically, pick an appropriate kernel image and install its virtual package. For example, you might want linux-image-2.6-686. That package is not a "real" kernel, but it forces your system to look for the latest kernel in the 2.6-686 series. Whenever it finds a new one, you get told to install it.
Is that what you want? (If you want automatic updates for your custom kernel, that you can't have.)
If you use kernel-package to compile your kernel, it builds a deb package also which you can add/remove with apt/dpkg. If you use the --append-to-version switch in such a way that your kernel has the same version number as a prebuilt kernel from the repo(or one that will be in the repo in future), apt will think your custom built package is one from the repository and it will replace it with newer versions when they're available - obviously the new version will not include any customization you'd done to the kernel you built yourself.
So if you grabbed the current linux-source-2.6.25 package (which is Debian revision 2.6.25-7) and used --append-to-version="-7-amd64" (for example's sake, assuming amd64 is the arch you're using), apt will see your kernel as linux-image-2.6.25-7-amd64 and will try to update it whenever a higher revision is released. If you use --append-to-version="-7-amd64-custombuilt" or some such, apt will not update it when a higher revision appears.
You'll need fakeroot also to make use of kernel-package, and if you've already compiled a kernel you likely have all the other dependencies already.
obviously the new version will not include any customization you'd done to the kernel you built yourself.
I wanted to avoid recompiling the kernel every time new one came out,
for instance apt-get upgrade -> grab latest kernel source -> use my custom .config to re-build that kernel
I wanted to avoid recompiling the kernel every time new one came out, for instance apt-get upgrade -> grab latest kernel source -> use my custom .config to re-build that kernel
That's only going to get you so far, for obvious reasons. As the kernel source changes, more options become available and various configuration options change or move. You normally need to do a "make oldconfig" to adjust to a new kernel source. Within the same series, you would probably be ok, but I wouldn't normally choose to automate kernel building quite that much.
I wanted to avoid recompiling the kernel every time new one came out,
for instance apt-get upgrade -> grab latest kernel source -> use my custom .config to re-build that kernel
That's a perfectly sound practice, but as Telemachos says, it might not work out when the 2.6.XX version is different. Sometimes the defaults for any new/different/moved config settings will be fine and you won't have problems, but it's likely that will not always be the case with differences in the major version number.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.