kdump-config: Ensure that /var/lib/kdump exists

When building an image with debootstrap and using chroot to install kdump-tools, no initrd will be generated on installation (and no /var/lib/kdump directory will be created). The first boot will causes error messages:

Creating symlink /var/lib/kdump/vmlinuz.
ln: failed to create symbolic link '/var/lib/kdump/vmlinuz': No such file or directory

The same happens if kdump-config symlinks $kver is called the first time.

So add /var/lib/kdump directory to the kdump-tools package and also ensure that /var/lib/kdump is created before trying to create symlinks in this directory.

This fix is worth to be included in bullseye.

Closes: #991175

Edited by Benjamin Drung

Merge request reports

Loading