This morning I upgraded my Ubuntu 11.10 in my HP laptop to 12.04LTS using the update manager. All went smooth but during installation of the new packages some errors were reported. But the update manager continued with the installation and finally the system restarted. But when the login screen came up I knew things had gone seriously wrong somehow – icons were not displayed, gui was jagged, i could not control the mouse pointer and when i logged in things stayed the same. I could not do anything at all except do a hard reboot and hope it will rectify itself in the next boot. But I had no such luck and I was stuck.
So I googled to find a solution but almost all sites instructed to do a fresh install of 12.04 after backing up the files. At least I was not the only one facing problems with the upgrade from 11.10. But I decided to try and fix it before going for the fresh install and luckily it worked for me. I cannot guarantee that it will work for you, but this is what I did:
1) booted in to the recovery mode of the previous kernel version
2) set up networking first from the recovery menu
3) then i chose to repair broken packages using dpkg
then it started installing stuff (that i think failed during the upgrade) and finally after restart I had a working Ubuntu 12.04LTS
But my ethernet driver was not working. Ubuntu has still not fixed the r8168 driver issue and the old switchmods script did not work. Found the new version of the script after a bit of googling. Here it is : https://gist.github.com/2390823
Just download and extract the archive and execute the switchmods script as root.
Hope this helps.
Bye

I think that is going to help a heck of a lot of people because I have been hearing this a lot. While being an ubuntu-boy, I simply did not trust the distro upgrade and I performed a fresh install in another partition and left 10.04 as it is.
PS: What is this switchmods script?
I faced the same issue and the fix you described worked out just fine here as well.
Thanks for posting it!
for me just didnt work out. Although, live cd is working well. I was wondering if using live cd, any bux fixing can be done.
I run your script and then I typed ifconfig -a. I get new line eth0:avahi, but I still cannot connect to internet. I really appreciate if you can help me, thanks.
Hi andhika,
Please note that the fix is only for the realtek r8168 ethernet board. So if you are having a different ethernet card, this fix won’t work. Are you sure you are having r8168?