Joe Root's team tumbled from 246 for four to be all out as Australia seized the upper hand following an attritional opening day.