Method one. Grab the bolt sleeve and twist.
Method two. Hook the cocking pice on the edge of the bench, vice jaw, etc, pull the cocking piece back, and either twist the bolt sleeve or rotate the safety to upright position.
Method three. Grab the cocking piece lug in vice and proceed as in two.
Method four. Make a clever little tool as illustated above, and proceed as in two or three.
Method four. Do as one of my customers did, with an expensive custom rifle, while on safari - grab the bolt sleeve with vice grips and twist.
Remember that a Mauser has the bolt sleeve locking plunger.