Dynamic population inversion gratings induced in an active medium by counter-propagating optical fields may have a reverse effect on writing laser radiation via feedback they provide. In this Letter we report, to the best of our knowledge, on the first demonstration of an open-cavity fiber laser in which the distributed feedback is provided by a dynamic grating “written” in a Yb-doped active fiber, either by an external source or self-induced via a weak (~0.1%) reflection from an angle-cleaved fiber end. It has been shown that meters-long dynamic grating is formed with a narrow bandwidth (<50 MHz) and a relatively high-reflection coefficient (>7%) securing single-frequency operation, but the subsequent hole-burning effects accompanied by new grating formation lead to the switching from one longitudinal mode to another. providing a regular pulse-mode dynamics. As a result, periodically generated pulse trains cover a spectrum range of several terahertz delivering millions of cavity modes in sequent pulses.