In this paper we present BeppoSAX and XMM-Newton observations of two long Gamma-ray bursts , the X-ray rich event of December 11 , 2001 ( GRB011211 ) and the hard and very bright event of November 21 , 2001 ( GRB011121 ) . In both events we find evidence of a late X-ray burst , taking place several minutes after the prompt emission . In the November burst the spectrum of the X-ray burst is much softer than that of the preceding prompt phase , and consistent with the spectrum of the afterglow at 1 day . In addition , the tail of the X-ray burst and the light curve of the afterglow at 1 day are connected by a single power law \approx ( t - t _ { 0 } ) ^ { - \delta _ { X } } , when t _ { 0 } corresponds with the onset of the X-ray burst . These evidences suggest that the late X-ray burst represents the onset of the afterglow . A similar conclusion is drawn for the December burst . The temporal and spectral behaviour of the X-ray and optical afterglows indicate that the fireball evolution in the December burst takes place in a ISM environment . On the contrary in the November burst the wind case is revealed by an X-ray decay slower than that observed in the optical ( \delta _ { X } = 1.29 \pm 0.04 vs \delta _ { O } = 1.66 \pm 0.06 ) . The wind profile should change into a constant density profile at large radii , in order to reconcile late-time radio data with a jet . Two other results are obtained for this burst . An X-ray burst is preceding by about 30 s the much harder GRB . Contrary to the prediction of simple models of precursor activity for collapsars , its spectrum is not consistent with a black body . Finally , a substantial absorption column ( { N _ { H } } = ( 7 \pm 2 ) \times 10 ^ { 22 } cm ^ { -2 } ) is detected during the early part of the prompt emission . This is much greater than that of the wind , and it is thus likely associated with the region surrounding the burst .