So I'm trying to install a custom kernel on Ubuntu.on a laptop with an nvidia graphics chipset.

Grab the nvidia drivers from here and follow their instructions "sh"

"ERROR: You appear to be running an X server; please exit X before installing."

WTF? Why? Why must I exit X? What the hell is that about? Crappy proprietry software. That kind of error belongs in the Windows world.