  It is widely accepted that both ripples and dunes form in rivers by primary
linear instability, the wavelength of the former scaling on the grain size,
that of the latter being controled by the water depth. We revisit here this
problem, using the computation of the turbulent flow over a wavy bottom
performed in Part 1. The details of the different mechanisms controlling
sediment transport are encoded into three quantities: the saturated flux, the
saturation length and the threshold shear stress. Theses quantities are
modelled in the case of erosion and momentum limited bed loads. This framework
allows to give a clear picture of the instability in terms of dynamical
mechanisms. The relation between the wavelength at which ripples form and the
flux saturation length is quantitatively derived. Inverting the problem,
experimental data is used to determine the saturation length as a function of
grain size and shear velocity. Finally, using the systematic expansion of the
flow field with respect to the corrugation amplitude, we discuss the non-linear
selection of ripple aspect ratio. Investingating the effect of a free surface
on the linear instability, we show that the excitation of standing waves at the
surface has a stabilising effect, independently of the details of the flow and
sediment transport models. Consequently, the shape of the dispersion relation
is such that dunes can not result from a primary linear instability. We present
the results of field experiments performed in the natural sandy Leyre river,
which evidence the formation of ripples by a linear instability and the
formation of dunes by a non-linear pattern coarsening limited by the free
surface. We show that mega-dunes form when the sand bed presents
heterogeneities such as a wide distribution of grain sizes.
