[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Serial console
On Thu, 11 Dec 1997, Yaron wrote:
> Hi,
>
> On Thu, 11 Dec 1997, Ariel Biener wrote:
>
> > I want to thank all thos who offered their help, I have already solved
> > the problem, so we can end the thread.
>
> How about a summery? So the next time someone asks that we'll have an
> answer ready?
Gladly. I am forwarding you the mail I sent to my head of department. Note
that the feature to boot a PC from remote if it's stuck was not "yet"
implemented, but the serial console was. I have removed from the mail some
info that is only pertinent to us, but left all the data regarding the
console stuff.
Be sure to read the .diff file you ftp before applying, there are some
very interesting comments at the beginning of it. Also, remember the
procedure described here is for 2.0.20 kernels and above, not 2.1.x
kernels.
------------------------------------------------------------------------------
Get from
ftp://ftp.cistron.nl/pub/people/miquels/kernel/
The file named:
linux-2.0.20-serial-cons-kmon.diff
It should be applied to the /usr/src/linux tree. (the diff was originally
made against Linux 2.0.20 kernel, but it works nicely with 2.0.32 as well)
Afterwards, recompile the Linux kernel, and put it where it belongs, in
order for lilo to recognize it (/ on Slackware, /boot/ for Debian and
RedHat).
When all this is ready, edit /etc/lilo.conf , where you have two sections:
1). global setting.
2). per image settings.
You need to add the following to the global section:
serial = 1,9600n8
And to the image section, add this: (to the kernel image including the
serial console, or if all the images have it, then to each image):
append = "console=1,9600n8"
The 1 in both sections stands for /dev/ttyS1 (COM2). It can be changed to
whatever needed of course.
I'll give the /etc/lilo.conf from <computer X> as an example:
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
serial = 1,9600n8
image=/boot/vmlinuz
label=linux
root=/dev/hda1
append = "console=1,9600n8"
read-only
image=/boot/generic
label=generic
root=/dev/hda1
read-only
After this is done with, run /sbin/lilo
The last part is dealing with having a tty like program (like getty or
alike) bound to this serial port once we reached multi-user state, in
order to be able to authenticate.
The file needed for this is /etc/inittab .
I recomend using agetty, it's simple, stable and nice. The default
mingetty used by redhat for virtual consoles will not work here.
What needs to be changed is this (again, from <computer X>'s /etc/inittab):
# Run gettys in standard runlevels
7:12345:respawn:/sbin/agetty -L 9600 console vt100
1:12345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
Note the 1st line in this section:
7:12345:respawn:/sbin/agetty -L 9600 console vt100
As you see, before I have added it, RedHat had 6 virtual consoles defined.
The fields are like this:
console number:init levels:respawn:getty program
Be sure to add the -L flag to agetty, if used on a serial console.
After you have finished with this, go to /dev and see whether
/dev/console and /dev/tty0 are one and the same. If there is a
/dev/console, but no /dev/tty0, move /dev/console to /dev/tty0 . If
/dev/console is a link to /dev/tty0, remove the link.
Then, depending on what you have set in lilo.conf do:
ln -s ttyS? console
-------------------------------------------------------------------------------
Regards,
--Ariel
>
> Bye,
>
> -Yaron.
>
>
+---------------------------------------------------------------+
| Ariel Biener |
| e-mail: ariel@post.tau.ac.il Work ph: 03-6406086 |
| fingerprint = 07 D1 E5 3E EF 6D E5 82 0B E9 21 D4 3C 7D 8B BC |
+---------------------------------------------------------------+