An extensive survey of the D2 absorption spectrum has been performed with the high-resolution VUV Fourier-transform spectrometer of the DESIRS beamline at the SOLEIL synchrotron. The frequency range of 90 000-119 000 cm-1 covers the full depth of the potential wells of the B 1{Sigma}+u, B 1{Sigma}+u, and C 1{Pi}u electronic states up to the D(1s) + D(2ell) dissociation limit. Improved level energies of rovibrational levels have been determined up to respectively v = 51, v = 13, and v = 20. Highest resolution is achieved by probing absorption in a molecular gas jet with slit geometry, as well as in a liquid helium cooled static gas cell, resulting in line widths of ~0.35 cm-1. Extended calibration methods are employed to extract line positions of D2 lines at absolute accuracies of 0.03 cm-1. The D1{Pi}u and B 1{Sigma}+u electronic states correlate with the D(1s) + D(3ell) dissociation limit, but support a few vibrational levels below the second dissociation limit, respectively v = 0-3 and v = 0-1, and are also included in the presented study. The complete set of resulting level energies is the most comprehensive and accurate data set for D2. The observations are compared with previous studies, both experimental and theoretical.