There's something about leaving early that makes it look worse than clocking in early. It says you can't wait to get out of there, even if it's just a few minutes. Plus, your boss may have a boss that gets on him for these things so he has to say something.
You just need to work on the time schedule that your boss gave you to be on the safe side. If the agreement between you two states that you need to come in at a certain time and leave at a certain time, then that's exactly what you need to do.
Because you punch out 2 minutes early and nothing is said leads to someone else punching out 5 minutes early which leads to the next one, etc. it's called stopping a problem in its tracks. Just don't punch in early.
What can you do about what? This is your boss, not your mommy. This is a job. That means its all about your getting that job done, not that it's all about you and your "feelings." If it's too much for you to deal with, just quit. I am positive there are any number of people ready, willing, and able to step into your position .
Bosses are greedy. They want that few free minutes at the beginning of your shift and want you to work till the very minute you're supposed to. It's all greed. Stop giving them free time at the beginning of your shift and work up to the minute you're supposed to.
Usually if you have to clock in or not, if your day starts at 9:00 am, you are required to be at your desk ready to begin your day at 9:00 am. You should have already gotten your coffee or tea, etc. You boss has a right to be upset or mad. If your workday ends at 5:00, you clock out at 5:00. It doesn't matter if you clock in five minutes early or 15 minutes early. This only shows your employer you are prompt arriving at your place of employment. Imagine if you clocked out two minutes early every day. Your leaving early time would add up to approximately 45 minutes per month...