1

Are there any rules about what versions of the kernel you can successfully compile and run against a particular OS software base?

That is, supposing I'm on Ubuntu 16.04, which includes some particular versions of glibc, GTK, and tons of other supporting software, I guess I can't just compile any kernel version and run it, since presumably much of these supporting user-land components may have a dependence on particular kernel versions. So are there any ground rules? E.g., within a minor version is fine, etc.

  • Kernel version numbers don't mean anything in terms of importance of changes. They are time based (and opinion poll based). So, you can't make rules based on them. – Munir Jan 11 '17 at 19:07
2

Linux kernel maintainers take backward compatibility seriously. If a system works on a certain version of the kernel, it should work on any more recent version. Since Ubuntu 16.04 ships with kernel 4.4.0, any version more recent than 4.4.0 should work.

There isn't much software that depends on recent kernel featues. Apart from libc and a few system utilities, most software don't interact with the kernel directly, only through libc. There are systems that must keep running for a long time without rebooting, but where people want to run newer software (usually in a chroot from the main critically important, never upgraded installation), so libc tends not to require a very recent kernel version. Ubuntu 16.04 comes with glibc 2.23 which accepts Linux kernels as old as 2.6.32. Most Ubuntu 16.04 software should run on such older kernels, but some system software such as systemd and udev require more recent kernels: as of v229, you need at least 3.11.

Note that all this only applies to userland software. If you need to compile any third-party drivers, you're on your own. Internal kernel APIs change very often.

  • Thanks! So it seems that forwards and especially backwards compatibility is a lot more robust than I had though. – BeeOnRope Jan 12 '17 at 0:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.