Abstract. We discuss magnetic field generation by the proton Weibel instability in relativistic shocks, a situation that applies to the external shocks in the fireball model for Gamma-ray Bursts, and possibly also to internal shocks. Our analytical estimates show that the linear phase of the instability ends well before it has converted a significant fraction of the energy in the proton beam into magnetic energy: the conversion efficiency is much smaller (of order m e /m p ) in electron-proton plasmas than in pair plasmas. We find this estimate by modelling the plasma in the shock transition zone with a waterbag momentum distribution for the protons and with a background of hot electrons. For ultra-relativistic shocks we find that the wavelength of the most efficient mode for magnetic field generation equals the electron skin depth, that the relevant nonlinear stabilization mechanism is magnetic trapping, and that the presence of the hot electrons limits the typical magnetic field strength generated by this mode so that it does not depend on the energy content of the protons. We conclude that other processes than the linear Weibel instability must convert the free energy of the protons into magnetic fields.