CentOS7 最新内核从“kernel.ko”移至“kernel.ko.xz”

CentOS7 最新内核从“kernel.ko”移至“kernel.ko.xz”

我将内核从 3.10.0-514.26.2.el7.x86_64 更新到 3.10.0-693.11.6.el7.x86_64 我注意到 3.10.0-693.11.6.el7.x86_64 中的所有内核模块现在都附加了“.xz”(下面的示例输出)

/usr/lib/modules/3.10.0-693.11.6.el7.x86_64/kernel/sound/soc/intel/skylake/snd-soc-skl-ipc.ko.xz
/usr/lib/modules/3.10.0-693.11.6.el7.x86_64/kernel/sound/soc/intel/skylake/snd-soc-skl.ko.xz
/usr/lib/modules/3.10.0-693.11.6.el7.x86_64/kernel/sound/soc/snd-soc-core.ko.xz
/usr/lib/modules/3.10.0-693.11.6.el7.x86_64/kernel/sound/soundcore.ko.xz
/usr/lib/modules/3.10.0-693.11.6.el7.x86_64/kernel/sound/synth/emux/snd-emux-synth.ko.xz
/usr/lib/modules/3.10.0-693.11.6.el7.x86_64/kernel/sound/synth/snd-util-mem.ko.xz
/usr/lib/modules/3.10.0-693.11.6.el7.x86_64/kernel/sound/usb/6fire/snd-usb-6fire.ko.xz
/usr/lib/modules/3.10.0-693.11.6.el7.x86_64/kernel/sound/usb/bcd2000/snd-bcd2000.ko.xz
/usr/lib/modules/3.10.0-693.11.6.el7.x86_64/kernel/sound/usb/caiaq/snd-usb-caiaq.ko.xz
/usr/lib/modules/3.10.0-693.11.6.el7.x86_64/kernel/sound/usb/hiface/snd-usb-hiface.ko.xz

但就之前的版本而言,一切仍然只是标准的 *.ko

/usr/lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/sound/synth/emux/snd-emux-synth.ko
/usr/lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/sound/synth/snd-util-mem.ko
/usr/lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/sound/usb/6fire/snd-usb-6fire.ko
/usr/lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/sound/usb/caiaq/snd-usb-caiaq.ko
/usr/lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/sound/usb/misc/snd-ua101.ko
/usr/lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/sound/usb/snd-usb-audio.ko
/usr/lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/sound/usb/snd-usbmidi-lib.ko
/usr/lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/sound/usb/usx2y/snd-usb-us122l.ko
/usr/lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/sound/usb/usx2y/snd-usb-usx2y.ko

当我实际尝试解压缩 ko.xz 时,看起来它们命名错误并且实际上并未压缩

tar -xJf ip_gre.ko.xz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

xz -l 将文件显示为“压缩”

 xz -l ip_gre_default.ko.xz
Strms  Blocks   Compressed Uncompressed  Ratio  Check   Filename
    1       1      8,924 B     32.2 KiB  0.271  CRC64   ip_gre_default.ko.xz

这是否意味着 modprobe 将自动处理压缩的 ko?

它看起来更像是一个构建问题而不是其他问题。

答案1

没问题,可以使用 或 来压缩模块gzipxz使用以下方法启用压缩内核MODULE_COMPRESS构建选项、 用MODULE_COMPRESS_GZIPMODULE_COMPRESS_XZ选择压缩工具。

相关内容