LK="."
[ -L boot/kernel-lts ] && LK="$(readlink boot/kernel-lts)"
if [ "$(dirname $LK)" != "." ]; then
  echo "This is a efi installation"
  ln -sf $LK boot/kernel-lts
  if [ -f boot/$LK ]; then
    mv boot/kernel-6.6.67-Grat-OS-lts boot/$LK 2>/dev/null
    ln -sf $LK boot/kernel-6.6.67-Grat-OS-lts
  else
    echo "EFI Partition not found, mount EFI Partition and re-install the kernel"
  fi
else
  echo "This is a bios installation"
  if [ -L boot/initrd ]; then
    if [ -x usr/bin/dracut ]; then
      dracut --kver 6.6.67-Grat-OS-lts 2>&1 > /dev/null
      ln -sf initramfs-6.6.67-Grat-OS-lts boot/initrd-lts
    else
      mkinitramfs 6.6.67-Grat-OS-lts
      ln -sf initrd-6.6.67-Grat-OS-lts boot/initrd-lts
    fi
  fi
  ln -sf kernel-6.6.67-Grat-OS-lts boot/kernel-lts

fi
