We show how the entire KdV hierarchy as well as the recursion relation between the conserved quantities can be obtained from a spin-2 flow. The relationship between this approach and the zero curvature formulation of the KdV system based on the group SL(2, R) is clarified. We show that the Boussinesq equation can be derived as a flow of the spin-3 transformations. The Boussinesq hierarchy, as well as the relevant Lenard relation, is derived from a combined flow of the spin-2 and spin-3 transformations. We have also given an independent derivation of the Lenard relation for the Boussinesq equation starting from the third order Schrodinger equation.