To fix the boot loop, I tried the following: Restoring the OS by booting from the recovery partition - it didn't work since I had only 15% free space on my drive. Tried manually freeing space from the command line while booted in the recovery partition - I managed to free almost 50% of the HD space but it still didn't work. It might be because of a corrupted download or something. Booted to my Carbon Copy Cloner backup disk and cloned back to the internal HD. The mac kept being restarted when I tried to directly clone to the internal HD due to permission issues when overwriting some files. I had to reformat the drive to APFS, guid partition map first. It took 6 hours to restore 875 GB of data. I was now able to boot to the internal HD again. Freed up a lot of space this time. Downloaded the Catalina installer and also made a copy for backup. Installation took like 1.5 hours. This time, it was a success.