6

Ok, this might sound ridiculous, but of all the issues I could have, I'm scratching my head over booting into text mode. Normally I'm in the opposite direction, such as startx not working.

To put the wtf-level of this into perspective, I just managed to run Photoshop CS5 without problems (I'm trying to go into text mode to install nVidia graphics drivers).

Speaking of levels, the runlevels concept is confusing me; Debian seems to have a default runlevel of 2 - in the readme for the drivers it says such a runlevel would be text mode, and not even have networking (and that the "default" would be 5).

Just to clear that up, on this Debian, /etc/inittab says:

# The default runlevel.
id:2:initdefault:

Then, I think about booting into "recovery mode", which is text-only. I have a gut feeling that's not the way to do it, as I'm not trying to "recover" anything, and I don't even know what changes in that mode.

So I google, and a post says I should edit /boot/grub/grub.cfg. But that file says at the beginning:

# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub

And I really don't feel comfortable editing a file that says that.

Then I find this other post, Debian-specific. Basically it says to go root and disable the login manager:

# update-rc.d -f gdm remove

I was just going to try that out, but some commenters disagreed, some saying I should move a file:

# mv /etc/rc2.d/S30gdm /etc/rc2.d/K70gdm

Other put this in his .bash_profile:

if [ "$(echo $(who am i)|awk '{print $2}')" = "tty1" ]; then startx;logout;fi

(don't ask me what that means) Somebody even mentions this as a solution:

# apt-get remove gdm

                                     Why?

Could anybody tell me a sane, simple way of booting into text-mode on this Debian-based distro?

2 Answers 2

8

So, I was going to try update-rc.d gdm3 disable as per @Stew's suggestion. Before that, I thougth, hey, there are "some" updates due, so I let it get updates to the packages (amongs them, linux 2.6.* to 3.0.*).

When I rebooted, to my surprise, linux started in text mode. If I ran startx I could get into the graphical environment without problems, so what happened?

The linux commandline (the parameters to linux from grub) included text. Hey, I edited that before, but it didn't work! Now in the boot log it was showing "text" had gotten into the linux parameters.

Turns out...

             One does not simply edit /boot/grub/grub.cfg

You shouldn't just sudo nano /boot/grub/grub.cfg and put "text" there, there's a big warning against it at the top of the file.

The right way is to:

$ sudo nano /etc/default/grub

And add "text" to GRUB_CMDLINE_LINUX_DEFAULT.
So if it looked like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet"

...you have to change it to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet text"

And then (it says this at the top of the file, somehow I missed it):

$ sudo update-grub

And reboot.
I prefer this method over disabling a service, since it's what it should be: editing one line in a configuration file. The same process can be repeated, and, if you want, startx will bring you to the user graphical interface while in text mode.

To return to normal, of course, just edit the file again and update-grub.

4
  • This helped me a ton. Thanks. But I have a question: Does this stop Gnome from loading on boot? Or does it still load and the user is just presented text mode?
    – mawburn
    Sep 29, 2013 at 17:13
  • @MadBurn I have no idea at the moment, but you can check by running top in text mode, I believe Gnome's process is called gnome-session or something. If I'm not mistaken, it won't be loaded, but again I'm not sure. I'm glad my answer helped you out :) Oct 1, 2013 at 11:32
  • I think it does stop the process from starting. I wasn't able to find anything in the process list that told me otherwise. All the top processes were just core system processes. Either way, my broken-down-laptop Linux Mint 15 MATE based home server runs like a champ now. :)
    – mawburn
    Oct 1, 2013 at 13:06
  • Hmmm, a broken old laptop as a server... pretty cool idea. I'm also sure your Gnome's not running because it's very prominent by resource usage on top. Oct 2, 2013 at 14:44
1

I'd be surprised if it was really gdm and not gdm3 or something else which was your display manager. aptitude search '~i~Px-display-manager' should give you a list of display managers you have installed.

Indeed update-rc.d -f remote gdm3 would be an incorrect way of disabling the service. It would work temporarily, but then it would reappear when gdm3 is upgraded. This is documented in the update-rc.d manpage if you search for "A common system administration error".

update-rc.d gdm3 disable would be the recommended way to disable a service.

removing the display manager altogether is also a solution, but you might find that you do not like the results, You may find that because of the way auto-installed pacakges and meta-packages work together, your system suddenly wants to remove all of gnome. here is a good discussion of this issue and how to work around it.

2
  • It seems you're right, it's gdm3. Indeed, I do not want to remove a package just to go into command-line mode, so I'll soon try update-rc.d gdm3 disable and report what happens. You know, it's been a few months since I used another distro, under which by accident I discovered a shortcut that put me into text mode, it used Openbox as a window manager. By chance Gnome doesn't have something similar, has it...? (I don't remember which was the shortcut). Feb 16, 2012 at 0:59
  • Found an easier way in the process, and gosh, it's as easy as I expected it to be. Good nice ol' text mode :) Feb 17, 2012 at 2:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .