We investigate the structural and vibrational properties of glassy B2O3 using first-principles molecular dynamics simulations. In particular, we determine the boroxol rings fraction f for which there is still no consensus in the literature. Two numerical models containing either a low or a high level of boroxol rings are tested against a gamut of experimental probes ( static structure factor, Raman, B-11 and O-17 NMR data). We show that only the boroxol-rich model ( f = 75%) can reproduce the full set of observables. Total-energy calculations show that at the glass density, boroxol-rich structures are favored by about 6 kcal/(mol boroxol). Finally, the liquid state is explored in the 2000-4000 K range and a reduction of f to 10%-20% is obtained.