Recently, I was able to resolve the problem that I had before. I installed the Lion on my laptop and I got stuck at the screen where creating account said: “Before you begin “There is no keyboard connected to your computer“. I plugged a USB keyboard and was easy to setup the account BUT, it was looped on that process.
I couldn’t boot with -x, -v, -f or others, they just hang or show errors msg on me…
I read some forums and found out this the best way for me to do.
1. Boot into Lion installation media (in my case a unibeast drive),
2. Open Terminal,
3. Type “cd /Volumes/(Insert drive name)/var/db”,
4. Type “touch .AppleSetupDone”,
5. Type “resetpassword”
6. Select your drive at the top and change root password in dialog,
8. Log on as “root”
9. Create new user account from System Preferences.
Hope it can help your problems as mine
Credit to shawnanastasio @ insanelymac.com