Recovery functions blocked by firmware password after installing rEFInd boot loader and Ubuntu partition
Ok, long story: Used dual boot with OS X Mojave and Ubuntu 18.04 on separate partition (iMac Retina 5K, 27-inch, Late 2014). Everything was bliss until an Ubuntu bug started locking me out of my personal folders and everything went into a "snap" folder on the desktop. Disaster struck after I tried to repair Ubuntu and resulted in a totally wrecked Ubuntu OS. rEFInd boot loader disappeared and the dreaded Grub loader hijacked the computer booting into a destroyed Ubuntu OS each and every time. With the aid of my wife's computer I managed to create a bootable USB stick with Mojave and managed to start and recover my Mac from there using time machine backup. The McIntosh HD now back to its former 3TB and everything should be hunky dory, but with a looming shadow and worry:
I cannot reach recovery by restart and hold cmd-r without getting a firmware prompt. Same with internet recovery opt-cmd-r. Holding "shift" with the intention to get to the boot loader menu does not work and firmware prompt appears.
Re-starting the computer holding "space" will not get me into safe mode and opt-cmd-r-p will just start the computer without re-setting the PRAM.
Also, the computer use a much longer time booting than before even if it is just as fast when once booted.
Prior to my (stupid) experiment with dual boot and Ubuntu my mac was never set with a firmware password and never had such problems, leading me to a nagging suspicion that it has been compromised or been hacked during my endeavours.
Maybe somebody in this community has a solution/fix that can put my Mac straight and mind at ease?
Please ask questions in case there is a need for clarification on any matter regarding this.
iMac with Retina 5K display, macOS 10.14