"The roots of racism probably lie in the idea of race. People didn't always define themselves by race."
The logic is obvious- but can only be realized once you break yourself of the notion that race as this society imposes it is a matter of the natural order of humankind- it quite simply isnt.
Racism didnt start as a practical utility in social development until a few guys like Johann Friedrich Blumenbach, Joseph Arthur Gobineau and Houston Stewart Chamberlain decided that skin color was the primary variance among humans and that that property alone could determine a great number of things in regards to origin, behavior, and intellect.
people bought into the idea as encouraged by evolutionary science that in nature some species are more evolved then others so certainly the idea that dark skinned people look more like their ape ancestors couldnt be too far fetched. Applying this ideology as a means of justifing slavery and colonialism bred this mentality throughout the world and when it came time to lock in the national security of the revolutionary US they further distilled this us and them mentality to disavow all ideas of culture and foreign influence. People who were formerly British were now British American and before too long they were just american- but of course they needed an additional label to distinguish them from the lesser evolved (or 3/5) american and hence called themselves "White."
the problem is that racism still exists in that people still refer to themselves by ideas that were only available through racist thought.
If "whites" were not unilaterally and semantically racist- they would call themselves European Americans in the same fashion that all other ethnicities are obligated (by census) to refer to themselves.