This saved my installation after the master db became corrupted. - SQL service could not start anymore.
1) recover the master DB from template folder
2) follow this trick to relog the DB from Sql Server management console
3) re-attach the database file














