Restore MacBook after Avast! install (stuck at apple logo)
Try this link:  https://forum.avast.com/index.php?topic=151393.15

part way down the first page of the thread, the poster Francisco Velasco had a solution that worked for me (his is reply #9 August 17, 2014). Good luck, and steer clear of Avast Antivirus - I'm going back to ClamX AV!!


Turn off your Mac, press Command + S, turn on, and don´t release Command + S until you see the Apple logo  
When you are in the prompt (a black screen with white letters), type
/sbin/mount -uw / &lt; ENTER &gt;
Work through these commands, in sequence:
cd Library &lt; ENTER &gt;
cd Application\ Support &lt; ENTER &gt;
(as there is a space between "Application" &amp; "Support", we use \ after Application then a space)
cd Avast &lt; ENTER &gt;
cd components &lt; ENTER &gt;
cd uninstall &lt; ENTER &gt;
cd com.avast.uninstall.app &lt; ENTER &gt;
cd Contents &lt; ENTER &gt;
cd MacOS &lt; ENTER &gt;  
Now, in this last folder if you type
ls &lt; ENTER &gt;
You will see a file called uninstall.sh, and this is the one to run to remove
Avast, now to use it you must use the following instruction
sudo sh uninstall.sh &lt; ENTER &gt;
After this now you can reboot your Mac
reboot &lt; ENTER &gt;
If after this reboot you can´t login your Mac, turn off your mac, repeat step 1 and 2 and now go to the folder
cd private &lt; ENTER &gt;
cd etc &lt; ENTER &gt;
ls &lt; ENTER &gt;
and you see a file with the name launchd.conf, you need to delete this file, type the following
rm launchd.conf &lt; ENTER &gt;
Reboot your Mac with
reboot &lt; ENTER &gt;