An Excellent guide for rooting your Dream/Magic (32b) can found over at RyeBrye’s blog.
UPDATE: This exploit hole is closed in Android kernels released August 2009 or later.
This guide uses the flashrec tool create by Zinx.
This tool was available on the Android Market but for obvious reasons, they have removed it.
The manual rooting method stil works as well using a Goldcard. Head over to this XDA thread to view the guide.