On 18.04.2023 18:02, Bjoern Voigt wrote:
If I uninstall an openSUSE kernel, why does the RPM scripts call dracut? I don't think, this is useful. Probably it has something to do with the fact, that one kernel has three RPMs (kernel-default-5.14.21-150400.24.55.3, kernel-default-extra-5.14.21-150400.24.55.3, kernel-default-optional-5.14.21-150400.24.55.3 in the example).
Because you remove package(s) with additional kernel modules and dracut is called by these packages (they may remove modules that were included in initrd).
An example (openSUSE Leap 15.4):
mybox:~ # rpm -qf /boot/vmlinuz-* kernel-default-5.14.21-150400.22.1.x86_64 kernel-default-5.14.21-150400.24.55.3.x86_64 kernel-default-5.14.21-150400.24.60.1.x86_64
mybox:~ # zypper rm kernel-default-5.14.21-150400.24.55.3.x86_64 Reading installed packages... Resolving package dependencies...
The following 3 packages are going to be REMOVED: kernel-default-5.14.21-150400.24.55.3 kernel-default-extra-5.14.21-150400.24.55.3 kernel-default-optional-5.14.21-150400.24.55.3
3 packages to remove. After the operation, 232,5 MiB will be freed. Continue? [y/n/v/...? shows all options] (y): dracut: Executing: /usr/bin/dracut -f /boot/initrd-5.14.21-150400.24.55-default 5.14.21-150400.24.55-default dracut: dracut module 'systemd-coredump' will not be installed, because command 'coredumpctl' could not be found! [...]
Björn