Installation of Windows 7/2008 R2 Service Pack may fail with error 0x800f0a12 if access to the BCD was denied during installation, which is required during the installation of the service pack. This can occur if the volume automount policy was set to disabled, or, in rarer cases, if the BCD database is corrupt or missing, or if something is wrong with the boot partition (where the bootloader lives).
Open an elevated command prompt, and run DISKPART.
Enable the automount policy:
DISKPART> automount enable
Restart the server, and try installing the service pack again.
If the above did not resolve the issue, there may be a problem with the boot partition.
Make sure the partition is marked as active (using diskpart or diskmgmt.msc).
Make sure the boot partition is the only partition marked active. This could become a problem if more than one Windows installation (specifically with older versions) is present on your system.
In rare cases, it may be necessary to temporarily give a drive letter to the system partition.
Check whether your BCD bootloader database is corrupt or missing by running bcdedit from an elevated command prompt.
If it returns information about the available boot loader entries, then this is not the case. If it returns an error, you will have to rebuild the BCD database and/or re-install the BCD as the boot loader.
Restart the server and boot into WinRE (Windows Recovery Environment). There, run the command to rebuild and install BCD:
Exit WinRE (restarting the server), then retry installing service pack.
Check whether there are any external drivers such as USB drivers connected to the server. If they also contain a boot loader, the service pack installer may attempt (and subsequently, refuse) to make changes to the boot loader on those drives.