Centos

CentOS7 最新核心從“kernel.ko”移至“kernel.ko.xz”

  • January 13, 2018

我將核心從 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?

它看起來更像是一個建構問題而不是其他任何東西。

這很好,可以使用gzip或壓縮模組xz使用MODULE_COMPRESS核心建構選項啟用壓縮,使用MODULE_COMPRESS_GZIPMODULE_COMPRESS_XZ選擇壓縮工具。

引用自:https://unix.stackexchange.com/questions/416397