Another way to accomplish this, assuming that X is started via gdm at least (may also work for some of kdm, xdm, slim, I don't know) is to edit the kernel parameters at boot and add "text" as a parameter. This will prevent gdm from starting. If you need to start X after booting with that option you'll need to use startx. gdm will refuse to start (via /etc/init.d/gdm) as long as text was part of the boot command.