How much do grades from beginning of bachelors impact PhD admission?
This may depend on the country as well as university/institute. You should have a look at the corresponding websites, as most information regarding PhD admission can be found online.

For example, the TU Munich website [1] states:


  Results are considered to be above average if studies were completed
  with an average grade of at least 2.5, or at a minimum passed with a
  grade of “good.” In exceptional cases, your above-average
  qualifications can also be proven through academic work (e.g.
  publications) completed after your course of study.


This means that your bachelor or earlier grades to not affect PhD admission as a hard citerion. However, when you hand in your application the professor will have a look at ALL your grades. It is his/her finial decision whether to accept you, so all your grades might have an influence on the outcome.

Personally, I have experienced that having publications beforehand helps a lot. Thereby you prove that you have at least a basic understanding of scientific work. This may give you an advantage compared to other applicants.

[1] https://www.gs.tum.de/en/applicants/application/requirements/