if it grinds while cranking, the problem might be a bad spot on the flywheel ring gear

if it grinds after the engine starts, it might be the drive pinion gear delayed return to retracted position and the pinion gear is turning with the flywheel