Sometimes you may need to reinstall OS X on a computer, but the drive is broken, resulting in an obvious problem with reading the installation DVD. While broken drives can be easily fixed or replaced, it does take your computer out of commission for the time it takes the repairs to be done. Meanwhile, there are a few approaches to reinstalling OS X that may work.
Some of these options require you to have a system that will boot into target disk mode, which is only available on those with built-in firewire. Unfortunately, recent MacBook models cannot use target disk mode, so the options are more limited for these computers.
Replace the drive
Granted I just said this would take the computer out of commission, but if you have a Mac Pro or old PowerMac it may be easier to pop the thing open and replace the drive from another system or by getting a new one from a local computer store. If you need to send the system in for servicing, then you may wish to read on for other options. Be sure to check whether or not your system uses the older ATA or the newer SATA connections before purchasing a replacement drive. Newer Mac Pros do not come with ATA optical drives.
Use an external optical drive
If you have an external firewire or USB DVD drive, that can also be used to install OS X. Many times these have been put in a closet somewhere since most computers come with optical drives that can burn DVDs, but if you have one, give it a shot.
Use an external hard drive
A more robust option than optical drives is to use an external hard drive, which can include thumb drives or even an iPod. If you connect the device to another Mac, you can use Disk Utility to create a disk image of the installation DVD, and then restore it to the external drive. From here, you can then connect the drive to the broken Mac, start it up, and hold the options key to select the bootable installation drive.
Second computer's optical drive
If you do not have a spare hard drive or optical drive, try inserting the DVD into a second Mac and connecting it to the broken computer with a firewire cable. Boot the second Mac and press the "T" key to get into target disk mode, from which the optical drive may become available to the broken computer via the firewire connection. Boot the broken computer and hold the options key to see if the drive shows up. This may or may not work, depending on the computer being used.
Use another partition on a second computer
Just like with using an external drive, you can set up a second computer to serve as one. To do this, use Disk Utility on the second computer to partition the hard drive and create a small 10GB partition for the contents of the installation DVD. From here, create a disk image of the installation DVD and restore it to the newly made partition. Connect the computer to the broken one with a firewire cable and reboot it while holding the "T" key to get to target disk mode. The installation partition will then show up on the broken computer when you boot it with the options key held (be sure to avoid booting off the second computer's boot volume, and only select the smaller partition with the installation files on it).
This option is an alternative to using the second computer's optical drive, if the drive will not work in target disk mode.
Install from a second computer
Instead of trying to access the installation media from a second computer or alternative source, try installing to the broken computer from a working one. To do this, boot up the broken computer in target disk mode (holding "T" at bootup) and connect it to a second Mac. From there, reboot the second Mac off the installation DVD (hold the "C" key at bootup with the installation DVD in the drive) and run through the installation steps. The drive in target disk mode should be available in the OS X installer and you can proceed with the installation.
Share the DVD drive
For MacBook Air and recent Mac Mini computers without optical drives, this problem is not an issue because they are built to share the optical drive of another system for OS and application installation. The method for doing this is outlined in this Apple knowledgebase document.