Error – Cannot Recover the Master Database. SQL Server Is Unable To Run.

Recently had to install Full-Text to an existing SQL Server 2008 R2 install  for an application when all of a sudden the feature fails to install.
Weird.

Checked SQL Server Management Studio. Couldnt connect. Rebooted. No luck.

You can check the error logs if you navigate to where the SQL Server binaries are located in this location which was what I proceeded to do:
%Program-Files%\Microsoft SQL Server\MSSQL.1MSSQL\LOG\ERRORLOG

Opened the latest error log in notepad and found the below error in the file:

RecoverMasterDB#1

Solution:

Restore from backup. But incase you dont, heres how you fix it:

Navigate to C:\Program Files\Microsoft SQL Server\MSSQL\binn where the SQL Server executable is located.

Run the following command:

Note the following variables to switch out in the script:

<Instance_Name>
<SysAdminAccount>
<password>

.\setup /ACTION=REBUILDDATABASE /INSTANCENAME=<Instance_Name>  /SQLSYSADMINACCOUNTS=<SysAdminAccount> /SAPWD=<Password>

Once the command has been run, you should now be able to open SQL Server Management Studio.

This method will detach the databases, but will not delete any of the files. Reattach the databases using the MDF and LDF files.
Restart your application services.