iMac doesn't boot after OS X El Capitan update
Hi everyone, today I downloaded the OS X El Capitan update, after installation my iMac has restarted but it has blocked on the grey progress bar at start up, I don't know how, I restarted it few times, but for two times I reached the login screen but it couldn't do login, infact it continue showing the loading cursor but doing nothing. Unfortunately I forgot to do a backup before installation, I tried to start iMac in recovery mode (with cmd + R) but nothing change, it continues showing the grey progress bar. I also tried to boot it disconnecting all devices but nothing changed. My iMac is a mid 2011 model with 4 gb of RAM, when I started installation I had about 20 gb of free disk space so I think that was enought. There is a way to restore it, with Yosemite or El Capitan, without lose my files?
iMac, OS X Yosemite (10.10.3)