This paper presents a versatile ballast for discharge lamps, whose operation is based on the notion of a loss-free resistor (LFR). The ballast consists of two stages: (1) a boost converter operating in continuous conduction mode (CCM) and exhibiting an LFR behavior imposed by sliding-mode control; and (2) a resonant inverter supplying the discharge lamp at high frequencies. Thanks to this mode of operation, the power transferred to the lamp is regulated by the LFR input resistance, allowing successful ignition, warm-up, nominal, and dimming operation of a range of discharge lamps, with no need for complex regulation schemes based on lamp models. The versatility of the ballast has been experimentally proven for both conventional and electrodeless discharge lamps. Tests include induction electrodeless fluorescent (IEFL), high-pressure sodium (HPS) vapor, and metal-halide lamps.