I reinstalled Lion recently and ran into an issue where sound would not work on my Mac. The sound icon in the upper right was greyed out, and if I used the volume keys it wouldn’t do anything and just show an X on the screen. After reinstalling multiple times I figured out I just had to plug in some headphones and take them out and it worked!
What a headache! Hope this will save someone some time. Not sure why this happened, but I figured it could possibly be hardware or something?