Windows Server 2003 SP 2 not installing due to corrupt catalogs

Recently, we have been seeing a number of issues with Windows Server 2003 SP 2 not installing due to corrupt catalogs in the catroot. The installation may fail with the following popup error:

Service Pack 2 Setup Error

Failed to install catalog files.

Select OK to undo the changes that have been made.

Additionally, Windows Server 2003 SP2 may fail to install if there are too many hotfixes being installed.

Actually, this problem is not SP2 specific. It’s not a new issue to us either. We have several resolutions documented in the following KB articles:

822798 You cannot install some updates or programs

https://support.microsoft.com/kb/822798

925931 You may be unable to apply more updates at a certain point on a Windows Server 2003-based computer

https://support.microsoft.com/kb/925931