Musk [ Errol - the father ] studied electromechanics at the University of Pretoria, worked as an electrical and mechanical engineering consultant, and developed properties, especially retail and office property development.
His lucrative engineering business took on "large projects such as office buildings, retail complexes, residential subdivisions, and an air force base." He also owned an auto parts store, at least half a share in an emerald mine, and even "one of the biggest houses in Pretoria"
In 1979, Musk and his wife Maye divorced. Maye's book recalls that at the time of the divorce, he owned two homes, a yacht, a plane, five luxury cars, and a truck.
One of Elon's grandfather's was a senior politician in the (white) S.A. Government, the other grandfather a staunch Hitler supporting nazi who left Canada for SA for better acceptance.
No one disputes that Errol Musk had money (including Elon himself), but, as the link illustrates, it was from an engineering business and not from apartheid mines as implied by the OP.
Errol said his children grew up watching him sell emeralds all over the world, after he had them cut in Johannesburg. However, he always stuck to the rules of the trade: contact the potential buyer, meet in a neutral public place ("for obvious reasons"), and be subtle about exchanging money for gems.
Errol Musk had multiple lines of income, including NSRs from three emerald mines that made a return.