Start the Mac in "safe mode" and thereby force a check of the startup volume, and run only necessary kernel extensions. This might be used, for example, to get out of a failed upgrade which is looping the setup assistant. Press shift right as you hear the startup sound, and release shift when you see the grey Apple logo and spinning progress indicator. Give this process time. Leave safe mode by rebooting.