The formation of undular bores in Riemann problems of the good generalized Kaup–Boussinesq equation is investigated by Whitham modulation theory. Firstly, the Whitham equations associated with the one-phase and two-phase periodic wave solutions are given by the finite-gap averaging method. Secondly, the basic structures of rarefaction wave and dispersive shock wave are discussed by considering the self-similar solutions of the Whitham equations. Then we propose a complete classification of all possible wave patterns for the initial discontinuity of the good generalized Kaup–Boussinesq equation, in which it has been shown that the theoretical results from Whitham modulation theory are in good agreement with the full numerical simulations. The correspondences between the soliton frontiers of the dispersive shock waves and the exact soliton solution of the good generalized Kaup–Boussinesq equation are considered, and exotic undular bores are found. Finally, the dam break problem and piston problem are explored to show the important physical applications of the theoretical results, from which certain inspiring phenomena of wave breaking are discovered for the first time.