LK="."
[ -L boot/$name ] && LK="$(readlink boot/$name)"
if [ "$(dirname $LK)" != "." ]; then
  echo "This is a efi installation"
  ln -sf $LK boot/$name
  if [ -f boot/$LK ]; then
    mv boot/kernel-4.19.146-NuTyX-419 boot/$LK 2>/dev/null
    ln -sf $LK boot/kernel-4.19.146-NuTyX-419
  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-419 ]; then
    mkinitramfs 4.19.146-NuTyX-419
    ln -sf initrd-4.19.146-NuTyX-419 boot/initrd-419
  fi
  ln -sf kernel-4.19.146-NuTyX-419 boot/kernel-419
fi
