Revert "Merge branch 'detect_partitions'"

This reverts commit 5aedd58103e6066cbb306f4da05c5bfd6fe74257, reversing
changes made to c089b0acb58c3836b1b57077dd25373a24553825.