Construction and rehabilitation of boreholes