After manually compiling and installing a new kernel, what has to be done regarding the initramfs?

A. The initramfs is independent of the kernel and should not be modified unless the hardware configuration of the machine has changed
B. Since the initramfs contains kernel modules, a new initramfs must be built for the new kernel
C. During the compilation of the Linux kernel, a new initramfs is built automatically. The new initramfs only needs to be installed
D. The system should be restarted since the initramfs reconfigures itself for the new kernel during the startup of the system

题解

选项 A,错误,安装或移除 Linux 内核模块后,就要透过「dracut」等工具来重新产生 initramfs。

选项 B,正确。

选项 C,错误,initramfs 的支持与否可以透过 Linux 内核的编译设置档来设置,但是 initramfs 的创建需在安装 Linux 内核模块后再仰赖其它工具来进行。

选项 D,错误,initramfs 并无法进行自我组态。