Regardless, whether it's 2 years or 3 years, to do the lifestyle you're suggesting takes and incredible amount of willpower to be willing to sacrifice and prioritize. It's passing up that cell phone upgrade. It's cutting discretionary spending to zero. It's passing on happy hour and bringing lunch every day.
While feasible, it's hard.. but suffering for two years to benefit for a decade. Quite possibly worth it.