#!/bin/bash LATEST_HKR=$( find /boot -name 'vmlinuz-*.blackjack.hkr.x86_64' | sort -V | tail -n1 ) [ -z "$LATEST_HKR" ] && exit 1 /usr/sbin/grubby --set-default=$LATEST_HKR # we should succeed if there is no GRUB2 yet exit 0