I hope I am able to explain the problem accurately and with sufficient detail.
The problem started with the flashing folder at boot up. I used the Command + r option to get into recovery mode.
When I try to reinstall OS-X, I get stuck here with no option to select a disk.
When I go to the Disk Utility, I can only see this, which I guess is the recovery system. I can't see any other disk.
If I go to File => Disk Image then more folders are visible as seen below:
The weirdest part is that if I now restart the system, it boots properly to the OS and works fine with all data intact. But the flashing folder comes back if I let the system sleep, close the laptop, or restart it again. And I have repeated this cycle 5-6 times now. Below some more pictures of restarting and booting up:
Can anyone help me understand what's going on? Please let me know if any more details are required. Thanks!