for isofile in $isopath/ROSA.FRESH.*.iso; do
  if [ -e "$isofile" ]; then
    regexp --set=isoname "$isopath/(.*)" "$isofile"
    submenu "$isoname ->" "$isofile" {
      iso_path="$2"
      loopback loop "$iso_path"
      probe --label --set=cd_label (loop)
      menuentry "Start ROSA Desktop Fresh" {
        bootoptions="iso-scan/filename=$iso_path root=live:CDLABEL=$cd_label ro rd.live.image quiet rd.live.overlay.size=256 rootflags=rw,noatime rd.luks=0 rd.md=0 rd.dm=0 rhgb splash=silent logo.nologo"
        linux (loop)/isolinux/vmlinuz0 $bootoptions
        initrd (loop)/isolinux/initrd0.img
      }
      menuentry "Install ROSA Desktop Fresh" {
        bootoptions="iso-scan/filename=$iso_path root=live:CDLABEL=$cd_label ro rd.live.image quiet rd.live.overlay.size=256 rootflags=rw,noatime rd.luks=0 rd.md=0 rd.dm=0 install rhgb splash=silent"
        linux (loop)/isolinux/vmlinuz0 $bootoptions
        initrd (loop)/isolinux/initrd0.img
      }
      menuentry "Install ROSA Desktop Fresh in basic graphics mode" {
        bootoptions="iso-scan/filename=$iso_path root=live:CDLABEL=$cd_label ro rd.live.image quiet rd.live.overlay.size=256 rootflags=rw,noatime rd.luks=0 rd.md=0 rd.dm=0 install nomodeset plymouth.enable=0"
        linux (loop)/isolinux/vmlinuz0 $bootoptions
        initrd (loop)/isolinux/initrd0.img
      }
    }
  fi
done

