I did the mistake to remove zeitgeist, which uninstalled many important packages. I use Unity and first it just didn't let me login. Later I removed some more packages like python-nautilus, while I was autoremoving stuff, hoping that dependancies will be fixed. Now when I start Ubuntu it loads up something similar to terminal, but I cannot write anything. I cannot start recovery mode any more (doesn't load), but even if I do so it doesn't have internet connection, because I use static IP in the network and router.
I can only start Live CD of Ubuntu 12.04. I tried to chroot and get back everything I need. But I get the error "unable to resolve host ubuntu". When I mount the file system it actually changes hostname to another one, so probably there is the problem.
But then how can I install back all these packages?
P.S. I can try to use this answer - after remove zeitgeist, there is no unity in Ubuntu, but I don't know how to deal with the above situation - unable to resolve hostname. And after applying more changes, maybe it won't be enough any more.