Prisoners climbed onto a prison roof in Sydney as smoke billowed from a burning section of the building on Monday.