How to: Rebuild the Master Database for SQL Server 2005
Use of the Setup command to rebuild the master database has changed in this Microsoft SQL Server release. Run Setup.exe to rebuild, verify, and repair a SQL Server instance, and rebuild the system databases. This procedure is most often used to rebuild the master database for a corrupted installation of SQL Server.
When possible, use Windows Authentication.
For more information and example command prompt syntax, see How to: Install SQL Server 2005 from the Command Prompt.