We analyze a sample of tens of thousands of spectra of halo turnoff stars, obtained with the optical spectrographs of the Sloan Digital Sky Survey (SDSS), to characterize the stellar halo population "in situ" out to a distance of a few tens of kpc from the Sun. In this paper we describe the derivation of atmospheric parameters. We also derive the overall stellar metallicity distribution based on F-type stars observed as flux calibrators for the Baryonic Oscillations Spectroscopic Survey (BOSS). Our analysis is based on an automated method that determines the set of parameters of a model atmosphere that best reproduces each observed spectrum. We use an optimization algorithm and evaluate model fluxes by means of interpolation in a pre-computed grid. In our analysis, we account for the spectrograph's varying resolution as a function of fiber and wavelength. Our results for early SDSS (pre-BOSS upgrade) data compare well with those from the SEGUE Stellar Parameter Pipeline (SSPP), except for stars at logg (cgs units) lower than 2.5. An analysis of stars in the globular cluster M13 reveals a dependence of the inferred metallicity on surface gravity for stars with logg<2.5, confirming the systematics identified in the comparison with the SSPP. We find that our metallicity estimates are significantly more precise than the SSPP results. We also find excellent agreement with several independent analyses. We show that the SDSS color criteria for selecting F-type halo turnoff stars as flux calibrators efficiently excludes stars with high metallicities, but does not significantly distort the shape of the metallicity distribution at low metallicity. We obtain a halo metallicity distribution that is narrower and more asymmetric than in previous studies. The lowest gravity stars in our sample, at tens of kpc from the Sun, indicate a shift of the metallicity distribution to lower abundances, consistent with that expected from a dual halo system in the Milky Way.