These words are very close synonyms.
"Whole" comes from "unhurt", and means a single object that has not been subdivided.
e.g. I ate the whole pie by myself. I’m so full right now.
"Entire" comes from "complete", and means no part has been left out.
e.g. I spent the entire day watching TV and drinking beer. It was great!
Set-expressions: on the whole, taken as a whole, the whole nine yards
in its entirety
The expression "whole life" considers one's life to be a single unit that has not been subdivided.
An "entire life" means all the parts (years or experiences) of a life. In this case either could be used.
Though they have similar meanings, "whole" is a little less formal and a bit more common than "entire".