How does the Buddha attain nirvana? It is said that only the Buddha, a fully awakened one, knows everything. I'm not sure if there's a name for that wisdom. So the Buddha got that wisdom and used (all-knowing-wisdom) to see the eight noble paths and attained nirvana or is it the other way round?
There are some differences of opinion between the different schools on this kind of thing. First of all, the Theravada school doesn't accept the idea that the Buddha has knowledge of everything (which Mahayana schools tend to teach) but instead teach that the Buddha possesses unobstructed knowledge and vision, meaning that the Buddha had the ability to find an answer to any question given time and effort, and even the precise meaning of this isn't quite clear. Confusingly, the term "unobstructed knowledge and vision" is sometimes translated as omniscience.

This unobstructed knowledge and vision is the result of having cultivated the ten Paramis of generosity, morality, renunciation, wisdom, energy, patience, honesty, determination, goodwill, and equanimity to perfection as a Bodhisatta, and when he attained Arahatship on the night of the full moon in the month Vesakha, the cultivation of these Paramis came to fruit and he obtained unobstructed knowledge and vision.

He attained Arahatship that night by means of the Noble Eightfold Path, just like everyone else, and according to the Pali Suttas, he did so by means of Anapanasati.