Erosion and dune formation on particle beds submitted to shearing flow