One of the techniques to estimate selectivities of query predicates is by generating equidepth partitions for a relation and maintaining equidepth histograms. This paper presents a new technique to generate equidepth partitions for a secondary memory resident relation using a linear median find algorithm. A variation of this technique, which involves sorting of the individual blocks, is also proposed and extended to generate arbitrary number of partitions. The proposed techniques are compared with an external sorting based partitioning approach. Finally, an overall strategy to select the partitioning algorithm with possibly dynamic allocation of buffers is proposed.