I would first boot the computer from an external source like your installation disk or an external drive and check if the sound works on the external OS.
If the issue is a hardware issue it could also be caused by a faulty keyboard since there's a sound control generated by the keyboard. To test this you have to remove the bottom panel, disconnect the battery then the keyboard from the logic board, connect the AC adapter and start up the machine via the two power pads. If you have sound then the keyboard is bad.