Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I boot Debian into text mode? My mouse and keyboard are working in GRUB, but when the login screen appears they don't, so I can't do anything.

share|improve this question
add comment

migrated from stackoverflow.com Jun 23 '11 at 21:38

This question came from our site for professional and enthusiast programmers.

3 Answers

At the boot prompt

If you're at a boot prompt, boot in single user mode by adding 1 (or single) at the end of the kernel command line. In that mode, you only have a minimum set of services started — filesystems are mounted, you can log in in text mode on the console, and that's about it.

Fake display manager

There's a way to specifically avoid starting a display manager on Debian. The scripts that start display managers at boot time check if they are the default display manager, to ensure that only one display manager will be run. So set a fictitious default display manager. Make sure that /etc/X11/default-display-manager exists but doesn't contain the name of a display manager (e.g. make it empty).

Through runlevels

Unless you've installed an alternative init, Debian uses System V init, with runlevels. A runlevel is, roughly speaking, a set of services to run. The 1 above means runlevel 1, with very few services. Linux SysVinit has four levels (2 to 5) that correspond to normal system operation. Under Debian, these four levels have the same effect by default; it's up to the system administrator to customize them if desired. In your situation, I guess you want to define a runlevel without X and make it the default.

  • Arrange for level 2 not to start any of the graphical login managers (xdm, gdm, kdm, …).
    • For e.g. xdm: remove the symbolic link /etc/rc2.d/S??xdm (where ?? are two digits), and replace it by /etc/rc2.d/K??xdm copied from /etc/rc0.d/. S means “start”, K means “kill”; the symbolic links in /etc/rc$N.d indicate what services to start or stop when entering runlevel $N.
    • Alternatively, install file-rc or sysv-rc-conf for easier runlevel management.
  • Make sure that the default runlevel is 2. The default runlevel is set in /etc/inittab, with the line id:2:initdefault:.
share|improve this answer
add comment

You can also do CTRL ALT F key where F key is F1 to F6 to bring up that text login screen. Note that screen 1 is where the bootup information is.
F7 will take you back to the GUI.

Going into single user mode stops many of the services which are present in the multi-user mode. This probably not what you want here.

share|improve this answer
add comment

Append 'single' to kernel boot command line ('e' key in GRUB if memory serves me well).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.