[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: screen in single user mode - "cannot open /dev/console"

From: Michael Parson
Subject: Re: screen in single user mode - "cannot open /dev/console"
Date: Sun, 25 May 2008 09:25:40 -0500 (CDT)
User-agent: Alpine 1.10 (NEB 962 2008-03-14)

On Sat, 24 May 2008, soumen wrote:


Thanks to all for responding and sorry I couldn't reply earlier.

I am using Ubuntu Linux (Gutsy Gibbon):

$ uname -a
Linux loki 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686

By "single user mode" I talk of, I mean "single" parameter being passed by
Grub bootloader during startup:

kernel        /vmlinuz-2.6.22-14-generic
root=UUID=7bb7e9b4-7134-430d-b2bb-cd33c45d0acd ro single
initrd          /initrd.img-2.6.22-14-generic

I am able to also reach this mode by doing "init 1". I understand that
this is supposed to be a spartan recovery mode or for situations where
you don't want multiple users.

But in context of my home setup, I wanted to use this to avoid
starting up too many services/X/Gnome etc since all I want to do is
run some long-running command line programs (for which screen is more
than adequate and in fact, perfect). My intention is to use least
amount of CPU/memory.

I have noticed that even in this "single" mode, there are services
like ntp running and the network interface is already configured so I
am able to access internet. So it is not that Nothing is running.

Then it is time to start learning how to admin a Linux (or any other UNIX)
system. :)  Most of my Linux experience is with Red Hat, but I understand
that Debian (and therefore Ubuntu) use the same sys-v init system that
Red Hat uses.  If you don't want the graphical login, edit your /etc/inittab
file and look for a line that looks something like:


And change it to be


This changes the default runlevel from 5 to 3.

The sys-v init package on RedHat (and I'd guess Ubuntu/Debian), define runlevels

0 - halt
1 - single user mode
2 - multi-user mode w/o networking
3 - multi-user mode with networking
4 - undefined
5 - multi-user mode with X11 (3 + X11)
6 - reboot

Setting your initdefault to 0 or 6 would be a bit silly

What do all those numbers mean?

in /etc/rc?.d, where the ? is the run level, there are a bunch of files
that start with S?? and K??.  Those are sorted lexicographically, not
numerically, which means 10S* comes before 1S*, so if you want something
to come before S10, you make it S09, or smaller.  Anyways, when you
enter a given run level, those files are sorted, then stuff beginning
with S are run, in lexical order, with the flag "start" which will start
up that program.  The stuff beginning with K* are run with the flag of
"stop" which will stop them.

On a Red Hat box, you can manage these by hand with the 'ln' command,
or you can use 'chkconfig' which will be a little more automatic.
Debian/Ubuntu might have their own method.  Run the seach string 'Ubuntu
run level configuration' through google and see what you can find.

This link looks like it might get you on your way:

And now we've ventured way off scope of this mailing list. :)

Michael Parson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]