No, there is normally no connection between a first name and a patronym. (Normally his "second name", not his "last name", as that last name would point to where a person lived.)
But children were often named after their grandparents, so the first boy would be named after the paternal grandfather, the second after the maternal grandparent, and with girls after their grandmothers.
Note, however, that this was no hard and fast rule, we often see that naming practise differed a lot, both with time, and with geography.
So, back to the last name/first name stuff: If a man named Hans who lived on the farm called Dal had a boy, and named him Peder, the boy would "write himself" Peder Hansson Dal(what he was called orally and locally could be different.)
Peder's firstborn boy would then often be named Hans after his grandfather, and "write himself" Hans Pederson Dal. His first son again would often be called Peder after HIS grandfather, so he would be Peder Hansson Dal. (Presuming the family still lived on Dal)
This gives you: Greatgrandfather Hans Pederson, grandfather Peder Hansson, father Hans Pederson and son Peder Hansson and so on!
In short: father's first name to son's "second name", and some times grandfather's first name to grandson's first name.