initramfs/initcpio: create MOUNT_FOLDER if it doesn't exist

/usr/lib/kdumpst/kdump-mkinitcpio-hook.sh is run by the kernel hook
when using mkinitcpio and a new kernel is installed.

If MOUNT_FOLDER does not exist it will fail with the following error
message:

==> ERROR: Invalid option -g -- '<MOUNT_FOLDER>/<IMG_FILE>' must be writable
This commit is contained in:
Alberto Garcia
2025-12-15 11:54:29 +01:00
parent 92afdc48d6
commit 9c22feadfa

View File

@ -6,6 +6,7 @@
# before running any of these functions!
#
create_initramfs_mkinitcpio() {
mkdir -p "${MOUNT_FOLDER}"
rm -f "${MOUNT_FOLDER}/kdump-initrd-$1.img"
mkinitcpio -A kdump -S microcode,kms,plymouth -g "${MOUNT_FOLDER}/kdump-initrd-$1.img" -k "$1" 1>/dev/null