Here's one way:
http://hints.macworld.com/article.php?story=20071214143723301
Another is to use another machine and put the iMac into Firewire target mode and install onto it.
http://hints.macworld.com/article.php?story=20071214143723301
Another is to use another machine and put the iMac into Firewire target mode and install onto it.