One day my mac suddenly closed and after that when I wanted to login, it always shuts down while loading the main user on the login page. I want to reinstall is x without using my data so I started recovery mode using CMD - R. When I choose 'Reinstall mac ...' on the menu it prompts me to the install menu and I click the 'Continue' button and it stucks at that window.
I assume that this is because I am not connected to the internet. It is because when I try, it says 'Try moving closer to your wireless router'. I tried to use networksetup command on Terminal and command not found error is given.
Is there a way to reinstall os x without internet connection, or fix the issue causing the computer to not to be able to connect to the internet?