ยง2023-11-11
After kernel updates, it must invoke scripts in /etc/kernel/postinst.d.
Exmaple;OdroidHc4 running Ubuntu Jammy
alexlai@hc4JamGen:/boot$ ls /etc/kernel/postinst.d/ -l
total 16
-rwxr-xr-x 1 root root 1107 Oct 1 2021 dkms
-rwxr-xr-x 1 root root 863 Feb 9 2022 initramfs-tools
-rwxr-xr-x 1 root root 882 May 27 2021 xx-update-initrd-links
-rwxr-xr-x 1 root root 890 Oct 10 16:18 zz-flash-kernel
These scripts are executed in alphanumeric order within the /etc/kernel/postinst.d/ directory after the kernel installation process is completed. They ensure that various components, such as kernel modules, initramfs, and bootloader configurations, are appropriately updated to work with the new kernel version. The naming convention with 'zz' in the last script suggests that it is intended to run last in the sequence.
This DKMS (Dynamic Kernel Module Support) package (http://linux.dell.com/dkms/) provides support for installing supplementary versions of kernel modules. The package compiles and installs into the kernel tree. Uninstalling restores the previous modules. By default, installation is into the current kernel tree, but any kernel tree can be selected with command-line options. Furthermore, DKMS is called automatically upon installation of new Ubuntu kernel-image packages, and therefore modules added to DKMS will be automatically carried across updates.