for krnlfile in $isopath/*.lkrn; do
  if [ -e "$krnlfile" ]; then
    regexp --set=krnlname "$isopath/(.*)" "$krnlfile"
    menuentry "$krnlname" "$krnlfile" {
      krnl_file="$2"
      linux16 $krnl_file
    }
  fi
done
