kdump-load: Create the kdump/pstore directory early in boot

Or else, the service doesn't work properly (yet it doesn't
fail to prevent boot stalls).

Reported-by: John Schoenick <johns@valvesoftware.com>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
Guilherme G. Piccoli
2022-12-15 18:19:05 -03:00
parent 45dc648700
commit 0bfd8fed32

View File

@ -88,7 +88,11 @@ fi
# Find the proper mount point for /home: # Find the proper mount point for /home:
DEVN_MOUNTED="$(findmnt "${MOUNT_DEVNODE}" -fno TARGET)" DEVN_MOUNTED="$(findmnt "${MOUNT_DEVNODE}" -fno TARGET)"
# Create the kdump folder here, as soon as possible, given the
# importance of such directory in all kdump/pstore steps.
KDUMP_FOLDER="${DEVN_MOUNTED}/${KDUMP_FOLDER}" KDUMP_FOLDER="${DEVN_MOUNTED}/${KDUMP_FOLDER}"
mkdir -p "${KDUMP_FOLDER}"
echo "${KDUMP_FOLDER}" > "${KDUMP_MNT}" echo "${KDUMP_FOLDER}" > "${KDUMP_MNT}"
sync "${KDUMP_MNT}" sync "${KDUMP_MNT}"