Skip to content

mkinitfs.in: ensure when modinfo is run that correct kernel version is used

Dermot Bradley requested to merge dbradley/mkinitfs:correct-modinfo-call into master

modinfo is called without the "-k version" argument and so if mkinitfs runs when the version of the kernel package installed differs from the version of the running kernel (i.e. just after the kernel package has been upgraded), then modinfo is called (to check firmware requirements) using the wrong kernel version. This could potentially result in some firmware not being added to the regenerated initramfs and a subsequent reboot could fail (due to a newer version of an existing driver now relying on the firmare).

Add the "-k" argument to ensure the correct kernel version is used.

NOTE: Busybox's modinfo does not support the "-k" option. Currently Alpine is using modinfo from the kmod package, however obviously in the future Busybox's version is to be used this this will break. It appears the only solution in that scenario would be to add "-k" support to Busybox's version.

Edited by Dermot Bradley

Merge request reports