diff --git a/kerninst b/kerninst index e3db64ec11dbc7bf638de09baaf75616f6a06630..7998ba9a4377162fbb306991a96b5c3ad8d582d2 100644 --- a/kerninst +++ b/kerninst @@ -43,6 +43,16 @@ if [ "${KERNEL_VERSION}" == "" ] || [[ "${KERNEL_VERSION}" =~ \ |\' ]]; then exit 1 fi +if [ "${BOOT_MANAGER}" == "grub" ] && [ ! -d "/boot/grub" ]; then + kerror "Grub does not seem to be installed or /boot is not mounted." + exit 1 +fi + +if [ "${BOOT_MANAGER}" == "bootctl" ] && [ ! -d "/boot/EFI" ]; then + kerror "Bootctl does not seem to be installed or /boot is not mounted." + exit 1 +fi + function die() { kerror "An error ocurred. Exiting." exit 1