PDA

View Full Version : How-To fix the serial console on a Fedora Core 2 root server


eWebtricity
12-14-2005, 10:33 AM
Thanks to Kiehlster for this one, submitted on 12/14/05

I'm curious if anyone else has been having trouble with their serial console not working. If you're not familiar with the serial console, check out your server data in your 1and1 control panel and you'll find the login information for that. You should be able to ssh to sercon with your credentials and then press enter to receive a login prompt. If you're nervous about running stuff by accident, send a ctrl+L to make sure you're not already logged in.

If you can't do this, you probably are in the situation I had at first. I only discovered what the problem really was when I reconfigured lilo and it returned a "unsupported baud rate" message when I did so. If you end up with such luck, I believe I have a solution. I was able to fix my serial console by lowering the baud rate from the initial 1and1 default (57600) to 38400.

You will find the serial console settings in your /etc/lilo.conf file. You should be able to easily find the baud rate value in the couple append strings which looks much like this: append="console=ttyS0,57600 console=tty0 panic=30"

Simply change 57600 to 38400, run lilo from your shell. lilo should complain if the baud rate is unsupported. If it isn't supported, then try lowering it to something like 28800 or 14400. As a reference, this is what my configuration looks like:

serial=0,38400
boot=/dev/sda
root=/dev/sda1

install=/boot/boot.b
vga=normal
timeout=60
prompt
lba32

read-only

default=lxser
append="console=ttyS0,38400 console=tty0 panic=30"

image=/boot/vmlinuz
label=lxser
append="console=tty0 console=ttyS0,38400 panic=30"

image=/boot/vmlinuz
label=lx

image=/boot/vmlinuz.old
optional
label=lxserold
append="console=tty0 console=ttyS0,38400 panic=30"

image=/boot/vmlinuz.old
optional
label=lxold Let me know if this is helpful. I spent a few minutes the other day trying to figure out why my console didn't work, and when I compiled a new kernel for other reasons, the message popped up, so I looked around for a little and got the console working.

Kan
01-05-2006, 01:11 PM
I also have a problem with the serial console, but when i open my lilo.conf file its a little different than the one you show.Heres mine:

boot=/dev/sda
root=/dev/sda1

install=/boot/boot.b
vga=normal
timeout=60
prompt
lba32

read-only

default=lx
append="console=tty0 panic=30"

image=/boot/vmlinuz
label=lx

image=/boot/vmlinuz.old
label=lx.old

image=/boot/vmlinuz-2.6.9-1.6_FC2
label=linux-up
initrd=/boot/initrd-2.6.9-1.6_FC2.img

image=/boot/vmlinuz-2.6.9-1.6_FC2smp
label=linux
initrd=/boot/initrd-2.6.9-1.6_FC2smp.img


Should i add/edit that to match yours?

eWebtricity
01-06-2006, 12:38 PM
yes the changes above are what worked for Kiehlster, they may work for you too but no guarantee.

tburt11
01-19-2006, 02:59 PM
Also note that the Plesk loaded server has the getty enabled for the serial console so that you can log in, even if your network configs are screwed.

But the minimal install of FC2, which is all I can see is available (not FC3 or 4) does not have the getty enabled.

To get a login prompt on the serial console when using the minimal install of FC2, then edit the /etc/inittab file and uncomment the line:

T0:12345:respawn:/sbin/agetty -L ttyS0 57600 vt100

A reboot will cause this getty to now be spawned on the serial port, and you can login..

A NOTE OF CAUTION....

If you log into the serial port as root.. Be sure to LOGOUT. If you don't logout, and the terminal server closes your connection, your open session will still be left hanging on that open port...

This can be a security issue.

eWebtricity
01-19-2006, 10:58 PM
Thx for the update !

dan.plifeye
02-03-2006, 02:29 PM
When I try to log into the Serial Console, I get this:

Last login: Fri Feb 3 19:29:36 on ttyS0
No directory /var/www/vhosts/default-domain.co.uk!
Logging in with home = "/".

Fedora Core release 3 (Heidelberg)
Kernel 2.6.11.9-050512a on an i686

And then it asks for my login and password again.
What's up?

tburt11
02-03-2006, 06:00 PM
Check the password file for the home directory of the login you are using to login with.

You did not say what login name you are using, but I doubt it is root.

The missing home folder is the reason for the error message.

You may be being logged out for a different reason. If you give more detail, like the login name you are using and the line from the password file for that login, we might be able to tell you more.

It happened to me once, but I cannot remember what I did to fix it. It was something easy.

dan.plifeye
02-08-2006, 10:19 AM
Ok, well, I dunno what the heck is happening now.

I want to login to the serial console to run a filesystemcheck as I believe there may be a hardware fault somewhere as the occasional table in MySQL keeps corrupting.
I have not edited any of the files on the server to do with the serial console yet.

Using SSH, I go to:
sercon.pureserver.info

Username:
u39421241

Password:
<as stated in the 1&1 control panel>

And now all I get is:
Access denied

The contents of my lilo.conf file are:
boot=/dev/hda
root=/dev/hda1

install=/boot/boot.b
vga=normal
timeout=60
prompt
lba32

read-only

default=lx
append="console=tty0 panic=30"

image=/boot/vmlinuz
label=lx

image=/boot/vmlinuz.old
label=lx.old

image=/boot/vmlinuz
label=linux-up

image=/boot/vmlinuz
label=linux


I am on a UK Root 1 server, with FedoraCore 3 and Plesk 7.5.4 installed.