I've restored my MacBook2,1 (White) from Late 2007 from Time Machine, and my system got back to 1 hour before changing my short name. It was fine, worked perfectly. I've now upgraded to 10.7.1, and there have been issues since then.
It started with hangs on startup. Chime -> -> + Spinner. Fans rev to maximum, base heats up, I let it go for 3 minutes and give up, power button for 5 seconds and try again. This results in a normal startup. Happened once every time I wanted to start up.
Now it's much worse.
This issue persists; however, now I can't log in any more. The login screen appears 2nd time round, and I type in my password -> login screen disappears, mouse cursor stays with gray screen for a second or two -> login screen reappears as if I hadn't touched it in the first place.
I've worked on this for a couple of hours, running Disk Utility's Repair Permissions, Repair Disk. The only permissions needing repair have been on Apple's to-be-safely-ignored list, bar a few which were to do with device management.
Thanks to @Kappy's advice, I have cleared the preferences for loginwindow and windowserver, and various caches. However the mentioned "Extensions.kextcache" was not actually there to rm.
I've run resetpassword and done that for my account, which seemed to go through, but when I did that for the root user, it exclaimed "Password not saved". I was enabling root to follow this advice, and the "Other User" section at the login screen popped up, but I was unable to log in with root / *password*, and so I couldn't do anything beyond that.
Everything I need has been backed up, through Time Machine and through Dropbox. There seems, however, to be something deeply wrong with my system that's pervaded each installation — should I try the old "Archive and Install" to start fresh, and just copy the files I need? That would be a lot of work, since I'd have to not only restore all my files, but my entire development environment, including Xcode, everything I have through homebrew and RubyGems, and of course all my settings... but I'm willing to do that if it's the only way to make my Mac cease to be a brick.
Thanks in advance for reading this wall of text and for your consideration of my problem.