Okay so I need help finding an amazing book I read way back when. It starts out as I believe a shepherd boy who has been training to accomplish his far fetched dream of becoming a knight. He ends up picking a fight with a soldier. I can't remember if/how he wins, but I think he does win by tapping into unknown magic because he wins the soldiers sword. I think the soldier refuses to give it up. Then at some point a great wizard shows up to the boys adoptive home to give him a chance to become the first wizard warrior, a warrior that can wield magic as well as a sword. They go on an adventure to the king to get permission but I think the king gets mad because the wizard smuggles the boy out of the city and to a wizard school so they can hone his magic. He has one friend, but the rest of the students hate him I think because he can't do magic at all, until one day the boy reaches his magical potential and way later in the series I think becomes this great chaos wizard warrior at war with someone/something.
I need to read it again. Thank you!