From Android Wiki
I've looked through the update.zip and it seems only a few changes are needed to -keep- root.
- Flash the recovery image from http://forum.xda-developers.com/showthread.php?t=443041
- Unzip the FULL rc30
- Replace the system/recovery.img with the one from the above url.
- Copy system/bin/sh to system/bin/rootshell, and make the following changes to META-INF/com/google/android/update-script (or download a modified copy from a trusted source)
Add this to the end of the first line, which should start with: assert getprop("ro.build.finger.......
|| getprop("ro.build.fingerprint") == "generic/htc_dream/dream/trout:1.0/TC3/eng.jesusfreke.20081105.164210:eng/test-keys"
After set_perm_recursive 0 2000 0755 0755 SYSTEM:bin add set_perm 0 2000 04755 SYSTEM:bin/rootshell
BACKUP anything from /system as it will be formatted. Do -not- use the 4 meg rc30 patch, as it bricks systems.
Resign with the utility provided in the above link, copy to sdcard, enter recovery, and pray. If it works, you can run the following from the terminal app (not pterminal) /system/bin/rootshell
I've sucessfully done this on my machine.