We consider a one-dimensional system of interacting bosons in a random potential. At zero temperature, it can be either in the superfluid or in the insulating phase. We study the transition at weak disorder and moderate interaction. Using a systematic approach, we derive the renormalization group equations at two-loop order and discuss the phase diagram. We find the universal form of the correlation functions at the transitions and compute the logarithmic corrections to the main universal power-law behavior. In order to mimic large density fluctuations on a single site, we study a simplified model of disordered two-leg bosonic ladders with correlated disorder across the rung. Contrarily to the single-chain case, the latter system exhibits a transition between a superfluid and a localized phase where the exponents of the correlation functions at the transition do not take universal values.