The other day my Mac was running slow. It intermittently hung causing problems. So Inorder to fix this
Reset PRAM and NVRAM
- Shut down your Mac
- Locate the following keys on the keyboard: Command, Option, P, and R.
- Turn on the computer.
- Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears and before the chime sound.
- Hold the keys down until the computer restarts and you hear the startup sound for three times.
- Release the keys.
Restart in Safe mode (Solution 2)
Make sure that the computer is shut down. Press the power button. Immediately after you hear the startup tone, press and hold the Shift key. Release the Shift key when you see the gray Apple and progress indicator. Let the Mac boot up…
Run Disk Utility in Single User Mode(Solution 3)
Turn your Mac off. Turn it back on and this time hold down the Command (Apple) key and the S keys at the same time. Then type the following command…
/sbin/fsck -fy (note the space between fsck and -fy)
But when fsck was running, it was failing with an weird and irritating error: “invalid node structure”
Luckily there is a way to fix this as well.
Run the following command:
fsck_hfs -rf /dev/disk0s2 – where 0 and 2 are unique to my mac, but range usually between 0 and 4 and only numbers
I had to repeat the above step couple of times until I see the error message is fixed (Ooph!!!)
Once this is all complete, my Mac worked fine without any performance issues.. Voila!!!!