True that almost all whites where racists by today's standards, but actually most northerners were against slavery. You don't have to not be a racist to oppose enslaving other races. And it was a bigger part of the war on both sides than you're giving it credit for being. Though certainly to your point it wasn't the only reason for the war. Also, Lincoln for sure wasn't championing the anti-slavery banner earlier on, but he did become more anti-slavery as the war progressed
Yes, there were a LOT of people opposed to slavery in the North AND South. It was something that everyone could see would eventually go away. But in 1860, the sentiment was sharply divided between people who had an interest in the cotton, tobacco and cane industry and those who didn't. I would say "MOST" northerners were simply indifferent to slavery one way or the other. For "MOST" southerners, slavery was tied directly or indirectly to their livelihood.
Slavery was the issue in which the South seceded. It wasn't the issue of the war. The war was declared in order to preserve the Union. That's in every public record on the subject. Lincoln was very much anti-slavery. He wanted to end slavery and send the former slaves off to some other country far away from white folks. Before the war, he was negotiating legislation that would have kept slavery legal in the South until 1911. It was the fact that he was SO anti-slavery which prompted Southern states to declare secession.
Lincoln's initial plan to end slavery was to add new states from the western territories as free states, giving them congressional seats and votes where slavery would soon be abolished entirely through legislation. He was working on a plan of what to do with all the free slaves when the states started seceding. Once the war started, he made it clear that his intentions were to keep the Union whole whether slaves were emancipated or not... he didn't care. It wasn't until the brutal death tolls at Antietam and elsewhere, that he found his army was in serious danger of losing it's morale. The public was simply not going to continue to support a senseless bloodbath, day in and day out... unless there was some larger-than-life moral cause... that's where the Emancipation Proclamation came in and the push to make the war about freeing the slaves.