在 Ubuntu 中安装内核时(例如http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-vivid/),分别是什么文件:
linux-headers-4.0.0-xxx_all.deb
linux-headers-4.0.0-xxx-generic_xxx_i386/amd64.deb
linux-image-4.0.0-xxx-generic_xxx_i386/amd64.deb
linux-headers-4.0.0-xxx-lowlatency_xxx_i386/amd64.deb
linux-image-4.0.0-xxx-lowlatency_xxx_i386/amd64.deb
Run Code Online (Sandbox Code Playgroud)
Debian(以及 Ubuntu 和其他衍生产品)将 Linux 内核包分为几个部分:
linux-image-VERSION-PATCHLEVEL-FLAVOR
包含引导加载程序加载的内核映像、包含符号表的文件(由某些系统工具使用)、包含内核配置的文件(为系统管理员提供信息)以及可以动态加载的模块。这是系统正常使用所需的包。linux-headers-VERSION-PATCHLEVEL-FLAVOR
包含随内核源代码一起提供或在内核编译期间生成的头文件。编译第三方内核模块需要这些头文件。linux-libc-dev
包含用于编译用户空间程序的头文件。这些头文件向后兼容(与用于编译内核模块的头文件不同),因此无需安装多个版本。linux-doc-VERSION
包含内核文档。它对编写内核模块或诊断内核行为的人很有用。linux-source-VERSION
包含内核源代码。想要编译自己的内核的人可以安装这个二进制包并解压缩它包含的存档。linux-tools-VERSION
包含依赖于内核版本的工具。目前只有perf
.包装将VERSION(上游版本)与PATCHLEVEL(在影响二进制兼容性的每个更改上增加)区分开来。错误修复会影响二进制兼容性,因此需要重新编译模块,因此必须可以安装多个补丁级别的内核(以及头文件和第三方模块),以便您可以同时拥有运行内核的文件和内核文件,您将在下次重新启动时同时安装。每个版本的文档和源都有一个包,因为不需要为不同的补丁级别提供多个副本。
The different FLAVORs correspond to kernel compilation options. Some kernel options are compromises, for example to support computers with large physical memory (at the expense of an overhead in kernel memory) or only computers with small physical memory (less overhead but a smaller maximum amount of RAM).
In current versions of Ubuntu, there are only two kernel flavors: “generic” (suitable for most computers) and “lowlatency” (which makes programs more reactive at the cost of a little more CPU overhead, see https://askubuntu.com/questions/126664/why-to-choose-low-latency-kernel-over-generic-or-realtime-ones). Debian has many more, most of which only make sense on specific architectures.
除了具有完整版本号的包外,还有包名中没有版本的元包。这样,您可以安装linux-image-generic
始终依赖于最新软件包的eg 。例如,版本 3.13.0.42 依赖于,版本 3.13.0.43 依赖于等。随着软件包的升级,更新的内核软件包被引入。linux-image-VERSION-PATCHLEVEL-generic
linux-image-generic
linux-image-3.13.0-42-generic
linux-image-generic
linux-image-3.13.0-43-generic
linux-image-generic