Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 1996 02:53:45 +0000 ()
From:      David Nugent <davidn@sdev.blaze.net.au>
To:        wOOwOO <woowoo@mark.petra.ac.id>
Cc:        FreeBSD-questions Mailing List <questions@freebsd.org>
Subject:   Re: Adding ttyv? devices.
Message-ID:  <Pine.BSF.3.95.960920024354.4756C-100000@sdev.blaze.net.au>
In-Reply-To: <Pine.BSF.3.91.960919141525.1852A-100000@mark.petra.ac.id>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 19 Sep 1996, wOOwOO wrote:

>> > What am I missing here.
>> I guess you can't be blamed, because this is really confusing.
>> You should do ./MAKEDEV vty4
>> 
>> Look in MAKEDEV for such things...
>
>yeah .. the devices were succesfully created, but how to make its active 
>(pressing alt-f5, alt-f6, etc.) ?
>
>I tried to add in /etc/ttys
>
>But got error from kernel ... ttyv? not configured ...

[the long answer]

Devices (or at least *most* devices - ethernet cards are one
exception) require 2 things to work:

  a) The driver must be enabled in the kernel. Where a driver
     provides facilities for multiple services (or "devices")
     the appropriate number must be enabled,

 - and -

  b) The device files must exist in /dev (created via MAKEDEV
     which runs mknod, or by running mknod manually).

Your "/dev" (devices) directory is the userland "vector" by which
application programs talk to the kernel. If an application wishes
to use a device - and in this case, I mean /sbin/init, which
opens the vts and starts up getty processes on them - then that
application will attempt to open the corresponding file in /dev
in order to talk to the running kernel. Now, the kernel must have
the device, and the appropriate number of devices configured, for
that open() to succeed.

[the short answer]

/sys/i386/conf/MYKERNEL (your kernel configuration file) has an
option that sets the number of console devices allowed for the
kernel at runtime. This effective sets the number of vts that
*can* become active.

option MAXCONS=n   (where 'n' is a number)

How many *are* active depends on what you put into /etc/ttys. You
can activate up to as many vts as the kernel is configured for,
but no more. You're no doubt running a kernel with MAXCONS=4
(check with dmesg and/or /var/log/messages for your startup
messages to make sure).

Hope this helps,
David

David Nugent, Unique Computing Pty Ltd - Melbourne, Australia
Voice +61-3-791-9547 Data/BBS +61-3-792-3507 3:632/348@fidonet
davidn@blaze.net.au http://www.blaze.net.au/~davidn




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.960920024354.4756C-100000>