If there is a chance the optical drive has some defect, then an authorized
service provider may be able to use an external optical drive to install the
OS X from the DVD media. If there is a chance the original installer DVD
is somehow damaged, you may be able to order one based on product
serial number and model build information, from Apple direct, online or
by phone. A third party optical drive (USB) with equivalency of SuperDrive
(with tray load) may be an inexpensive alternative to test to see if that
helps; some stores have a fair return policy (ask) if the unit won't help.
If you have an original DVD install media kit (and your iMac is truly a
Mid 2007, either 20-inch or 24-inch) the following may be true:
iMac 7.1 (other identifiers vary depending on display/hardware build)
Original OS Mac OS X 10.4.10 (8R4031)
Later OS Mac OS X 10.5 (9A581, 9A3129), or 10.5.2 (9C3033)
Maximum OS Latest release of OS X
Hardware Test AHT 3A126, or 3A141
Is the DVD media an original grey label install-restore system disc that was
shipped with the computer when new, or is the DVD a Snow Leopard 10.6.3
retail version full installer such as one may buy from Apple Store online?
Can you better identify the iMac computer? Usually they're identified by
model year introduced and a model build number. (Example, such as
Mid 2007, etc; and/or iMac 5.1, etc.) As this could be useful to get help.
There may be some dust inside the computer's optical drive that may affect
the ability of a correct system disc (a clean DVD) from reading content.
How to clean a DVD Superdrive using a credit card !
An installer DVD from another model Mac won't work. If the DVD is not a
match for the computer, it may just spin, do very little or nothing. In order
to install a new system after erasing, the Disk Utility has to be used to
write a format on the erased hard disk drive. Were you able to do that? 😐