Real-time spectroscopy based on an emerging time-stretch technique can map the spectral information of optical waves into the time domain, opening several fascinating explorations of nonlinear dynamics in mode-locked lasers. However, the self-starting process of mode-locked lasers is quite sensitive to environmental perturbation, which causes the transient behaviors of lasers to deviate from the true buildup process of solitons. We optimize the laser system to improve its stability, which suppresses the Q-switched lasing induced by environmental perturbation. We, therefore, demonstrate the first observation of the entire buildup process of solitons in a mode-locked laser, revealing two possible pathways to generate the temporal solitons. One pathway includes the dynamics of raised relaxation oscillation, quasimode-locking stage, spectral beating behavior, and finally the stable single-soliton mode-locking. The other pathway contains, however, an extra transient bound-state stage before the final single-pulse mode-locking operation. Moreover, we propose a theoretical model to predict the buildup time of solitons, which agrees well with the experimental results. Our findings can bring real-time insights into ultrafast fiber laser design and optimization, as well as promote the application of fiber laser.